Re: LPT square wave



Thanks a lot. I'll try it.
Regards,
Mike


GM wrote:
<docent@xxxxxxxxx> wrote in message
news:1159949547.624798.43040@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Generating SPI with software using the PC printer port is quite easy,
just follow the timing diagram. The clock doesn't have to be a
conventional square wave, just drive it high and low at the correct
time with the data line held high or low. Connecting a 74HC595 with
LEDs on the outputs to the printer port can be useful when debugging
the software, the 74HC595 is SPI-compatible and makes it easy to see
when you have got it right. I have one mounted on a small PCB with the
LEDs.


Thanks for the answer. Can you tell me is it better to use some kind of
timer or just plain delays?


Plain delays (for example 'for' loops) will be depended on the system speed.
In other words, as an example, the same loop would be faster in a Pentium
than in a 486. In a Windows program that I've coded for programming AVR
chips, I used the High-Performance Timer instead of the plain old Timer that
gives no less than 10ms interval, thus achiving tolerant (from the user's
view) programming speeds
Here is a link on how to use it
http://www.mtsu.edu/~csjudy/directX/HighPerformanceTimer.html


Regards
GM

.



Relevant Pages

  • Re: LPT square wave
    ... timer or just plain delays? ... Plain delays (for example 'for' loops) will be depended on the system speed. ... In a Windows program that I've coded for programming AVR ...
    (sci.electronics.design)
  • Re: 8 bit microcontroller market
    ... You certainly don't need to do those state machines 100% synchronously, ... programming genius to do most of these (but it does take some ... For hardcore realtime apps the is no alternative to assembler yet. ... and a more advanced timer which would idle the CPU until a condition occurs. ...
    (comp.arch.embedded)
  • Re: aeBIOS pc speaker in 32 bit protected mode asm
    ... Programming the Programmable Interrupt Timer should work with either Terrence's code or Mike's 32-bit version, ... Guessing at the age of the original code, I'd bet that 300 is a little short for "duration" on a modern machine. ... The first two hook int 9, ...
    (alt.lang.asm)
  • Re: Linux time code
    ... This is the original IBM PC timer (well, ... by 11932 to generate a 100 Hz timer interrupt. ... does not evenly divide the tick timer. ... the timer interrupt by buggy 8254 programming from user-space. ...
    (Linux-Kernel)