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

Synchronous RS232 communication.

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








Synchronous RS232 communication.
PostPosted: Wed Dec 22, 2004 6:15 am     Reply with quote

Hello,

Why doesn't the CCS compiler support syncrhounos transmission, like half-duplex?

Greetings
Joris
Ttelmah
Guest







Re: Synchronous RS232 communication.
PostPosted: Wed Dec 22, 2004 10:00 am     Reply with quote

Anonymous wrote:
Hello,

Why doesn't the CCS compiler support syncrhounos transmission, like half-duplex?

Greetings
Joris

Half duplex, and synchronous, are two very different things. Half duplex, purely implies that communcation is only in one direction at a time, and is commonly used on interfaces like RS485, with just one 'set' of signal wires, and only down to handling the timings of the transmission, and the control of the data direction pins on the transceivers, to reverse the bus direction as needed. Synchronous, can be either full duplex, or half duplex, but the USART in the PIC, only supports half-duplex. You can use the normal serial code in CCS, to drive, or receive from a half-duplex synchronous bus, using the USART, all you have to do, is manually set the 'SYNC' bit of the USART, and the CSRC bit to control the direction. Again, since this is a half-duplex mode, you need to control the direction control lines for the transceiver. remember also that you have a seperate synchronous bus available in the SPI, and depending on the nature of the other devices connected, this may be the 'better' peripheral to use. This allows duplex transmission/reception.

Best Wishes
LytseFlap



Joined: 22 Dec 2004
Posts: 6
Location: Leeuwarden

View user's profile Send private message

PostPosted: Fri Dec 24, 2004 2:46 am     Reply with quote

Guest is me.

The syncrhonous communication is als used for communication between microcontrollers. In this case with a joystick/power module of a wheelchair from Penny & Giles' Pillot+ system. In this case syncrhonous transmission is possible for RS232.

There's one difference betwee synchronous an asynchronous. The values of the stopbit and startbit are inverted!

And I'm very decadent. I use the CCS compiler to make quick a solution and polish the code up with registers and sometime assembley (in case of low memory, putc() easily puts a value three time on a stack). So in this case it was time saving for me that the CCS-C code could setup a Odd-parity synchronous transmission for me.

A real engineer never spoils time, but learns from it. ;)
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