I have found a bug that happened when DEBUG directive was active.
I forgot to save the _temp_register_ on the beginning of the ISR and it caused the AVR to crash and reset while printing debug data to serial console.
ISR (INT0_vect, ISR_NAKED) {
asm volatile (
"push __tmp_reg__\n\t" // <- THAT WAS MISSING!
"in __tmp_reg__,__SREG__ \n\t" // Save Status register
"push r17\n\t" // keep PINB state
"push r18\n\t" // keep PIND state
"push r19\n\t" // temp Data to write on Output
"push r20\n\t" // register to read keymap
"push r26\n\t" // Pointer to Keymap
"push r27\n\t" //
...
After that was fixed the project began to behave like expected, so I am releasing it as a beta.
I Will change the structure of the ".h" files to make easier to define new keyboard matrices (ZX81,Speccy,Ace) as well as new keyboard layouts (pt_br, en, etc).
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.