Re: LPT square wave
rpodraza@xxxxxxxxx wrote:
Hi,
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:
Code:
for (;;) {
pin = 0; pin = 1;
}
What's wrong with:
for(;;){
pin = 0;
wait_a_very_precise_amount_of_time();
pin = 1;
wait_a_very_precise_amount_of_time();
}
.
Relevant Pages
- LPT square wave
... microcontroller's SPI via the LPT port. ... I have to generate a clock (SCK) signal on one of the pins of the LPT. ... is the maximum frequency one can obtain? ... (sci.electronics.design) - Re: Log Phone Calls
... It is 25 pin that connects device directly to a printer. ... My mistake in assuming the device connects to LPT port. ... the dot matrix printer LPT port using 12/13 pin cable. ... A quick search shows that SMDR6 uses serial port, not parallel, which is ... (microsoft.public.vb.general.discussion) - Re: help ...!!!
... serious about ya language then i can have ma chance and i can ask question in ma own language from ya .. ... In addition to the absolute maximum frequency measurement limit imposed by the actual hardware, you will be limited by the software that will be running on the micro. ... You will ofcourse require additional logic, such as storing the previous pin value, and then checking the new value to match the old one etc, which will slow down the process. ... Alternatively you may use an interrupt and a timer, you would then need to calculate how long the interrupt takes to execute, and thus how often they can occur without overlapping. ... (comp.dsp) - Re: Log Phone Calls
... the dot matrix printer LPT port using 12/13 pin cable. ... Here is a site that shows the pin layout for LPT and Serial ports: ... Serial ports can use either 9 or 25 pins. ... (microsoft.public.vb.general.discussion) - Controlling RS232 and LPT Port using VB .NET
... I was reading about how to control the COM and LPT port using VB .NET. ... I did found a lot about the RS232 port on the Internet, ... How can i change the power voltage on a pin in the COM Port? ... (microsoft.public.dotnet.languages.vb) |
|