Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

How to implement a SYNCHRONOUS RS232 link using microcontrollers?

Status
Not open for further replies.

doragasu

Newbie level 3
Newbie level 3
Joined
Aug 31, 2010
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,319
I have been asked to implement a synchronous RS232 link. I have been reading documentation (googling and reading V.24 ITU-T recommendation), and I'm a bit confused about what I have to do.

If I understood correctly:

Both TX and RX signals are synchronized using:
a) either two different clock signals (one for TX, other for RX, both sent by the DCE to the DTE). These signals change at the same time RX/TX changes;
b) Or a single clock signal sent from the DTE to the DCE. This clock signal changes when the transmitted/received bit is at half its duration.

If option b) is used, option a) cannot be used and vice versa, right? I'm a bit confused about this.

Also when using option a), I suppose this can be implemented using two SPI ports (with level shifters), right? If this is the case, and I decide to use e.g. a PIC18F97J94, what would be the difference between using two of its MSSP ports (SPI mode) and using two of its EUSART modules? Isn't the protocol exactly the same?
 

if you are using a PIC18F97J94 it has 4 USART modules, see section 21.0 ENHANCED UNIVERSAL SYNCHRONOUS ASYNCHRONOUS RECEIVER TRANSMITTER (EUSART) of the device data sheet
**broken link removed**

also have a look at the USART code examples
**broken link removed**
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top