|
| Software ConfigurationTo add ISD51 support to your embedded application, you must: - Copy ISD51.A51 and ISD51.H from the \C51\ISD51 folder into your project folder.
- Add ISD51.A51 to your µVision Project. This source file contains the ISD51 core functions and is required for ISD51 operation.
- Include ISD51.H in the C module that contains the main C function (using #include "ISD51.H").
- Check the configuration settings in ISD51.H and modify them, if necessary, to match your target hardware. The default configuration is suitable for classic 8051 devices with 256 bytes of on-chip DATA/IDATA and a standard 8051-compatible on-chip UART.
- Add serial port and baud rate initialization code for the on-chip UART to your C main function. You may copy this from one of the \KEIL\C51\ISD51\EXAMPLES\ example programs. Note that ISD51 uses interrupts for serial communication. Therefore, your initialization code must enable global interrupts.
- Add the appropriate ISD51 startup function to your C code. You only need to use one of these functions.
- ISDinit: Initializes ISD51 and starts user program. When the µVision Debugger connects, program execution halts.
- ISDwait: Initializes ISD51 and waits until the µVision Debugger connects.
- ISDcheck: Checks to see if the µVision Debugger has connected with the 8051. If so, the ISD51 interrupt is initialized and the commands from µVision are interpreted. If not, program execution continues without enabling the ISD51 interrupt. ISDcheck must be called periodically which you may do in the main loop of your program.
Note Carefully check the settings in ISD51.H to be sure they match your hardware configuration. Several ISD51 example projects are available in the \KEIL\C51\ISD51\EXAMPLES\ folder. These include modified IDS51.H files for use with the following targets. - Generic 8051 Devices.
- Infineon C868 Devices.
- Philips LPC9xx Devices
- Texas Instruments MSC121x Devices.
You may wish to start with the ISD51.H file from one of these projects.
Related Knowledgebase Articles |
|