Getting More Involved
© PHYTEC Meßtechnik GmbH 2002 L-462e_2
41
3.3
Modifying the Source Code
•
Double-click on Blinky2.c to open it in the source code editor.
•
Locate the following code section. Modify the section shown
below (the values shown in bold and italic) from the original
(10.000) counts to the indicated values:
while (1) { /* loop forever */
P34 = 1; /* Port 3.4 High = LED3 = OFF */
for (i=0; i< 10000; i++) /* delay for 10000 counts */
{
wait (); /* call wait function */
}
P34 = 0; /* Port 3.4 Low = LED3 = ON */
for (i=0; i< 5000; i++) /* delay for 5000 counts */
{
wait(); /* call wait function */
}
}
This will change the LED on/off ratio.