Freelance Electronics Components Distributor
Closed Dec 25th-26th
800-300-1968
We Stock Hard to Find Parts

C8051F041-GQ

Part # C8051F041-GQ
Description MCU 8BIT CISC 64KB FLASH 3V 64TQFP - Trays
Category IC
Availability In Stock
Qty 2
Qty Price
1 + $20.05559
Manufacturer Available Qty
SILICON LABORATORIES
Date Code: 0903
  • Shipping Freelance Stock: 2
    Ships Immediately



Technical Document


DISCLAIMER: The information provided herein is solely for informational purposes. Customers must be aware of the suitability of this product for their application, and consider that variable factors such as Manufacturer, Product Category, Date Codes, Pictures and Descriptions may differ from available inventory.

C8051F040/1/2/3/4/5/6/7
208 Rev. 1.5
17.1.6. External Memory Interface Pin Assignments
If the External Memory Interface (EMIF) is enabled on the Low ports (Ports 0 through 3), EMIFLE (XBR2.5)
should be set to a logic 1 so that the Crossbar will not assign peripherals to P0.7 (/WR), P0.6 (/RD), and, if
the External Memory Interface is in Multiplexed mode, P0.5 (ALE). Figure 17.4 shows an example Cross-
bar Decode Table with EMIFLE=1 and the EMIF in Multiplexed mode. Figure 17.5 shows an example
Crossbar Decode Table with EMIFLE=1 and the EMIF in Non-multiplexed mode.
If the External Memory Interface is enabled on the Low ports and an off-chip MOVX operation occurs, the
External Memory Interface will control the output states (logic 1 or logic 0) of the affected Port pins during
the execution phase of the MOVX instruction, regardless of the settings of the Crossbar registers or the
Port Data registers. The output configuration (push-pull or open-drain) of the Port pins is not affected by
the EMIF operation, except that Read operations will explicitly disable the output drivers on the Data Bus.
In most cases, GPIO pins used in EMIF operations (especially the /WR and /RD lines) should be
configured as push-pull and ‘parked’ at a logic 1 state. See Section “16. External Data Memory
Interface and On-Chip XRAM” on page 187 for more information about the External Memory Interface.
Figure 17.4. Priority Crossbar Decode Table
(EMIFLE = 1; EMIF in Multiplexed Mode; P1MDIN = 0xF
F)
PIN I/O
01234567012345670123456701234567
TX0
z
RX0
z
SCK
zz
MISO
zz
MOSI
zz
NSS
zzNSS is not assigned to a port pin when the SPI is placed in 3-wire mode
SDA
z zzz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/D2
AD3/D3
AD4/D4
AD5/D5
AD6/D6
AD7/D7
XBR2.2
XBR0.[5:3]
UART0EN:
SPI0EN:
Crossbar Register Bits
XBR0.2
XBR0.1
XBR0.0SMB0EN:
AIN1 Inputs/Non-muxed Addr H Muxed Addr H/Non-muxed Addr L Muxed Data/Non-muxed Data
UART1EN:
PCA0ME:
P0 P1 P2 P3
C8051F040/1/2/3/4/5/6/7
Rev. 1.5 209
Figure 17.5. Priority Crossbar Decode Table
(EMIFLE = 1; EMIF in Non-multiplexed Mode; P1MDIN = 0xFF)
PIN I/O
01234567012345670123456701234567
TX0
z
RX0
z
SCK
zz
MISO
zz
MOSI
zz
NSS
zz NSS is not assigned to a port pin when the SPI is placed in 3-wire mode
SDA
z zzzz z
SCL
z zzz zz
TX1
z zzzz zzz
RX1
z zzz zzzz
CEX0
z zzzz zzzzz
CEX1
z zzz zzzzzz
CEX2
zzz zzzzzzz
CEX3
zz zzzzzzzz
CEX4
z zzzzzzzzz
CEX5
z zzzzzzzzz
ECI
zzzzzz zzzzzzzzzzz
ECI0E: XBR0.6
CP0
zzzzzz zzzzzzzzzzzz
CP0E: XBR0.7
CP1
zzzzzz zzzzzzzzzzzzz
CP1E: XBR1.0
CP2
zzzzzz zzzzzzzzzzzzzz
CP2E: XBR3.3
T0
zzzzzz zzzzzzzzzzzzzzz
T0E: XBR1.1
/INT0
zzzzzz zzzzzzzzzzzzzzzz
INT0E: XBR1.2
T1
zzzzzz zzzzzzzzzzzzzzzzz
T1E: XBR1.3
/INT1
zzzzzz zzzzzzzzzzzzzzzzzz
INT1E: XBR1.4
T2
zzzzzz zzzzzzzzzzzzzzzzzzz
T2E: XBR1.5
T2EX
zzzzzz zzzzzzzzzzzzzzzzzzzz
T2EXE: XBR1.6
T3
zzzzzz zzzzzzzzzzzzzzzzzzzzz
T3E: XBR3.0
T3EX
zzzzzz zzzzzzzzzzzzzzzzzzzzzz
T3EXE: XBR3.1
T4
zzzzzz zzzzzzzzzzzzzzzzzzzzzzz
T4E: XBR2.3
T4EX
zzzzzz zzzzzzzzzzzzzzzzzzzzzzzz
T4EXE: XBR2.4
/SYSCLK
zzzzzz zzzzzzzzzzzzzzzzzzzzzzzz
SYSCKE: XBR1.7
CNVSTR0
zzzzzz zzzzzzzzzzzzzzzzzzzzzzzz
CNVSTE0: XBR2.0
CNVSTR2
zzzzzz zzzzzzzzzzzzzzzzzzzzzzzz
CNVSTE2: XBR3.2
ALE
/RD
/WR
AIN1.0/A8
AIN1.1/A9
AIN1.2/A10
AIN1.3/A11
AIN1.4/A12
AIN1.5/A13
AIN1.6/A14
AIN1.7/A15
A8m/A0
A9m/A1
A10m/A2
A11m/A3
A12m/A4
A13m/A5
A14m/A6
A15m/A7
AD0/D0
AD1/D1
AD2/D2
AD3/D3
AD4/D4
AD5/D5
AD6/D6
AD7/D7
XBR2.2
XBR0.[5:3]
UART0EN:
SPI0EN:
Crossbar Register Bits
XBR0.2
XBR0.1
XBR0.0SMB0EN:
AIN1 Inputs/Non-muxed Addr H Muxed Addr H/Non-muxed Addr L Muxed Data/Non-muxed Data
UART1EN:
PCA0ME:
P0 P1 P2 P3
C8051F040/1/2/3/4/5/6/7
210 Rev. 1.5
17.1.7. Crossbar Pin Assignment Example
In this example (Figure 17.6), we configure the Crossbar to allocate Port pins for UART0, the SMBus,
UART1, /INT0, and /INT1 (8 pins total). Additionally, we configure the External Memory Interface to oper-
ate in Multiplexed mode and to appear on the Low ports. Further, we configure P1.2, P1.3, and P1.4 for
Analog Input mode so that the voltages at these pins can be measured by ADC2. The configuration steps
are as follows:
1. XBR0, XBR1, and XBR2 are set such that UART0EN = 1, SMB0EN = 1, INT0E = 1, INT1E =
1, and EMIFLE = 1. Thus: XBR0 = 0x05, XBR1 = 0x14, and XBR2 = 0x02.
2. We configure the External Memory Interface to use Multiplexed mode and to appear on the
Lo
w ports. PRTSEL = 0, EMD2 = 0.
3. We configure the desired Port 1 pins to Analog Input mode by se
tting P1MDIN to 0xE3 (P1.4,
P1.3, and P1.2 are Analog Inputs, so their associated P1MDIN bits are set to logic 0).
4. We enable the Crossbar by setting XBARE =
1: XBR2 = 0x42.
- UART0 has the highest priority, so P0.0 is assigned to TX0, and P0.1 is assigned to RX0.
- The SMBus is next in priority order, so P0.2 is assigned to SDA, and P0.3 is assigned to
SCL.
- UART1 is next in priority order, so P0.4 is assigne
d to TX1. Because the External Memory
Interface is selected on the lower Ports, EMIFLE = 1, which causes the Crossbar to skip
P0.6 (/RD) and P0.7 (/WR). Because the External Memory Interface is configured in Multi-
plexed mode, the Crossbar will als
o skip P0.5 (ALE). RX1 is assigned to the next non-
skipped pin, which in this case is P1.0.
- /INT0 is next in priority order, so it is assigned to P1.1.
- P1MDIN is set to 0xE3, which configures P1.2, P1.3,
and P1.4 as Analog Inputs, causing
the Crossbar to skip these pins.
- /INT1 is next in priority order, so it is assign
ed to the next non-skipped pin, which is P1.5.
- The External Memory Interface will drive Ports 2 and 3 (denoted by red dots in
Figure 17.6) during the execution of an off-chip MOVX instruction.
5. We set the UART0 TX pin (TX0, P0.0) and UART1 TX pin (TX1, P0.4) outputs to Push-Pull by
setting P0MD
OUT = 0x11.
6. We configure all EMIF-controlled pins to push-pull output mode by setting P0MDOUT |= 0xE0;
P2MDOUT = 0xFF; P3MDOUT = 0xFF.
7. We explicitly disable th
e output drivers on the 3 Analog Input pins by setting P1MDOUT =
0x00 (configure outputs to Open-Drain) and P1 = 0xFF (a logic 1 selects the high-impedance
st
ate).
PREVIOUS6364656667686970717273747576NEXT