avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] will an avr be fast enough...


From: Curtis Maloney
Subject: Re: [avr-chat] will an avr be fast enough...
Date: Fri, 03 Jun 2005 10:30:07 +1000
User-agent: Debian Thunderbird 1.0.2 (X11/20050331)

Reza Naima wrote:
So, I'm working on a project where I'll be taking data from an MAX1031
16-channel 10-bit SPI based A2D and need to stream the data out via an
infrared link.  The max SPI clock of the MAX1031 is 10mhz, and I need a
sampling rate of around 20khz/channel.  Will any of the AVRs (I know
there's a new small 20mhz one out) be fast enough to read the data, and
a checksum byte, and somehow modulate an IR LED?  The reciever will be
in close proximity, but going through a layer of opaque material.  It
can be configured that minimal outside light reaches the receiver.

FYI - There's also a few Mega series AVRs at 20MHz now.
(I wonder what happened to the 24MHz parts that showed up briefly on the Atmel web site :)

Assuming it takes you 3bytes to issue a "read all channels" request, plus 2bytes per channel, your bandwidth on the SPI is looking like:

20kHz * ( 16channels * 2B reply + 3B request + 1B chk ) = 720KB/s

So, nothing too scary there, so long as you don't need to do masses of processing on the data.

Depending on the modulation scheme you want for your IR, the timers can alleviate a lot of CPU load. If you're wanting to use IRDA, there are cheap external chips that can do the modulation for you, straight from your UART, from people like Microchip, Zilog, and Vishay.

If you haven't decided on your IR scheme, yet, you might want to look at a remote control demodulator on the receiver (like a Sharp IS1U60) which gives a TTL output for the presence/absence of a 38kHz IR signal. Then you can OOK modulate your UART output with a timer pin set to 38kHz.. I don't remember the chip number, but there are some 8ping chips with and gates with driver transistors... ideal for this use.

Of course, my calculations have been wrong before on this list.. :P

--
Curtis Maloney




reply via email to

[Prev in Thread] Current Thread [Next in Thread]