Re: LPT square wave
- From: "GM" <spamthis@xxxxxxxxxxxx>
- Date: Wed, 4 Oct 2006 11:27:41 +0300
<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
.
- Follow-Ups:
- Re: LPT square wave
- From: Jonathan Kirwan
- Re: LPT square wave
- From: docent
- Re: LPT square wave
- References:
- LPT square wave
- From: rpodraza
- Re: LPT square wave
- From: Leon
- Re: LPT square wave
- From: docent
- LPT square wave
- Prev by Date: Re: Voltage regulator instability
- Next by Date: Re: terrifying
- Previous by thread: Re: LPT square wave
- Next by thread: Re: LPT square wave
- Index(es):
Relevant Pages
|