serial led button control

Thread Starter

seesoe

Joined Dec 7, 2008
99
hello im designing a full online ordering system. so far a user places an order online and it gets sent through a tcp socket to a server at the store, then a program i wrote will phrase your order to your receipt and print it on a serial thermal printer.

all the computer side programing was done by me in autoit, with printing udf.
in the past i have designed a gps program using their serial port udf.

this time around i want to use their serial port udf to display status and input user feedback.

i was looking at this for an example

basically i need to be able to turn on and off 10 led's 2 being normal led's and the other 8 are really 4 led's but bicolor(each color probably in parallel?), and i also need 3 momentary push buttons to send like a bit or something back to the computer so i can acknowledge a pressed button.

im not sure where to start, if anyone has any suggestion on design or parts to use or something please post it.

any information would be greatly appropriated, thank you.:)
cheers
seesoe
 
Last edited:

thatoneguy

Joined Feb 19, 2009
6,359
The schematic posted doesn't use any IC's, only switches and LEDs.

There isn't an easy method without a full UART to encode the kepresses into a proper packet of data.

Do you understand the signals that make up an RS-232 interface?
 

thatoneguy

Joined Feb 19, 2009
6,359
That doesn't use any of the Rx/Tx (serial data) lines, only the serial control lines.

Software would need to be written to match, so if you have the control listed on that page, you could run what is shown on that page.

Anything else would require software.

Often Digital I/O from a PC without extra ICs is done through the parallel port, the coding is simpler, and more inputs and outputs are available.

The other option would be a microcontroller running the code that talks to the host computer, then sends data to the printer, and handles the physical user interface (buttons and LEDs).
 

Thread Starter

seesoe

Joined Dec 7, 2008
99
i wanted to use parallel port, however my cable is about 30 maybe 40 feet long.

according to the serial pinout there are only 3 outputs on the serial port, 3, 4, 7.
in the schematics i posted in post 2, the first led on pin 5 is just a status led for power, and the second led on pin 7, which can be controlled as a normal accessory led to do what you want form their software. i need both those led's, the output pins now used are 7 and 4, can't i hook an led to pin 3 like the led on pin 7, like i showed in post 2 on the right?
 

trixheim

Joined Apr 1, 2009
10
It's possible to use the inputs and outputs of the RS232 port to control digital IC's if you know how to write the software and know how to translate the electrical levels to standard digital levels. You can connect the port to a shift register and use one output to shift bits with the clock, one output as data out and one output as parallel load command (if you want to read data). One RS232 input is connected to the last output of the shift register so you can read one bit each time you clock. If you are controlling LED indicators to be read by human, it's no problem to clock data so fast that you can't se the bit pattern moving when you fill up the register (and reading data). Shift registers can be chained together, so they can be as long as you need.
 

Thread Starter

seesoe

Joined Dec 7, 2008
99
i dont know any of that, sounds complex...
is there a way to put some sort of amp in a cable for a long parallel cable?
 

thatoneguy

Joined Feb 19, 2009
6,359
The limit on parallel cable length is for high speed data transfer. For your application, the timing isn't an issue. When sending signals at over 2Mhz (ECP Printer), the length of cable runs is limited.

Hobby CNC applications using the parallel port often use 20 foot runs for data transfer at lower rates.

Another option is to simply use Ethernet. For $70, you can control 32 I/O ports, 12 analog inputs, and an RS-232, up to 200 meters away with a PIC Ethernet Dev Board

--ETA: Talk to a PIC on the web through this link: http://203.171.96.206/
If invalid, jump page is Here
 

Thread Starter

seesoe

Joined Dec 7, 2008
99
does that board allow serial and parallel devices at the same time?

how can i accomplish this project now with a parallel port?
control 10 led's, 2 normal and 8 that are really 4 bicolored led's, and 3 momentary push buttons?
 

Thread Starter

seesoe

Joined Dec 7, 2008
99
scrap everything we talked about about making my own schismatics and program.

im going to be using http://www.winamp.com/plugins/details/92855

the program can be set to run not only winamp functions but open other programs and simulate keyboard button presses.



now my only issue is the led's,

the schismatic shows 2 led's one can be controlled and the other is just a power led pulling power from the port i think.

how can i change the single led to an led array?
 
Top