Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Thread Tools Display Modes
Old 29th March 2005, 06:23 PM   (permalink)
Default Serial to Parallel

I want to take data from a serial port and make the output parallel.

I want to use serial because it is more portable, and data can be carried longer distances.

I have tried using a shift register (74HCT164) with a counter (4040), but they dont work because I have to make my own clock equal to the speed of the outgoing data. I have tried wiring a octal D flip-flop (74HCT373) into a shift register, because it isn't edge triggered. The problem is that the flip flop seems to be alot faster than the serial port data.

So what I want to do is somehow obtain only 8 bits from a serial port, the moment it is ready to send data. As soon as 8 bits are received (doesn't matter if they are 0 or 1), I want the clock pin to be disabled.

Here's an example.

Say that the serial port output is something like this and assume that the first bit outputted is shown on the right (lsb):

101011001100111100000

Now what I want is the first 8 bits since I'm only wanting to send an 8-bit ascii character as output.

so we take: 11100000

The rest of the bits are garbage until the serial port is ready to send a new character.

I want to avoid making a clock based circuit, and I want the circuit to run at serial port speed.

Please help me.
mstechca is offline  
Reply With Quote
Old 29th March 2005, 08:22 PM   (permalink)
Default

The UART on a PIC or AVR would be a simple solution for this if you have some experience with microcontrollers, or wouldn't mind taking the time to learn.

There are also stand alone IC's that are nothing but UART's. I have no experience with them, but I'd suggest it as a jumping off point for converting parallel to serial.

It's going to be extremely hard to make something without a clock... however, with a few switches you could make something that will switch the baudrate in the circuit.
plot is offline  
Reply With Quote
Old 29th March 2005, 08:29 PM   (permalink)
Default

If you are taking the output of a serial port from your computer, and converting it to parallel, the obvious way is to use a UART.

You WILL NEED a clock to get the bit timing correct.

Have you considered the start and stop bits of the RS232? The UART will strip those off for you.

Where are all those bits after the first eight which you want coming from? How is your circuit to know which bits of a random stream you want to use?

JimB

edited for spelling
JimB is offline  
Reply With Quote
Old 29th March 2005, 08:32 PM   (permalink)
Default

Plot

You beat me to it! I think we said just about the same thing.

Great minds think alike! (Or is it that fools seldom differ? I never could decide!)

JimB
JimB is offline  
Reply With Quote
Old 29th March 2005, 08:36 PM   (permalink)
Default

Because each ascii character is 8 bits, I consider the rest garbage if I only want to send one character.

alright, If I have to use a clock, I will. What is the best frequency to set the clock at if the speed of the data through the serial port is variable?

I was thinking of using a counter and a shift register. As soon as the counter reaches 8 (bit 3 is set) the output from the parallel shift register is frozen. The question is, what is the best way to accomplish this?
mstechca is offline  
Reply With Quote
Old 29th March 2005, 08:37 PM   (permalink)
Default

delete this post, but not the one above please. Internet explorer is screwing me up.
mstechca is offline  
Reply With Quote
Old 30th March 2005, 04:40 AM   (permalink)
Default

Quote:
Originally Posted by mstechca
Because each ascii character is 8 bits, I consider the rest garbage if I only want to send one character.

alright, If I have to use a clock, I will. What is the best frequency to set the clock at if the speed of the data through the serial port is variable?

I was thinking of using a counter and a shift register. As soon as the counter reaches 8 (bit 3 is set) the output from the parallel shift register is frozen. The question is, what is the best way to accomplish this?
As already explained, you need a UART, RS232 is 10 bit, not 8 bit, as it's an asyncronous format with start and stop bits. So you can't do it with a simple shift register and clock.

You need either a standalone UART, see http://www.intersil.com/cda/devicein...2,00.html#data for details of one commonly used in the past, or use a PIC to do the job in a single small chip - the 18 pin 16F628 would make the job easy.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 10:06 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.