Re: Interface Buses

Brian Dean <[email protected]> Sun, 19 Oct 2003 23:56:38 -0400
Newsgroups gmane.comp.hardware.avr.general
Message-ID <[email protected]>
On Sun, Oct 19, 2003 at 11:46:10PM +0100, D I Freeman wrote:

> I have an AVR chip, and I want to interface a number of sensors to
> it, using some sort of bus, now the SPI bus springs to mind, but I
> am not sure if its possible to have n number of devices connected to
> it, and to read the data from each one?
>
> Can anyone advise on how best to do this? I would prefer to use
> standard buses where possible.

Which AVR?  Does it have hardware I2C?  If so, that'd be my first
choice if your sensors are close to the processors.  You've got
relatively high speed, easy interface, built-in support for it.

If your distances are farther or the environment very noisy, I'd
seriously look at RS485 - interface chips are less than a buck and you
can use the on-board UART to send and receive data through it,
essentially multidrop RS232.
 
Cheers,
-Brian
--
Brian Dean, [email protected]
BDMICRO - Maker of the MAVRIC ATmega128 Dev Board
http://www.bdmicro.com/