PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue May 26, 2009 1:13 pm |
|
|
The program shown below will display the contents of the 'value' variable.
This is the number that is displayed in the Hyperterminal window on the PC:
Quote: | #include <16F877.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)
//======================================
void main()
{
int16 value;
value = 1234;
printf("%lu", value);
while(1);
} |
|
|