Re: LPT square wave
- From: Jonathan Kirwan <jkirwan@xxxxxxxxxxxxxx>
- Date: Tue, 03 Oct 2006 18:20:27 GMT
On 3 Oct 2006 11:13:17 -0700, rpodraza@xxxxxxxxx wrote:
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;
}
Some things cross my mind. Why do you need to generate a clock? Are
you sure the LPT signals on your computer are electrically compatible
with the circuit? Does it have a separate power supply? How precise
do you need this clock? What do you mean by "best way?"
A perfectly good way of generating a clock might very well be
something similar to what you wrote. Why do you exclude it?
(Especially since it may very well be the maximum frequency you can
achieve, in this case.)
Jon
.
- Follow-Ups:
- Re: LPT square wave
- From: rpodraza
- Re: LPT square wave
- References:
- LPT square wave
- From: rpodraza
- LPT square wave
- Prev by Date: Re: terrifying
- Next by Date: Re: PCB design software for Mac?
- Previous by thread: LPT square wave
- Next by thread: Re: LPT square wave
- Index(es):
Relevant Pages
|