473,473 Members | 2,008 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Serial Port and Library

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.

Jun 14 '06 #1
2 2864
zd******@purdue.edu wrote:
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?
Jun 14 '06 #2

zd******@purdue.edu wrote:
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

Jun 14 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tom Van Ginneken | last post by:
Hi, I need to write binary data to a serial port. I am using this function: #include <unistd.h> ssize_t write(int fd, const void *buf, size_t count); I am able to write a alpha-numeric...
21
by: The Man With The Harmonica | last post by:
Hi All, What kind of commands can I use to control the serial and parallel port of my pc. I want to use my laptop instead of microcontrollers and write my software in ANSI C to be used for...
4
by: M. Raab | last post by:
i have written an application that utilizes serail ports. In order not to have to reinvent code, I decided to use John Hind's sample code that he presented in MSDN magazine last year (Serial Comm:...
7
by: Kevin | last post by:
Hi all I am having a problem reading from a serial port, first of all I have now resorted to using the MSComm ActiveX control on my Windows Forms to provide me with the interface to my serial...
3
by: Swatcat | last post by:
I have a device that send to my computer information by serial com port. The comunication parameters are: PORT: COM 1 Bits per second: 9600 Data bits: 8 Parity: None (0) Stop bits:1 How...
5
by: LongBow | last post by:
Hello, Is there a way, in .NET, to determine what are the avialable Serial (Communications) Ports on a Windows OS and is there a way to determine that port isn't being use other than attempting...
0
by: pauland80 | last post by:
<snip> <snip> Late thanks for your both answers! (Please excuse me for that) The problem was a bug in the device firmware. But before finding this, I dugg lightly in the pyserial source...
0
by: Charles Crawford | last post by:
Hi, This apparently is a common problem and I've yet to read a solution that actually works for my specific situation. I have a Zebra RW220 printer that I connect to via Bluetooth connection...
0
by: =?Utf-8?B?Q2hhcmxpZQ==?= | last post by:
Hi, This apparently is a common problem and I've yet to read a solution that actually works for my specific situation. I have a Zebra RW220 printer that I connect to via Bluetooth connection...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.