PDA

View Full Version : RS-232 async to sync converter



jmartin
- 11th October 2005, 19:22
I am looking into trying to build a converter that will take 38400 baud async serial data and convert it to 38400 baud sync serial data. This is a directional converter (it only receives async and transmits sync). My thoughts were to use a MAX3235 RS-232/TTL converter and tie the receive and transmit TTL lines together to pass the data thru. I would tap into the TTL line with a PIC (thinking about a 16F628) and generate a clock signal that would be fed to the second TTL-232 converter in the MAX3235. This would (hopefully) generate a clock pulse every time a serial bit is received.

I looked into using HSERIN, but it seems that this command, along with all the other serial commands, will end up dealing with bytes and I need to deal with bits (one bit, one clock pulse). Does anyone have any ideas here? I have very little (none, actually) experience with assembly.

Melanie
- 11th October 2005, 23:04
The 16F628's USART will happilly transmit Serial Synchronous for you in background, whilst you're receiving Asynchronous in foreground. Look at the Datasheet... it will generate the Synchronous Clock stream for you too. If you chose a PIC with two USARTs, you can have one receiving Async, and the other transmitting Sync with really minimal code beyond initialising the registers. Pick up Data from one register, drop it into the next... how difficult can it get? Async (Receive) is always slower than Sync (Transmit) at the same baud rate so you will never get a situation where you have to buffer data.