 | ISD51 User's Guide |  |
|
|
| ISDcheck| Summary |
#include "isd51.h"
void ISDcheck (void);
| | Description | The ISDcheck routine checks to see if the µVision Debugger is trying to connect with the target system. If it is, ISD51 is initialized for communication. If you use ISDcheck to initialize ISD51, your program must periodically invoke it. Note - When invoked, the ISDcheck routine looks for the µVision Debugger signature byte (0xA5) in the serial buffer. If that byte was received serial interrupts are enabled and ISD51 responds to debugger commands. Any value other than (0xA5) is discarded.
- The µVision Debugger initiates communication with ISD51 by repeatedly (every 100ms) sending the signature byte (0xA5). If no response is received from the ISD51 target within 5 seconds, the µVision Debugger reports a communication error. Therefore, calls to ISDcheck should occur at least once every 2-3 seconds.
| | Return Value | None. | | Example |
#include "isd51.h"
void Init_UART (void)
{
T2CON = 0x34; /* Use Timer 2 For Baudrate */
RCAP2H = 0xFF;
RCAP2L = 0xD9; /* 19,230 Baud @ 24MHz */
SCON = 0x50; /* Enable UART */
EA = 1; /* Enable Global Interrupts */
}
void main (void)
{
.
.
.
/*--------------------------------------------
Initialize the 8051 UART.
Then, initialize ISD51.
--------------------------------------------*/
Init_UART ();
ISDinit ();
while (1)
{
/*--------------------------------------------
Check to see if the uVision Debugger started.
--------------------------------------------*/
ISD_check();
.
.
.
}
}
|
|
|