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 CCS Technical Support

Secondary uart on pic 18F46k80

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



Joined: 20 Jun 2008
Posts: 14

View user's profile Send private message

Secondary uart on pic 18F46k80
PostPosted: Tue Jan 14, 2014 1:30 am     Reply with quote

Hello folks
I hope that this messages will be not a copy of an existing post but I do not discover nothing with the search tool.

I'm looking for an example on the pic in object that show me how to configure and use the two uarts. I mean how to switch from 1 to 2 example to send a easy printf.

Thank you in advance
mm
Ttelmah



Joined: 11 Mar 2010
Posts: 19520

View user's profile Send private message

PostPosted: Tue Jan 14, 2014 2:15 am     Reply with quote

Look at EX_XTEA.c, which shows how to read data from one port, and send it on another.
Key point is the use of fprintf/fputc/fgetc, and stream identifiers.
In your case it is simpler than on many chips, since the pins are fixed (the threads covering this, often deal with chips with UART's that can be 'relocated' to different pins), so there is the added complexity of using SELECT to locate the UART before using it..
A search here on 'streams', will find a lot of threads about this.

Best Wishes
mhz1575



Joined: 20 Jun 2008
Posts: 14

View user's profile Send private message

PostPosted: Thu Jan 16, 2014 1:42 pm     Reply with quote

Hi Ttelmah
Thank you for your informations, now it's clear.

Best regards
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