User manual

Table Of Contents
PICDEM
TM
Lab Development Board User’s Guide
DS41369A-page 80 © 2009 Microchip Technology Inc.
EXAMPLE 5-2: DELAY_1MS() CODE FOR ADC LAB 1
3. Copy/paste the code in Example 5-3 into the Initialize() section labeled:
//ADD INITIALIZE CODE HERE
/*---------------------------------------------------------
Subroutine: Delay_1mS
Parameters: none
Returns:nothing
Synopsys:Creates a 1mS delay when called
---------------------------------------------------------*/
void Delay_1mS(void)
{
unsigned int delay_var = 98;
//Keep looping until the delay_var is
// equal to zero (should take 1mS)
while(--delay_var);
}