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

[Help] Can cross connect between 2 UART on PIC18F46K22

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



Joined: 25 Aug 2009
Posts: 175

View user's profile Send private message Yahoo Messenger

[Help] Can cross connect between 2 UART on PIC18F46K22
PostPosted: Fri Sep 06, 2013 3:38 am     Reply with quote

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 Smile
_________________
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

View user's profile Send private message

PostPosted: Fri Sep 06, 2013 4:26 am     Reply with quote

Your diagram does not display
tienchuan



Joined: 25 Aug 2009
Posts: 175

View user's profile Send private message Yahoo Messenger

PostPosted: Fri Sep 06, 2013 8:21 pm     Reply with quote

oxo wrote:
Your diagram does not display

i have uploaded diagram into other site, sr u Smile
_________________
Begin Begin Begin !!!
Ttelmah



Joined: 11 Mar 2010
Posts: 19515

View user's profile Send private message

PostPosted: Sat Sep 07, 2013 3:57 am     Reply with quote

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.
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