I have created two separate programs for my AT89C51ED2: bootloader (0x0000) and normal program (0x2000). I use an absolute memory addressed variable to distinguish between the two modes of operation so that interrupts either execute code in the bootloader or call the appropriate ISRs in the program code (above 0x2000). The following is an example of the code used for interrupts in program code, in order to eliminate the usual pushes, pops and reti done by the bootloader ISR.
/** Timer 1 ISR. */ void interruptTimer1(void) interrupt 3 { #pragma asm lcall interruptTimer1Mirror ret #pragma endasm } /** Timer 1 interrupt working function. This routine is used for delays. */ void interruptTimer1Mirror() { timer1Interrupted = TRUE; }
I wish to do the same thing. Is there a Flip for Cygnal C8051F021 ? Thanks.
I wish to do the same thing. Is there a Flip for Cygnal C8051F021 ? The downloading software for the SILabs (nee Cygnal) chips is JTAG based. The software is free and you need a 10 pin JTAG connector on your board and an EC2 (serial) or EC3 (USB) adapter. Erik PS: you can get a complete devkit including the EC adapter for about $10 more than just the EC. I have a lot of SILabs devboards because I needed 8 EC2s for my field guys and took the chance to but devkits.