From: Rod B. <ro...@bo...> - 2006-03-23 21:39:11
|
If this is a new chip you need to tell the philips bootloader to boot your code and not itself first. If you reset the boot status bit to 0 then the micro will try and run your code. I'm looking at page 145 of the user manual I downloaded a long time ago. Look fir a section called "Power on reset code execution" Regards, Rod Boyce Maarten Brock wrote: >Maybe the watchdog bites? > > > >>I have this code with a nested for loop and when I flash the micro it >>just hangs. On port 2 there are 8 leds, so it should be like a binary >>counter. If I only have the outer loop it works, but it is too fast, so >>I only see the MSB blinking. When I load the program with the debugger >>it crashes. >> >> >>Thanks for the answers. >> >> >>#include "LPC935_936.h" >> >> >>void sys_init( void ) { >> P2M1 = 0x00; >> P2M2 = 0x00; >>} >> >>void main(void) { >> char i,j; >> char temp = 0; >> >> sys_init(); >> while(1) { >> for(i = 255; i > 0; i--) { >> for(j = 5; j > 0; j--); >> } >> temp++; >> P2 = temp; >> } >>} >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by xPML, a groundbreaking scripting language >>that extends applications into web and mobile media. Attend the live webcast >>and join the prime developer group breaking into this new coding territory! >>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >>_______________________________________________ >>Sdcc-user mailing list >>Sdc...@li... >>https://lists.sourceforge.net/lists/listinfo/sdcc-user >> >> >> > > > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting language >that extends applications into web and mobile media. Attend the live webcast >and join the prime developer group breaking into this new coding territory! >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >_______________________________________________ >Sdcc-user mailing list >Sdc...@li... >https://lists.sourceforge.net/lists/listinfo/sdcc-user > > |