Commits

Trammell Hudson  committed 2db172d

add a timing pulse output and adjust the start bit timing

  • Participants
  • Parent commits 5e37292

Comments (0)

Files changed (1)

 //#define TTY_RX 0xD2
 #define TTY_RX 0xF7
 #define TTY_TX 0xD3
+#define TTY_DEBUG 0xD7
 #define BIT_CLOCK 9090
 
 
 	for (int bit = 0 ; bit < NUM_BITS ; bit++)
 	{
 		if (bit == 0)
-			_delay_us(BIT_CLOCK/4*3);
+			_delay_us(BIT_CLOCK/4*2);
 		else
 			_delay_us(BIT_CLOCK);
 
+		out(TTY_DEBUG, bit & 1);
 		if (in(TTY_RX))
 			byte = (byte >> 1) | (((uint16_t) 1) << NUM_BITS);
 		else
 			byte >>= 1;
 	}
+
+	out(TTY_DEBUG, 1);
 #else
 #define TTY_BITS 64
 	char buf[TTY_BITS];
 	ddr(TTY_RX, 0);
 	out(TTY_RX, 0);
 
+	ddr(TTY_DEBUG, 1);
+	ddr(TTY_DEBUG, 1);
+
 #if 0
 	// 110 E72 is too SLOW at 16 MHz.  Wow.
 	// bit banging it is...