From: Bruce B. <bb...@sy...> - 2000-11-02 18:13:25
|
At 16:00 11/2/2000 +0200, Panos Kenterlis wrote: >>>> <excerpt><fontfamily><param>Arial</param>Hello everyone... </fontfamily> <fontfamily><param>Arial</param>First of all i would like to congratulate the development team of SDCC. You are doing a great job. Thanks for everything. </fontfamily> <fontfamily><param>Arial</param>Does anyone know of a small code to generate a software Reset condition. I am using the DS5000 microcontroller by Dallas. </fontfamily></excerpt><fontfamily><param>Arial</param> </fontfamily> ljmp 0 ; jump to reset vector ; OK I am being a wise-ass but I couldn't resist :) ; actually the above is a restart rather than a reset ; There is more to this question than meets the eye - ; you could also initialize all SFRs to their POR values ; ; internal RAM will be random, unless you want to clear it ; initialize the SP (stack pointer) ; init interrupt states (priority, enabled or not, edge/level, etc) ; Actually if your startup code properly inits all things, then ; a branch to 0 should be fine ; ; Many or most people don't have their firmware set things to the state ; they would be in after a power up ; Depends what you are trying to do and what your SW reset needs to do - Bruce ----------------------------------------- WWW.SYSTRONIX.COM Fast 8051s, embedded Java and much more new! 8x1-Wire I/O board for 1-Wire nets +1-801-534-1017 Salt Lake City, USA ----------------------------------------- |