ATMEGA8L ATMEL [ATMEL Corporation], ATMEGA8L Datasheet - Page 127
ATMEGA8L
Manufacturer Part Number
ATMEGA8L
Description
8-bit AVR with 8K Bytes In-System Programmable Flash
Manufacturer
ATMEL [ATMEL Corporation]
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
ATMEGA8L-6AU
Manufacturer:
ATMEL
Quantity:
675
Company:
Part Number:
ATMEGA8L-8AI
Manufacturer:
MICROCHIP
Quantity:
1 292
Company:
Part Number:
ATMEGA8L-8AU
Manufacturer:
ATMEL
Quantity:
4 590
Company:
Part Number:
ATMEGA8L-8AU
Manufacturer:
Atmel
Quantity:
7 500
Company:
Part Number:
ATMEGA8L-8AU
Manufacturer:
ATMEL
Quantity:
591
Part Number:
ATMEGA8L-8AU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
2486M–AVR–12/03
be cleared, and SPIF in SPSR will become set. The user will then have to set MSTR to
re-enable SPI Master mode.
• Bit 3 – CPOL: Clock Polarity
When this bit is written to one, SCK is high when idle. When CPOL is written to zero,
SCK is low when idle. Refer to Figure 59 and Figure 60 for an example. The CPOL func-
tionality is summarized below:
Table 48. CPOL Functionality
• Bit 2 – CPHA: Clock Phase
The settings of the clock phase bit (CPHA) determine if data is sampled on the leading
(first) or trailing (last) edge of SCK. Refer to Figure 59 and Figure 60 for an example.
The CPHA functionality is summarized below:
Table 49. CPHA Functionality
• Bits 1, 0 – SPR1, SPR0: SPI Clock Rate Select 1 and 0
These two bits control the SCK rate of the device configured as a Master. SPR1 and
SPR0 have no effect on the Slave. The relationship between SCK and the Oscillator
Clock frequency f
Table 50. Relationship Between SCK and the Oscillator Frequency
SPI2X
CPOL
CPHA
0
0
0
0
1
1
1
1
0
1
0
1
osc
is shown in the following table:
SPR1
0
0
1
1
0
0
1
1
Leading Edge
Leading Edge
Sample
Falling
Rising
Setup
SPR0
0
1
0
1
0
1
0
1
SCK Frequency
f
f
f
f
f
f
f
f
osc
osc
osc
osc
osc
osc
osc
osc
/
/
/
/
/
/
/
/
4
16
64
128
2
8
32
64
ATmega8(L)
Trailing Edge
Trailing Edge
Sample
Falling
Rising
Setup
127