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

UART support 16F1829, compiler v4.124

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



Joined: 27 Aug 2011
Posts: 22
Location: Baltimore, MD

View user's profile Send private message

UART support 16F1829, compiler v4.124
PostPosted: Sat Aug 27, 2011 2:23 pm     Reply with quote

As with many of the smaller PIC processors, the 16F1829 supports Alternative Pin Function... This applies to the EUART, and allows the TX/RX pins to be reassigned.

It would appear that the CCS complier doesn't support pin swapping... When I configure the #USE R232 XMIT and RCV pin designations it apparently fails to configure correctly...In older versions of the compiler it compiles and runs, but appears to use a software UART. On the latest version it simply doesn't run at all.

It's a little frustrating trying to get to the bottom of these issues given that I have no idea what the compiler does to parse the #USE RS232 Statement. I also noticed that there appears to be very limited run-time support... You are supposed to be able to configure the baud rate at run-time, but the compiler threw an exception... What happened to configuring other comm settings like Parity???

Anyone have any suggestions for a work around? I thought that maybe I could set or clear bits in the appropriate control register in the PIC but apparently the compiler doesn't recognize the register names...
Sergeant82d



Joined: 01 Nov 2009
Posts: 55
Location: Central Oklahoma

View user's profile Send private message

PostPosted: Sat Aug 27, 2011 3:38 pm     Reply with quote

As far as setting the register bits, you have to #define the bytes & bits using the datasheet locations yourself. I have been meaning to try #including Microchip's C18 header files, which do define all the registers for direct use, in addition to CCS's, but I have not tried using them both, so I cannot say whether there are conflicts or not.

Sorry, but I cannot comment on the pitfalls of the alternate pin assignments, other than to say that CCS will default to the hardware serial port only for the primary pins, and will use software serial (aka, bit-banging) for any other pins.

HTH
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Aug 27, 2011 4:31 pm     Reply with quote

If you have the full CCS IDE (PCWH, PCWHD), there is a button on the
Device Editor window to make a header file with all the SFR registers
and their addresses. You can then #include the file in your program.
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