Atmel AVR Microcontroller discussion group.
[AVR club] SPI bus - n.na...@gmail.com - Apr 17 8:21:56 2008
Hello! I have a dought regarding SPI bus.The SPI bus protocol deals with 4 modes
depending on the values of CPOL and CPHA. These modes determine the relationship between
the serial clock and the data bits.I don't understand what is the importance of this? How
does this matter to communication?
------------------------------------

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] SPI bus - David Kelly - Apr 17 8:39:50 2008
On Apr 17, 2008, at 5:52 AM, n...@gmail.com wrote:
> Hello! I have a dought regarding SPI bus.The SPI bus protocol deals
> with 4 modes depending on the values of CPOL and CPHA. These modes
> determine the relationship between the serial clock and the data
> bits.I don't understand what is the importance of this? How does
> this matter to communication?
If both ends don't implement the clock and data the same way then they
can't talk.
Smart CPUs implement all modes. Dumb peripherals generally implement
only one as you have to talk to the peripheral somehow to set its SPI
mode. Some are a little smarter and can detect the format its being
spoken to.
--
David Kelly N4HHE, d...@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.
------------------------------------

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
[AVR club] Re: SPI bus - vid_tech - Apr 17 10:39:11 2008
--- In a...@yahoogroups.com, n.nandini08@... wrote:
> Hello! I have a dought regarding SPI bus.The SPI bus protocol deals
with 4 modes depending on the values of CPOL and CPHA. These modes
determine the relationship between the serial clock and the data
bits.I don't understand what is the importance of this? How does this
matter to communication?
>
Basically two type serial communication method uses in mcu.
synchronous and asynchronous, synchronous communication required clock
and it is independent of transfer speed, asynchronous communication
does not require clock but, transfer rate (baud rate) must be same at
both end.
The CPOL type setting not necessary in asynchronous transfer because
there is no clock. CPHA type setting is necessary for both type of
transfer. without this values the mcu cannot decide that the first
received bit is MSB or LSB. the same way CPOL values tells to the mcu,
when receive the bit, at positive polarity or negative polarity of clock.
------------------------------------

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )