Commits

Trammell Hudson committed 0fd2d26

Increase bit width to 31.25

Comments (0)

Files changed (1)

 {
 	// Phase shift on zero-bits
 	if (!bit)
-		phase = (phase + 128) & 127;
+		phase = (phase + 64) & 127;
 
-	const int bit_width = 20;
-	for (int i = 0 ; i < bit_width ; i++)
+	const uint16_t bit_width = 27 * 128;
+
+	for (uint16_t i = 0 ; i < bit_width ; i++)
 	{
-		uint8_t s = sin_table[phase++ & 127];
-		PORTB = s;
+		const uint8_t s = sin_table[phase++ & 127];
 
 		uint8_t spin = 32;
 		while(spin--)
-			asm("nop");
+			PORTB = s;
 	}
 }