CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Undefined identifier - SET_UART_SPEED

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
joev
Guest







Undefined identifier - SET_UART_SPEED
PostPosted: Sun Oct 12, 2008 3:45 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Oct 12, 2008 3:52 pm     Reply with quote

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)
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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