Serial Port and Library

Discussion in 'C Programming' started by zdicklin@purdue.edu, Jun 14, 2006.

  1. Guest

    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, 2006
    #1
    1. Advertising

  2. Neil Guest

    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?
    Neil, Jun 14, 2006
    #2
    1. Advertising

  3. Srikanth Guest

    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
    Srikanth, Jun 14, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VGRhclRkYXI=?=

    asp.net 2 page and serial port

    =?Utf-8?B?VGRhclRkYXI=?=, Jan 23, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,321
    Yunus Emre ALPĂ–ZEN [MVP]
    Jan 23, 2006
  2. Sumit
    Replies:
    0
    Views:
    664
    Sumit
    Jul 26, 2003
  3. Pom
    Replies:
    2
    Views:
    1,649
    Bas-i
    Jan 31, 2007
  4. Max Kotasek
    Replies:
    4
    Views:
    978
    Max Kotasek
    Apr 9, 2010
  5. msalerno
    Replies:
    3
    Views:
    409
    Ilmari Karonen
    Jul 14, 2005
Loading...

Share This Page