I'm trying to write a program in C++ to communicate with an AVR microcontroller's SPI via the LPT port.
I have to generate a clock (SCK) signal on one of the pins of the LPT. I am using the WinIO library. I'd like to have way to create a square wave of a given frequency (within some limit of course).
My question is: what is the best way to generate such signal and what is the maximum frequency one can obtain? Excluding of course such code:
take into consideration the dirextion of the port u r using.
For LPT port, u have to setup the port mode in the Motherboard setup section. Use the (Standard) port type as it will set the data port to O/P by default. This port is located at pins (2,3,...,8,9) in the DB25F parallel port, which corresponds to (D0, D1, ..., D7, D8) bits directly.
I think it is possible to produce some kHz square wave on LPT. It also heavily depends on driver used. Old DOS aplications, that can directly access LPT, are faster.