Re: LPT square wave



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
.



Relevant Pages

  • Re: Now on 8.2.03i Re: Xilinx ISE ver 8.2.02i is optimizing away and removing "redundant" logic -
    ... "input setup/hold time" is the time required before a clock edge to ... Setup time is the time for the signal to be stable prior to ... live in isolation it is connected to outside devices that may have timing ... the calling module and in the signals used in the submodule. ...
    (comp.arch.fpga)
  • Re: SPI unterminated
    ... the plan is to run the SPI signal ... I would put a series resistor at the clock driver (there is ... You may want to put ground pins adjacent to the clock pin to ... But if you would rather be safe than sorry, or if the signals are going ...
    (sci.electronics.design)
  • Re: Newbie question about Wait for X and ModelSim
    ... Just to confirm the reason why I wanted to included a time delay. ... was modelling in VHDL a buffered sampled input bit to an output bit. ... The input sample is taken on the rising edge of a clock signal and the ... learning step was to move these signals from pins to internal signals ...
    (comp.lang.vhdl)
  • Re: Antenna for receiving WWV/10MHz: am I asking too much?
    ... It's hard to tell exactly how much the clock is off by. ... WWV" it calculates and saves an ... Frank McKenney, McKenney Associates ... signals can be used to calibrate it occasionally. ...
    (rec.radio.amateur.antenna)
  • Re: Image Sensor Interface.
    ... the READOUT clock is 40MHz. ... Is this a raw sensor chip that you have? ... Do you get explicit frame and line synch signals from the ...
    (comp.arch.fpga)

Quantcast