View previous topic :: View next topic |
Author |
Message |
maria100
Joined: 01 Feb 2012 Posts: 63
|
USART with external clock |
Posted: Wed Feb 01, 2012 7:27 am |
|
|
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
|
|
Posted: Wed Feb 01, 2012 8:07 am |
|
|
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
|
|
Posted: Wed Feb 01, 2012 8:59 am |
|
|
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: 19515
|
|
Posted: Wed Feb 01, 2012 9:10 am |
|
|
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: 19515
|
|
Posted: Wed Feb 01, 2012 9:14 am |
|
|
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 |
|
|
|