Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

multiserial port connection

Status
Not open for further replies.

engineer23

Newbie level 3
Joined
Jun 16, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,302
Hi there,
can anyone help me? I want to connect two serial port to pic18f452 , I mean that i want to connect GSM modem and a digital camera (μCAM) and both of them need serial port but as you know that pic18 is able to connect with one serial port only!!
 

bohumilfulin

Member level 3
Joined
Feb 10, 2005
Messages
67
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,288
Activity points
399
try to think
1. as second serial port use any pins and do it by FW. not so bad I have been using it up to 57600B
2. use HW separator like 4066, ... exists many ways how to do it.
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,181
Helped
1,141
Reputation
2,301
Reaction score
1,116
Trophy points
1,403
Location
Brazil
Activity points
53,328
I already used one UART of uC to receive 2 RX from external deveices, separated by 2 Diodes.
However there are some constraints :

>> Both devices must communicate at same Baud rate.
>> This topology works just for receiving data, not to transmit.
>> Firmware is responsible to identify incomming data and detect (CRC / Checksum) if were received simultaneously.

+++
 

engineer23

Newbie level 3
Joined
Jun 16, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,302
try to think
1. as second serial port use any pins and do it by FW. not so bad I have been using it up to 57600B
2. use HW separator like 4066, ... exists many ways how to do it.


would you explain more please?!:roll::oops:
what do you mean by separator like 4066?
 

alexxx

Advanced Member level 4
Joined
Apr 17, 2011
Messages
1,013
Helped
273
Reputation
552
Reaction score
270
Trophy points
1,383
Location
Greece
Activity points
7,938
engineer23 said:
what do you mean by separator like 4066?
Take a look at this link:
Three-state logic - Wikipedia, the free encyclopedia

Also I could suggest 74126, I have used it in the past for the same reason.

But anyway, if both devices are attempting to send at the same time and you have no control of it, then it is better to use an MCU with a second serial port. If you have control of the timing, then it is OK to go on with controled buffers, or diodes, or even simple resistors (but with a proper Ohm value).
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,181
Helped
1,141
Reputation
2,301
Reaction score
1,116
Trophy points
1,403
Location
Brazil
Activity points
53,328
would you explain more please?
You did not explained what C compiler are using.
However, some ones have ready-to-use APIs wich performs that feature and you can select even built-in UART module (hardware) or handshake I/O pins (firmware).

+++
 

engineer23

Newbie level 3
Joined
Jun 16, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,302
You did not explained what C compiler are using.
However, some ones have ready-to-use APIs wich performs that feature and you can select even built-in UART module (hardware) or handshake I/O pins (firmware).

+++
I am using MikroC compiler .. it seems the idea is not clear the camera and GSM will not operate together, the camera will first capture an image and transmit it to the PIC then the pic will send the image using the GSM modem to an external mobile device ... i thought of using a multiplexer at TX of PIC and demultiplexer at RX of the PIC with the control signal of each connected to a pin .. what do you guyz think ??
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,181
Helped
1,141
Reputation
2,301
Reaction score
1,116
Trophy points
1,403
Location
Brazil
Activity points
53,328
...the camera and GSM will not operate together... the camera will first capture an image and transmit it to the PIC...then the pic will send the image using the GSM modem to an external mobile device ...
The working you described means that is not necessary both devices communicate simultaneously to microcontroler.
Once this means a time multiplexing control, the switch sugested by bohumiffulin may fit what you need.

+++
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top