Author Topic: Reading a peripheral data from Status Port  (Read 4731 times)

Olakunle

  • Member
  • ***
  • Posts: 17
Reading a peripheral data from Status Port
« on: March 02, 2011, 01:20:01 pm »
Dear sir,
I am trying to read a nibble into the status port.
The gateway laptop am using support output only, ecp, epp and bidirectional modes. I set the port to bidirectional mode.
I am doing a simple status port read of reading a latched data on a 74LS374 latch.control bits of 2 was sent to the control port bit 1 of the control port to be written to the latch enable of the 74LS374 .The problem is that the visual basic 2005 program sometimes reads a correct value on the latch, reads the old value when a new value is present or hang with a value of 255
and refuse to change the value until the system is restarted. what should I do to correct this problem. Thanks. Olakunle

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 2825
    • Lakeview Research
Re: Reading a peripheral data from Status Port
« Reply #1 on: March 02, 2011, 02:40:30 pm »
If you're reading the status port, you can use output only mode, because the status port is always input.

Use a voltmeter or scope to verify the logic levels on the port pins.

Jan