-
I2C function in progress.
05/09/2017 at 00:37 • 0 commentsDebugging the I2C registers is a bit more chalenging than the other periferals.
-
USART with printing now working.
04/26/2017 at 21:38 • 0 commentsUSART without the RX part, now works. Messages are printed to the terminal window.
This is the Arduino code I used for the sketch.
void setup() { Serial.begin(9600); } void loop() { Serial.print("Test UART Message " ); Serial.println("0123456789"); delay(2); }
IRQ USART, UDRE "__vector_19" is responsible for writing out the TX buffer to I/O 0xC6
"_ZN5Print5printEPKc" Is the subroutine that gets called to update the TX buffer.
-
Fade Sketch + PWM now working.
04/25/2017 at 22:54 • 0 commentsRegister 0x88 OCR1AL and 0x89 OCR1AH comtrols the PWM duty rate.
-
Blink sketch is now working.
04/22/2017 at 23:51 • 0 commentsI finally got the blink sketch running.
To get the blink sketch up and running in the Emulator, I had to get the CPU, Memory Mapper, GPIOs, and the timer overflow/compare IRQs working.
The IRQ and "micros" function use SRAM 0x0007~0x000A as a 32bit timer.
After all that fun stuff, I had an alternating bit in the PORTB register.