Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need a example using 74LS164 connect to PC RS232

Status
Not open for further replies.

kingsz1

New Member
Hi, my friends. I found the IC 74LS164 can be used for serial to parallel shift. I want to use this IC connect to PC's serial port (RS232/DB9) and control 8 LED on or off. I want to use INT 14H to send the data. Does any friend can give a example how to make this circuit work?
 
kingsz1 said:
Hi, my friends. I found the IC 74LS164 can be used for serial to parallel shift. I want to use this IC connect to PC's serial port (RS232/DB9) and control 8 LED on or off. I want to use INT 14H to send the data. Does any friend can give a example how to make this circuit work?

It's not a good choice, a PC serial port usually sends out at least a 10 bit data word (including one start bit and one stop bit) - you could use an old UART chip to do it, or a PIC makes it even easier - one of my tutorials does exactly what you want!.
 
Perhaps a better choice is to use the PC's parallel port? Hm, now I'm wondering if it's possible to control one data pin. I mean, if you send data to 0x378, the controller will probably send them in parallel.

The PC's RS232 serial port follows a protocol so you must make your external device RS232 compliant.
 
Why not just use the parallell port??

The parallell port have 8 output (5v) and 5 input (5v) and 4 pins(5v) you self can decide if you want them as in or out!

!!!!!!The maximum curent is something like 1-2mA!!!!!!!!

THERE ARE NO PROTECTIONS ON THE PARALLELL-PORT. TRY TO USE A LED AND THE PORT WILL BE BROKEN!!!

The easiest way is to use a opto-switch between the port and the led!!

I use qbasic to control the port and it works perfectly!
 
Nigel Goodwin said:
What do you actually mean by that?.
Thank you, Nigel.
I want to know how INT 14H effect the serial bit/bits, and how to apply INT 14H for control purpose.
And also most devices connect to computer using serial single, I really want to know how a serial single (e.g. RS232) transfer and recieve.

Thank you. Have a nice "Good Friday".
 
kingsz1 said:
Nigel Goodwin said:
What do you actually mean by that?.
Thank you, Nigel.
I want to know how INT 14H effect the serial bit/bits, and how to apply INT 14H for control purpose.
And also most devices connect to computer using serial single, I really want to know how a serial single (e.g. RS232) transfer and recieve.

Are you working in DOS?.
 
kingsz1 said:
Nigel Goodwin said:
Are you working in DOS?.
Yes, Nigel. My work and exercise most under DOS. So I want to use Interrupt for control programming .

It's been a LONGGGGGG! time since I used DOS, but I did write my own Turbo Pascal routines (as a Unit) which I used for many years for all sorts of RS232 interfacing.

As far as I can remember you basically load your data byte into the UART and call an INT routine, it's quite simple to do. The most complicated part is probably the setting up of the port in the first place.

There's nothing much to know about the external interface, the byte you load in the UART is simple sent out (high bit first), preceeded by the specified start bits, and followed by the specified stop bits.

My PIC RS232 tutorial shows you what the diagram looks like.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top