[elektro] 2 SPI eszkoz szimultan

potyo potyo.ada at gmail.com
Thu Mar 26 23:13:08 CET 2009


2009/3/26 Moczik Gabor <pm_levlista at progzmaster.hu>

> Nem találtam egyértelmű utalást, hogy a PIC-ben az SPI teljesen duplex
> módon
> működik-e, azaz kiírom az SSPBUF-ba az első 8 bitet, kimegy ez a 8 bit,
> közben a bejövő 8 bit bekerül, és amikor kapok egy megszakítást, akkor az
> SSPBUF-ban az ADC által küldött adat van?


Nekem ez elég egyértelműen azt jelenti (17.3.2 fejezet és Figure17-2):

The MSSP consists of a transmit/receive shift register
(SSPSR) and a buffer register (SSPBUF). ***The SSPSR
shifts the data in and out of the device, MSb first. The
SSPBUF holds the data that was written to the SSPSR
until the received data is ready. Once the 8 bits of data
have been received, that byte is moved to the SSPBUF
register.*** Then, the Buffer Full detect bit, BF
(SSPSTAT<0>) and the interrupt flag bit, SSPIF, are
set. This double-buffering of the received data
(SSPBUF) allows the next byte to start reception before
reading the data that was just received.


More information about the Elektro mailing list