[elektro] AVR SPI vs. _SS
Moravcsik Szilard
levlista.mszilard at gmail.com
Mon Sep 29 12:10:41 CEST 2014
2014.09.29. 11:27 keltezéssel, Szima Gábor írta:
>
> Sziasztok!
>
> AVR-en megoldható, hogy az SPI-t bekapcsolva (master módban) ne használja
> az _SS lábat, hanem az legyen sima port (IN)?
>
> Ha bemenetre kapcsolom és az LOW, akkor leakad az SPI kommunikáció (várná
> a külső órát).
>
Szia!
Ha jól rémlik, ha az AVR Masterként van konfigurálva, az ~SS lábnak
kimenetnek kell lennie, amit azonban a szoftvernek kell majd
billegtetnie, ha megcímez egy Slave eszközt.
Megnéztem, ezt írja az ATmega2561 adatlapja:
When configured as a Master, the SPI interface has no automatic control
of the SS line. This must be handled by user software before
communication can start.
Slave módban pedig:
When configured as a Slave, the SPI interface will remain sleeping with
MISO tri-stated as long as the SS pin is driven high. In this state,
software may update the contents of the SPI Data Register, SPDR, but the
data will not be shifted out by incoming clock pulses on the SCK pin
until the SS pin is driven low.
Lefagynia nem kellene, ha nálad Masterben van.
Üdv:
Szilárd
More information about the Elektro
mailing list