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

USART with external clock

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



Joined: 01 Feb 2012
Posts: 63

View user's profile Send private message

USART with external clock
PostPosted: Wed Feb 01, 2012 7:27 am     Reply with quote

Hello forum. I'm trying to run the USART with a external clock source. Device is 16f88. Any inputs?
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Wed Feb 01, 2012 8:07 am     Reply with quote

the only way to have an "external" clock for the uart is to use an external crystal or oscillator for the PIC itself.

quoting the DATASHEET

Quote:

• Addressable Universal Synchronous
Asynchronous Receiver Transmitter
(AUSART/SCI) with 9-bit address detection:
- RS-232 operation using internal oscillator
(no external crystal required)
maria100



Joined: 01 Feb 2012
Posts: 63

View user's profile Send private message

PostPosted: Wed Feb 01, 2012 8:59 am     Reply with quote

USART..as synchronous mode ..so that i will need to provide the pic a external clk ..along with the i/o line (rx)...
Ttelmah



Joined: 11 Mar 2010
Posts: 19339

View user's profile Send private message

PostPosted: Wed Feb 01, 2012 9:10 am     Reply with quote

He could run as a synchronous receiver or transmitter, which might be what he is talking about.
Only half duplex possible though

Best Wishes
Ttelmah



Joined: 11 Mar 2010
Posts: 19339

View user's profile Send private message

PostPosted: Wed Feb 01, 2012 9:14 am     Reply with quote

I think you would have to set the USART up manually for this (you did when I last looked). Problem is that though sync support is present, it only works on chips that offer full duplex sync, with a separate clock line. Set it up as normal for UART1, async operation, then just turn off bit 7 of TXSTA, and change the TRIS on the TX pin to '1'. Then getc, works as normal.

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