C8051F340-GQR Silicon Laboratories Inc, C8051F340-GQR Datasheet - Page 224
![no-image](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_sml.jpg)
C8051F340-GQR
Manufacturer Part Number
C8051F340-GQR
Description
MCU 8-Bit C8051F34x 8051 CISC 64KB Flash 3.3V/5V 48-Pin TQFP T/R
Manufacturer
Silicon Laboratories Inc
Datasheet
1.C8051F340-GQR.pdf
(276 pages)
Specifications of C8051F340-GQR
Package
48TQFP
Device Core
8051
Family Name
C8051F34x
Maximum Speed
48 MHz
Operating Supply Voltage
3.3|5 V
Data Bus Width
8 Bit
Number Of Programmable I/os
40
Interface Type
I2C/SMBus/SPI/UART/USB
On-chip Adc
17-chx10-bit
Number Of Timers
4
Ram Size
4.25 KB
Program Memory Size
64 KB
Program Memory Type
Flash
Operating Temperature
-40 to 85 °C
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
C8051F340-GQR
Manufacturer:
SILICON
Quantity:
3 870
Company:
Part Number:
C8051F340-GQR
Manufacturer:
Silicon Laboratories Inc
Quantity:
10 000
Part Number:
C8051F340-GQR
Manufacturer:
SILICON LABS/芯科
Quantity:
20 000
- Current page: 224 of 276
- Download datasheet (2Mb)
C8051F340/1/2/3/4/5/6/7/8/9/A/B/C/D
20.2. SPI0 Master Mode Operation
A SPI master device initiates all data transfers on a SPI bus. SPI0 is placed in master mode by setting the
Master Enable flag (MSTEN, SPI0CFG.6). Writing a byte of data to the SPI0 data register (SPI0DAT) when
in master mode writes to the transmit buffer. If the SPI shift register is empty, the byte in the transmit buffer
is moved to the shift register, and a data transfer begins. The SPI0 master immediately shifts out the data
serially on the MOSI line while providing the serial clock on SCK. The SPIF (SPI0CN.7) flag is set to logic
1 at the end of the transfer. If interrupts are enabled, an interrupt request is generated when the SPIF flag
is set. While the SPI0 master transfers data to a slave on the MOSI line, the addressed SPI slave device
simultaneously transfers the contents of its shift register to the SPI master on the MISO line in a full-duplex
operation. Therefore, the SPIF flag serves as both a transmit-complete and receive-data-ready flag. The
data byte received from the slave is transferred MSB-first into the master's shift register. When a byte is
fully shifted into the register, it is moved to the receive buffer where it can be read by the processor by
reading SPI0DAT.
When configured as a master, SPI0 can operate in one of three different modes: multi-master mode, 3-wire
single-master mode, and 4-wire single-master mode. The default, multi-master mode is active when
NSSMD1 (SPI0CN.3) = 0 and NSSMD0 (SPI0CN.2) = 1. In this mode, NSS is an input to the device, and
is used to disable the master SPI0 when another master is accessing the bus. When NSS is pulled low in
this mode, MSTEN (SPI0CFG.6) and SPIEN (SPI0CN.0) are set to 0 to disable the SPI master device, and
a Mode Fault is generated (MODF, SPI0CN.5 = 1). Mode Fault will generate an interrupt if enabled. SPI0
must be manually re-enabled in software under these circumstances. In multi-master systems, devices will
typically default to being slave devices while they are not acting as the system master device. In multi-mas-
ter mode, slave devices can be addressed individually (if needed) using general-purpose I/O pins.
Figure 20.2 shows a connection diagram between two master devices in multiple-master mode.
3-wire single-master mode is active when NSSMD1 (SPI0CN.3) = 0 and NSSMD0 (SPI0CN.2) = 0. In this
mode, NSS is not used, and is not mapped to an external port pin through the crossbar. Any slave devices
that must be addressed in this mode should be selected using general-purpose I/O pins. Figure 20.3
shows a connection diagram between a master device in 3-wire master mode and a slave device.
4-wire single-master mode is active when NSSMD1 (SPI0CN.3) = 1. In this mode, NSS is configured as an
output pin, and can be used as a slave-select signal for a single SPI device. In this mode, the output value
of NSS is controlled (in software) with the bit NSSMD0 (SPI0CN.2). Additional slave devices can be
addressed using general-purpose I/O pins. Figure 20.4 shows a connection diagram for a master device in
4-wire master mode and two slave devices.
224
Rev. 1.3
Related parts for C8051F340-GQR
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![500SAAB8M00000ACF](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
SMD/C°/SINGLE-ENDED OUTPUT SILICON OSCILLATOR
Manufacturer:
Silicon Laboratories Inc
![SI3210MFT](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![4010-DAAKF_868](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
N/A N/A/SI4010 AES KEYFOB DEMO WITH LCD RX
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![4010-DASKF_868](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
N/A N/A/SI4010 SIMPLIFIED KEY FOB DEMO WITH LED RX
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![4432-SEB1 C 915](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
N/A/-40 TO 85 OC/EZLINK MODULE; F930/4432 HIGH BAND (REV E/B1)
Manufacturer:
Silicon Laboratories Inc
![4432-SEB1 D 470](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
EZLink Module; F930/4432 Low Band (rev e/B1)
Manufacturer:
Silicon Laboratories Inc
![4460-TCE10D434-EK](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
I°/4460 10 DBM RADIO TEST CARD 434 MHZ
Manufacturer:
Silicon Laboratories Inc
![4461-TSQ14D868-EK](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
I°/4461 14 DBM RADIO TEST CARD 868 MHZ
Manufacturer:
Silicon Laboratories Inc
![4463-TCE20C460-EK](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
I°/4463 20 DBM RFSWITCH RADIO TEST CARD 460 MHZ
Manufacturer:
Silicon Laboratories Inc
![4463-TCE20C868-EK](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
I°/4463 20 DBM RADIO TEST CARD 868 MHZ
Manufacturer:
Silicon Laboratories Inc
![4463-TCE27F868-EK](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
I°/4463 27 DBM RADIO TEST CARD 868 MHZ
Manufacturer:
Silicon Laboratories Inc
![4463-TCE30E915S-EK](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
I°/4463 SKYWORKS 30 DBM RADIO TEST CARD 915 MHZ
Manufacturer:
Silicon Laboratories Inc
![4463-TCE30E915R-EK](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
N/A N/A/-40 TO 85 OC/4463 RFMD 30 DBM RADIO TEST CARD 915 MHZ
Manufacturer:
Silicon Laboratories Inc
![4463-TSQ20D169-EK](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
I°/4463 20 DBM RADIO TEST CARD 169 MHZ
Manufacturer:
Silicon Laboratories Inc