AT89C5132 Atmel Corporation, AT89C5132 Datasheet - Page 124
![no-image](/images/manufacturer_photos/0/0/79/atmel_corporation_sml.jpg)
AT89C5132
Manufacturer Part Number
AT89C5132
Description
Manufacturer
Atmel Corporation
Datasheets
1.AT89C5132.pdf
(3 pages)
2.AT89C5132.pdf
(182 pages)
3.AT89C5132.pdf
(38 pages)
4.AT89C5132.pdf
(33 pages)
Specifications of AT89C5132
Flash (kbytes)
64 Kbytes
Max. Operating Frequency
20 MHz
Cpu
8051-12C
Max I/o Pins
44
Usb Transceiver
1
Usb Speed
Full Speed
Usb Interface
Device
Spi
1
Uart
1
Adc Channels
2
Adc Resolution (bits)
10
Adc Speed (ksps)
22.7
Sram (kbytes)
2.25
Self Program Memory
API
Operating Voltage (vcc)
2.7 to 3.6
Timers
2
Isp
UART/USB
Watchdog
Yes
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
19.1.6
19.2
19.3
124
Interrupt
Configuration
AT89C5132
Error Conditions
Figure 19-6 shows an SPI transmission with CPHA = 1, where the first SCK edge is used by the
slave as a start of transmission signal. Therefore SS may remain asserted between each byte
transmission (see Figure 19-7).
Figure 19-7. SS Timing Diagram
The following flags signal the SPI error conditions:
•
•
The SPI handles two interrupt sources; the “end of transfer” and the “mode fault” flags.
As shown in Figure 19-8 these flags are combined together to appear as a single interrupt
source for the C51 core. The SPIF flag is set at the end of an 8-bit shift in and out and is cleared
by reading SPSTA and then reading from or writing to SPDAT.
The MODF flag is set in case of mode fault error and is cleared by reading SPSTA and then writ-
ing to SPCON.
The SPI interrupt is enabled by setting ESPI bit in IEN1 register. This assumes interrupts are
globally enabled by setting EA bit in IEN0 register.
Figure 19-8. SPI Interrupt System
The SPI configuration is made through SPCON.
MODF in SPSTA signals a mode fault.
MODF flag is relevant only in master mode when SS usage is enabled (SSDIS bit cleared).
It signals when set that another master on the bus has asserted SS pin and so, may create
a conflict on the bus with two masters sending data at the same time.
A mode fault automatically disables the SPI (SPEN cleared) and configures the SPI in slave
mode (MSTR cleared).
MODF flag can trigger an interrupt as explained in Section "Interrupt", page 124.
MODF flag is cleared by reading SPSTA and re-configuring SPI by writing to SPCON.
WCOL in SPSTA signals a write collision.
WCOL flag is set when SPDAT is loaded while a transfer is on-going. In this case, data is not
written to SPDAT and transfer continues uninterrupted. WCOL flag does not trigger any
interrupt and is relevant jointly with SPIF flag.
WCOL flag is cleared after reading SPSTA and writing new data to SPDAT while no transfer
is ongoing.
SS (CPHA = 0)
SS (CPHA = 1)
SI/SO
SPSTA.7
SPSTA.4
MODF
SPIF
Byte 1
IEN1.2
ESPI
Byte 2
SPI Controller
Interrupt Request
Byte 3
4173E–USB–09/07