| ??? 11/09/03 15:44 Read: times |
#58137 - RE: Problem/doubt on Keil C51 compiler Responding to: ???'s previous message |
You gave to make your own startup.A51 and then include it in your project so that the linker uses it instead of going to the library to get the standard startup routine.
The C compiler automatically arranges for there to be code at address zero that LJMPs to the routines in the STARTUP.A51. From there the startup initialization is completed and a jump is made to the main() entry point in C. The standard C_START-UP source code is setup with a number of optional switches so that the code will compile with various initializations turned on or off. You can add crucial code in there too if you want to have some early init done. Of course this stuff is described way better in the Keil knowlwdgebase articles which you can printout from the Keil web site. ----------- Last observations...... You seem very concerned that certain code you have made has to start so soon after RESET. It seems like you must be thinking that some hardware thing attached to your microcontroller has to be setup properly soon after power-on so that things work correctly. It is really not possible that after power on the code can be running instantly, whether that be the C startup code or code you made. There is a delay involved that includes the times for power to rise up, the oscillator to start running, and the width of the reset pulse. After this delay if there is something waiting to be initialized by the program what is the critical nature that wcan not wait just a little longer? If there was possibility of damage occuring to some part it probably has already been done even before end of reset. On the other hand if you were trying to make some system wherein you were trying to use the power down mode of the 51/52 and were trying to "wake" up from a key press or some other external event, then you still have the delay of the oscillator restarting which itself with some crystals could be many many many milliseconds. I would suggest if this is the nature of what you are trying then you may want to investigate the nature of "recovery from power down". There are some derivatives that provide very good power characteristics in the IDLE mode and are able to recover from IDLE via an interrupt as opposed to a RESET. This way be a better way for you to get an instant ON capability because then the code can literally start running right away!!! Michael Karas |
| Topic | Author | Date |
| Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 | |
| RE: Problem/doubt on Keil C51 compiler | 01/01/70 00:00 |



