Using SPI to communicate between two different slaves

Status
Not open for further replies.

Hawaslsh

Full Member level 3
Joined
Mar 13, 2015
Messages
171
Helped
5
Reputation
10
Reaction score
7
Trophy points
1,298
Location
Washington DC, USA
Activity points
3,527
Hello,



I am using two ADF4351 to create some reference signals and I need to combine them onto a single board. Up till now I've been using a really great library that makes interfacing with a single chip a breeze. To summarize, the atemga uses SPI to communicate with the adf4351 using a clock, data, and SS(LE as analog devices defines in datasheet).
However, now i want to use one atmega328 to write to two adf4351s. Is it going to be as simple as having a separate SS for each adf4351? And i can route all other programming lines in parallel between the two adf4351?

The datasheet says "Data is clocked into the 32-bit shift register on each rising edge of CLK.... Data is transferred from the shift register to one of six latches on the rising edge of LE. "

I saw some previous posts on this subject, but didn't get a clear understanding of the answer,
Thanks in advance
 

Hi,

to avoid confusion I recommend to use the names like in the datasheet. I.e.: use "LE" instead of "SS" atn the ADFxxx symbol.

Your wiring is correct.

at the ATMega software you just need to take care about the additional SS signal.
If you are able to communicate with one ADFxx then you only need to handle the second SS signal like the firsts SS signal.

To be compatible with SPI you need to ensure that NEVER SS1 and SS2 can be HIGH at the same time. Even not at RESET of the ATMega.
For worst case consider floating signals to be HIGH and LOW at the same time.
A pullup on both signals could be safe.
Even more safe is the use of an decoder chip like AHC/HC/HCT138.

General recommendation: never leave any signal floating. (even not the unused MISO)

Klaus
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…