View previous topic :: View next topic |
Author |
Message |
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
Stupid Streams question |
Posted: Fri Oct 14, 2005 8:29 am |
|
|
I have been beating my head against this all morning. In many years of PIC work I have never used streams before. What am I doing wrong?
I have these serial ports
#use RS232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=TTY)
#use RS232(baud=1200, xmit=PIN_B4, rcv=PIN_B4, stream=TXR)
This compiles:
comms = getc(TTY);
This compiles:
printf(__DATE__);
This does not:
printf(TTY, __DATE__);
It reports: Expecting LVALUE such as variable name.....
PCM version 3.104 for the 16F877 _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
drh
Joined: 12 Jul 2004 Posts: 192 Location: Hemet, California USA
|
|
Posted: Fri Oct 14, 2005 8:37 am |
|
|
Use fprintf(). _________________ David |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Fri Oct 14, 2005 8:41 am |
|
|
Ah HA!!!!
Thank you muchly! _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
|