16. USART2
A96G150 User's manual
234
Figure 105. SPI Clock Formats when UCPHA = 1
When UCPHA=1, the slave begins to drive its MISO2 output when SS2 goes active low, but the data is
not defined until the first XCK edge. The first XCK edge shifts the first bit of data from the shifter onto
the MOSI2 output of the master and the MISO2 output of the slave.
The next XCK edge causes both the master and the slave to sample the data bit value on their MISO2
and MOSI2 inputs, respectively.
At the third XCK edge, the USART2 shifts the second data bit value out to the MOSI2 and MISO2 output
of the maste
r and slave respectively. When UCPHA=1, the slave’s SS input is not required to go to its
inactive high level between transfers.
Because an SPI logic reuses the USART2 resources, SPI mode of operation is similar to that of
synchronous or asynchronous operation. An SPI transfer is initiated by checking for USART2 Data
Register Empty flag (UDRE=1) and then by writing a byte of data to the UDATA Register.
In master mode of operation, even if transmission is not enabled (TXE=0), writing data to UDATA
register is necessary because the clock XCK is generated from a transmitter block.
XCK
(UCPOL=1)
MISO2
MOSI2
XCK
(UCPOL=0)
/SS2 OUT
(MASTER)
BIT7
BIT0
/SS2 IN
(SLAVE)
BIT6
BIT1
…
…
BIT2
BIT5
BIT0
BIT7
BIT1
BIT6
SAMPLE
MSB First
LSB First
Содержание A96G150
Страница 126: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 126 Figure 43 16 bit Timer Counter Mode Operation Example...
Страница 136: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 136 Figure 51 16 bit Timer Counter Mode Operation Example...
Страница 147: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 147 Figure 59 16 bit Timer Counter Mode Operation Example...
Страница 157: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 157 Figure 67 16 bit Timer Counter Mode Operation Example...
Страница 171: ...A96G150 User s manual 14 12 bit ADC 171 Figure 79 ADC Operation Flow Sequence...
Страница 333: ...A96G150 User s manual Revision history 333 Revision history Revision Date Notes 1 00 2022 06 22 First creation...