View previous topic :: View next topic |
Author |
Message |
tienchuan
Joined: 25 Aug 2009 Posts: 175
|
[Help] Can cross connect between 2 UART on PIC18F46K22 |
Posted: Fri Sep 06, 2013 3:38 am |
|
|
Hi all
I'm have a problem when trying to connected cross between 2 UART of PIC18F46K22 ( PIC1) , with other UART of PIC18f4680( PIC2).
My purpose is after init , PIC2 will be connected with PIC 1 by UART2 ( PIC2 will send command to PIC1 to control PIC1 switch to use UART1 )
here is block diagram of my circuit:
Can I connected with before block diagram?
Thanks all _________________ Begin Begin Begin !!!
Last edited by tienchuan on Fri Sep 06, 2013 8:22 pm; edited 1 time in total |
|
|
oxo
Joined: 13 Nov 2012 Posts: 219 Location: France
|
|
Posted: Fri Sep 06, 2013 4:26 am |
|
|
Your diagram does not display |
|
|
tienchuan
Joined: 25 Aug 2009 Posts: 175
|
|
Posted: Fri Sep 06, 2013 8:21 pm |
|
|
oxo wrote: | Your diagram does not display |
i have uploaded diagram into other site, sr u _________________ Begin Begin Begin !!! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Sat Sep 07, 2013 3:57 am |
|
|
Doesn't really make very much sense.
The left hand chip is really only going to be able to talk 'to itself'.
Two TX lines connected to the same point=clash.
If you want to reverse the communication after wake up, and have the left hand chip send data to the right hand, then wire the right hand chip the other way round (so it's RX is fed from the left hand chip's TX). Then don't use the hardware UART, but a _software_ UART to 'send' the initial commands, then turn on the hardware UART to receive.
Similarly on the left hand chip, leave the upper UART turned off (look at setup_uart(FALSE);), and only once the command is received, wait a moment, then enable it.
If doing 'two jobs', _always_ use the hardware for receive. |
|
|
|