|
|
View previous topic :: View next topic |
Author |
Message |
joev Guest
|
Undefined identifier - SET_UART_SPEED |
Posted: Sun Oct 12, 2008 3:45 pm |
|
|
Hello CCS community:
I hoping somebody can help me with this problem. When I complile with using
Code: | #include <16F87.h>
SET_UART_SPEED(9600); |
I get a compile error "Undefined identifier - SET_UART_SPEED".
When I compile the same program using
Code: | #include <16F628a.h>
SET_UART_SPEED(9600);
| it compiles fine.
Both the pic16f87 and pic16f628a have a UART build in.
I'm using the PCW, PCM V3.224, PCB V3.224.
other relavent code
Code: | #fuses HS,brownout,NOWDT,EC_IO,DEBUG,NOLVP
#use delay(clock=12000000)
#use rs232(baud=1200, bits=8, Parity=N, xmit=PIN_B2, rcv=PIN_B1) |
It seems the definition is missing in 16F87.h .
Any ideas would be appreicated,
thanks, |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Oct 12, 2008 3:52 pm |
|
|
set_uart_speed() only works with the hardware UART.
You need to specify the hardware UART pins for the 16F87 in the
#use rs232() statement. Your statement is using ordinary i/o pins.
Change it to this:
Code: | #use rs232(baud=9600, xmit=PIN_B5, rcv=PIN_B2, ERRORS) |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|