phyCORE-P87C591 QuickStart Instructions
38
© PHYTEC Meßtechnik GmbH 2002 L-586e_2
3.3
Modifying the Source Code
•
The source file blinky2.c is now open within the RIDE editor. If
you closed the file, double click on the reference inside the project
tree.
•
Locate the following code section. Modify the section shown
below (the values shown in bold and italic font) from the original
counts to the indicated values:
while (1) /* loop forever */
{
LED = LED & 0xFE; /* output over PD port to LED D3 */
/* Bit 1 of port PD = LED D3 = off*/
for (i=0; i<
30000
; i++) /* delay for 30000 counts */
{
wait (); /* call wait function */
}
LED = LED | 0x01; /* output over PD port to LED D3 */
/* Bit 1 of port PD = LED D3 = on */
for (i=0; i<
40000
; i++) /* delay for 40000 counts */
{
wait (); /* call wait function */
}
} /* end of while(1) */
} /* EOF */
This will change the LED on/off ratio.
3.4
Saving the Modifications
•
Save the modified file by choosing File|Save or by clicking the
Save icon .
Summary of Contents for phyCORE-P87C591
Page 14: ...phyCORE P87C591 QuickStart Instructions 10 PHYTEC Me technik GmbH 2002 L 586e_2...
Page 36: ...phyCORE P87C591 QuickStart Instructions 32 PHYTEC Me technik GmbH 2002 L 586e_2...
Page 52: ...phyCORE P87C591 QuickStart Instructions 48 PHYTEC Me technik GmbH 2002 L 586e_2...
Page 84: ...Published by PHYTEC Me technik GmbH 2002 Ordering No L 586e_2 Printed in Germany...