Using ADC in PIC 16F877 then send signal to computer by parallel cable

Discussion in 'Programmer's Corner' started by chilly, Sep 21, 2008.

  1. chilly

    Thread Starter New Member

    Sep 16, 2008
    7
    0
    Could I use the ADC in PIC 16F877 read the analog input then send this signal to computer by parallel cable?
    Thanks for any suggestion
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  3. chilly

    Thread Starter New Member

    Sep 16, 2008
    7
    0
    After I use ADC in PIC read analog signal then it write the output to PORTC
    I try to connect parallel port to PORTC and then send this signal to computer but it seem nothing can be read from parallel port. Do I have to add something like a buffer between PORTC and parallel port?
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    There is a piece of hardware, the connection between PORTC and the parallel port, and the program running in the uC and that in the computer that all need to be verified.

    Is your cable connected to all the correct pins in the parallel port? You need 8 data lines and their grounds, plus one or two handshake line active. That may be more than PORTC can handle. The link I gave you describes the cabling and the signal timing to read in data to the computer. Do you have the port set at least to Bi-Directional mode?

    When you send data, do the handshake lines also function? Can you verify that the levels change from logic LOW to HIGH?

    Can your computer see any changes on the parallel port pins? Can you pull a pin up to +5 volts and read a HIGH? When you ground it, does it read LOW?
     
  5. chilly

    Thread Starter New Member

    Sep 16, 2008
    7
    0
    Thanks for your hints, Beenthere
    But how can I active the two handshake line?
     
  6. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    You will possibly have to use another port. It might be pretty simple, [lacing the data on PORTC and manipulating the bits in PORTB to handshake.
     
Loading...