127/317
5 - Peripherals
An example of the use of the SPI to send data to a LCD display module is given in the second
application, Chapter 10. The configuration used is shown in the figure below with the appro-
priate values in the registers.
05-app10
8-bit shift register
SPIDR
Internal data bus
MOSI
MISO
SCK
SPI
Clock
Generator
SPIE
0
SPE
1
SPR2
1
MSTR
1
CPOL
0
CPHA
0
SPR1
0
SPR0
0
Max speed (f
cpu
/ 4)
Permanent master mode
SPI alternate functions connected to pins
No interrupt in this application
SS
Vdd
SPI
State
Control
3
Serial
data out
Serial
data in
External shift registers
Clock
8
Parallel data out
4094
4094
Expanding the parallel outputs using the SPI and external shift registers
8
8
SPICR
ST72311
I/O or alternate function
circuitry (SPE), master or
slave configuration (MSTR)
SPR0-SPR1-SPR2: Rate selection
SPIE: Interrupt enable
SPE: Output enable
MSTR: Master
CPOL: Clock polarity
CPHA: Clock phase
Содержание ST7 Series
Страница 1: ...ST7 8 BIT MCU FAMILY USER GUIDE JANUARY 1999 1 ...
Страница 238: ...238 317 8 C Language and the C Compiler 08 Burn bmp Then use the EPROMer programmer software as described in Chapter 7 ...
Страница 289: ...289 317 10 Second Application a Sailing Computer 10 befor Bs Rw Vw VMG AlphaR AlphaV Before the wind ...