parallel port output question..
parallel port output question..
(OP)
I've connected a led to my parallel port and programmed it to turn on and off.. but how do I do if I want to send say 0xff to pin nr 8 and no more?
Because when I turn on the led with outportb(0x378,0xff) I guess that the port starts to output a stream with 1 untill i turn it of.. or?
Because when I turn on the led with outportb(0x378,0xff) I guess that the port starts to output a stream with 1 untill i turn it of.. or?





RE: parallel port output question..
RE: parallel port output question..
RE: parallel port output question..
RE: parallel port output question..
and the problem I have is to send that command to a specific I dont realy get it...
I use the command outportb(0x378,?) but what should I place on the ? if I like to send say 33h to pin 8?
RE: parallel port output question..
RE: parallel port output question..
Pin 8 is related to bit 6 of the data register. As the name said, it is a bit not a byte. So if you want to send 33h to this pin outportb(0x378, 0x80), you must send it one bit per one bit or in other words serially, of course with delay time between bit. But if you really want to do so, then why you do not use the serial port??!
cheers
RE: parallel port output question..
would it work to send a bit with outbportb and then recieve it with inportb?
RE: parallel port output question..
You should make this step :
- set the write modus
- send data to pin 8 = outportb(0x378, 0x80)
- set the read modus (this doesn't change the status of
the data registers)
- read data from pin 6 = inportb(0x378, 0x20)
recall, pin 10 is conducted to status register !!
regards