Serial Port and Library

Z

zdicklin

I am working on a very simple hardware project and would like to
develop serial port controls, but I'm having a little bit of trouble
starting out. The project is the following:

I have built an LED lamp with 8 seperate light-up sections controlled
by a PLD. Each time the PLD clocks, it assigns the value of an input
(either high or low) to one of the output pins (0 through 7), and
subsequently controls the lamp.

I would like my program to set these segments with the serial port,
which means I need to send a clock signal and a single bit of data,
either high or low, to the PLD. However, all the information I can seem
to find online about the serial port and C is about large data and file
transfers. Any suggestions? I have never programmed with hardware
before.
 
N

Neil

I am working on a very simple hardware project and would like to
develop serial port controls, but I'm having a little bit of trouble
starting out. The project is the following:

I have built an LED lamp with 8 seperate light-up sections controlled
by a PLD. Each time the PLD clocks, it assigns the value of an input
(either high or low) to one of the output pins (0 through 7), and
subsequently controls the lamp.

I would like my program to set these segments with the serial port,
which means I need to send a clock signal and a single bit of data,
either high or low, to the PLD. However, all the information I can seem
to find online about the serial port and C is about large data and file
transfers. Any suggestions? I have never programmed with hardware
before.

First - you are in the wrong group. Try Comp.arch.embedded

Second - Serial as in RS232, SPI, I2C, clocked Data to a shift Register.
What are you talking with a PC? an AVR or PIC?
 
S

Srikanth

I am working on a very simple hardware project and would like to
develop serial port controls, but I'm having a little bit of trouble
starting out. The project is the following:

I have built an LED lamp with 8 seperate light-up sections controlled
by a PLD. Each time the PLD clocks, it assigns the value of an input
(either high or low) to one of the output pins (0 through 7), and
subsequently controls the lamp.
I hope the PLD is controlled by an intelligent device( a processor ).
I would like my program to set these segments with the serial port,
which means I need to send a clock signal and a single bit of data,
either high or low, to the PLD. However, all the information I can seem
to find online about the serial port and C is about large data and file
transfers. Any suggestions? I have never programmed with hardware
before.
In that case.., check out if that particular processor has a built in
serial port? you could program the serial port parameters to suit your
requirement.In case if you dont find a serial port., you could use the
general purpose lines to send data and clock. You could use., say
general purpose 1 line to send a clock and general purpose line 2 to
send data
which could be sampled wrt the clock sent by you.
Another method I think is to have a address decdoing logic, if you have
a address-data interface to the PLD., you could assign a unique address
to each of the LED and on that particular address you could
enable/disable the LED.
If could explain the setup clearly.., you really have more chance of
getting help.
Regards,
Srikanth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top