Commits

Trammell Hudson committed c24b602

Speed up ISP clock and fix hexdump

Comments (0)

Files changed (1)

 #define ISP_XTAL 3
 	.name		= "ATMega8",
 	.pins		= 28,
+	.addr_width	= 13,
 	.addr_pins	= {
 		[ISP_MOSI] = 17, // from the reader to the chip
 		[ISP_SCK] = 19, // SCK,
 
 /** Send a byte to an AVR ISP enabled chip and read a result.
  * Since the AVR ISP is bidirectional, every byte out is also a byte in.
- * \todo Generate clock on XTAL1.
  */
 static uint8_t
 isp_write(
 	for (uint8_t i = 0 ; i < 8 ; i++, byte <<= 1)
 	{
 		out(mosi, (byte & 0x80) ? 1 : 0);
-		isp_clock(8);
+		isp_clock(4);
 
 		out(sck, 1);
-		isp_clock(8);
+		isp_clock(4);
 
 		rc = (rc << 1) | (in(miso) ? 1 : 0);
 		out(sck, 0);
-		//isp_clock(2);
-
 	}
 
 	return rc;
 		buf[8 + 16*3 + i + 2] = printable(w) ? w : '.';
 	}
 
-	buf[8 + 16 * 3] = ' ';
+	buf[8 + 16 * 3 + 0] = ' ';
+	buf[8 + 16 * 3 + 1] = ' ';
 	buf[8 + 16 * 3 + 18] = '\r';
 	buf[8 + 16 * 3 + 19] = '\n';
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.