-----Original Message-----
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Jim Wagner
Sent: Monday, September 15, 2008 9:49 PM
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] SPI Chip select question.
On Sep 15, 2008, at 6:26 PM, Stevej wrote:
> I am new to this list, and new to the AVR processors, but not new to
> imbedded computers.
>
> I will be using an AtMega128 in a project and want to use the SPI to
> drive a
> quad D/A converter (the MAX537) and a couple of DDS chip (the
> AD9834). I
> want to use PB 6 and 7 to do the selecting of which SPI slave I want
> to use
> by rerouting the SS line to the appropriate slave chip. I know I can
> do
> this with discrete logic, but does anyone know of a really slick way
> of
> doing this with minimal parts count? I want to use the two PB lines
> to be
> able to eventually select one of 4 slave chips.
>
> I will be using CVAVR to do the programming.
>
> Thanks for your input. Any advice will be appreciated.
>
> Steve Jacobson
>
>
>
What I do is forget about the SS pin. It is really for use as an
enable input as a slave.
I also use a 3->8 (active low output) decoder. Reserve one output for
nothing enabled. That leaves you seven pins for slave enables at a
cost of 3 port pins. You can probably get them as SO-16 (3 in, 10 out,
enable in, 2 supply pins) so they are not big, don't take much power,
and easy to use.
Jim Wagner
Oregon Research Electronics
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links