Preliminary specification
Supersedes data of 1998 Oct 06
IC25 Data Handbook
C, 2 UARTs,
1999 Oct 05
Philips SemiconductorsPreliminary specification
XA 16-bit microcontroller
32K/1K OTP/ROM/ROMless, 8-channel 8-bit A/D, low voltage (2.7 V–5.5 V),
I2C, 2 UARTs, 16 MB address range
XA-S3
GENERAL DESCRIPTION
The XA-S3 device is a member of Philips Semiconductors’ XA
(eXtended Architecture) family of high performance 16-bit
single-chip microcontrollers.
The XA-S3 device combines many powerful peripherals on one
chip. With its high performance A/D converter, timers/counters,
watchdog, Programmable Counter Array (PCA), I
UARTs, and multiple general purpose I/O ports, it is suited for
general multipurpose high performance embedded control functions.
2
C interface, dual
Specific features of the XA-S3
•2.7 V to 5.5 V operation.
•32 K bytes of on-chip EPROM/ROM program memory.
•1024 bytes of on-chip data RAM.
•Supports off-chip addressing up to 16 megabytes (24 address
lines). A clock output reference is added to simplify external bus
interfacing.
•High performance 8-channel 8-bit A/D converter with automatic
channel scan and repeated read functions. Completes a
conversion in 4.46 microseconds at 30 MHz. Alternate operating
mode allows 10-bit conversion results.
•Three standard counter/timers with enhanced features. All timers
C-bus serial I/O port with byte-oriented master and slave
functions.
•Two enhanced UARTs with independent baud rates.
•Seven software interrupts.
•Active low reset output pin indicates all reset occurrences
(external reset, watchdog reset and the RESET instruction). A
reset source register allows program determination of the cause of
the most recent reset.
•50 I/O pins, each with 4 programmable output configurations.
•30 MHz operating frequency at 2.7–5.5 V V
operating conditions.
•Power saving operating modes: Idle and Power-down. Wake-up
from power-down via an external interrupt is supported.
•68-pin PLCC and 80-pin PQFP packages.
ORDERING INFORMATION
ROMlessROMEPROMTEMPERATURE RANGE (°C)
PXAS30KBAPXAS33KBAPXAS37KBAOTP0 to +70,
68-pin Plastic Leaded Chip Carrier
PXAS30KBBEPXAS33KBBEPXAS37KBBEOTP0 to +70,
80-pin Plastic Low Profile Quad Flat Pack
AND PACKAGE
over commercial
DD
FREQ.
(MHz)
30SOT188-3
30SOT315-1
DRAWING
NUMBER
1999 Oct 05
2
Philips SemiconductorsPreliminary specification
XA 16-bit microcontroller
32K/1K OTP/ROM/ROMless, 8-channel 8-bit A/D, low voltage (2.7 V–5.5 V),
32K/1K OTP/ROM/ROMless, 8-channel 8-bit A/D, low voltage (2.7 V–5.5 V),
2
C, 2 UARTs, 16 MB address range
I
LOGIC SYMBOL
XA-S3
WRH
RxD1
TxD1
T2EX
/A0
A1
A2
A3
V
DD
XTAL1
XTAL2
AV
DD
AV
REF+
AV
REF–
AV
SS
CLKOUT
ALE
PSEN
RSTOUT
RST
EA/WAIT
PORT1PORT3
T2
V
SS
ECI
CEX0
CEX1
CEX2
PORT4PORT5PORT6PORT0PORT2
CEX3
CEX4
A20
A21
INPUTS
A22
A23
A/D
SCL
SDA
RxD0
TxD0
INT0
INT1
T1/BUSW
WRL
ADDRESS AND DATA BUS
T0
RD
SU00847A
1999 Oct 05
5
Philips SemiconductorsPreliminary specification
XA 16-bit microcontroller
32K/1K OTP/ROM/ROMless, 8-channel 8-bit A/D, low voltage (2.7 V–5.5 V),
2
C, 2 UARTs, 16 MB address range
I
BLOCK DIAGRAM
XA-S3
XA CPU Core
Program
Memory
32K Bytes
ROM/EPROM
1024 Bytes
Static RAM
Port 0
Port 1
Port 2
Port 3
Port 4
Port 5
Port 6
Bus
Data
Bus
SFR
bus
UART 0
UART 1
I2C
Timer 0, 1
Timer 2
Watchdog
Timer
PCA
Input Port/
A/D
1999 Oct 05
SU00846
6
Philips SemiconductorsPreliminary specification
MNEMONIC
TYPE
NAME AND FUNCTION
XA 16-bit microcontroller
32K/1K OTP/ROM/ROMless, 8-channel 8-bit A/D, low voltage (2.7 V–5.5 V),
2
C, 2 UARTs, 16 MB address range
I
PIN DESCRIPTIONS
PIN NUMBER
PLCCLQFP
V
SS
V
DD
RST5047IReset: A low on this pin resets the microcontroller, causing I/O ports and peripherals to
RSTOUT1911OReset Output: This pin outputs a low whenever the XA-S3 processor is reset for any
ALE/PROG4744I/OAddress Latch Enable/Program Pulse: A high output on the ALE pin signals external
PSEN4845OProgram Store Enable: The read strobe for external program memory. When the
EA/WAIT/V
XTAL16868ICrystal 1: Input to the inverting amplifier used in the oscillator circuit and input to the
XTAL26767ICrystal 2: Output from the oscillator amplifier.
CLKOUT4946OClock Output: This pin outputs a buffered version of the internal CPU clock. The clock
AV
DD
AV
SS
AV
REF+
AV
REF–
P0.0 – P0.745, 46,
1, 20, 5512, 13,
2, 21, 5414, 15,
PP
2216IExternal Access/Bus W ait: The EA input determines whether the internal program
3328, 29IAnalog Power Supply: Positive power supply input for the A/D converter.
3430, 31IAnalog Ground.
3227IA/D Positive Reference Voltage: High end reference for the A/D converter.
3126IA/D Negative Reference Voltage: Low end reference for the A/D converter.
51–53,
56–58
53, 54,
69, 70
51, 52,
71, 72
42, 43,
48–50,
55–57
IGround: 0V reference.
IPower Supply: This is the power supply voltage for normal, idle, and power down
operation.
take on their default states, and the processor to begin execution at the address contained
in the reset vector.
reason. This includes an external reset via the RST pin, watchdog reset, and the RESET
instruction.
circuitry to latch the address portion of the multiplexed address/data bus. A pulse on ALE
occurs only when it is needed in order to process a bus cycle.
microcontroller accesses external program memory, PSEN is driven low in order to enable
memory devices. PSEN
memory of the microcontroller is used for code execution. The value on the EA pin is
latched as the external reset input is released and applies during later execution. When
latched as a 0, external program memory is used exclusively. When latched as a 1, internal
program memory will be used up to its limit, and external program memory used above that
point. After reset is released, this pin takes on the function of bus WAIT input. If WAIT is
asserted high during an external bus access, that cycle will be extended until WAIT is
released.
internal clock generator circuits.
output may be used in conjunction with the external bus to synchronize WAIT state
generators, etc. The clock output may be disabled by software.
I/OPort 0: Port 0 is an 8-bit I/O port with a user-configurable output type. Port 0 latches have
1s written to them and are configured in the quasi-bidirectional mode during reset. The
operation of port 0 pins as inputs and outputs depends upon the port configuration
selected. Each port pin is configured independently. Refer to the section on I/O port
configuration and the DC Electrical Characteristics for details.
When the external program/data bus is used, Port 0 becomes the multiplexed low
data/instruction byte and address lines 4 through 11.
is only active when external code accesses are performed.
XA-S3
1999 Oct 05
7
Philips SemiconductorsPreliminary specification
XA 16-bit microcontroller
32K/1K OTP/ROM/ROMless, 8-channel 8-bit A/D, low voltage (2.7 V–5.5 V),
2
C, 2 UARTs, 16 MB address range
I
XA-S3
MNEMONICNAME AND FUNCTIONTYPE
MNEMONICNAME AND FUNCTIONTYPE
P1.0 – P1.7
P2.0 – P2.759–6658, 59,
P3.0 – P3.7
P4.0 – P4.7
PIN NUMBER
LQFPPLCC
35–4232–39I/OPort 1: Port 1 is an 8-bit I/O port with a user-configurable output type. Port 1 latches have
3532OA0/WRH (P1.0)Address bit 0 of the external address bus when the eternal data
3633OA1 (P1.1):Address bit 1 of the external address bus.
3734OA2 (P1.2):Address bit 2 of the external address bus.
3835OA3 (P1.3):Address bit 3 of the external address bus.
3936IRxD1 (P1.4):Serial port 1 receiver input.
4037OTxD1 (P1.5):Serial port 1 transmitter output.
4138I/OT2 (P1.6):Timer/counter 2 external count input or overflow output.
4239OT2EX (P1.7):Timer/counter 2 reload/capture/direction control.
I/OPort 2: Port 2 is an 8-bit I/O port with a user-configurable output type. Port 2 latches have
61–66
11–183–10I/OPort 3: Port 3 is an 8-bit I/O port with a user-configurable output type. Port 3 latches have
113IRxD0 (P3.0):Receiver input for serial port 0.
124OTxD0 (P3.1):Transmitter output for serial port 0.
135IINT0 (P3.2):External interrupt 0 input.
146IINT1 (P3.3):External interrupt 1 input.
157I/OT0 (P3.4):Timer/counter 0 external count input or overflow output.
168I/OT1 / BUSW (P3.5):Timer/counter 1 external count input or overflow output. The
179OWRL (P3.6):External data memory low byte write strobe.
1810ORD (P3.7):External data memory read strobe.
3–1073–79, 2I/OPort 4: Port 4 is an 8-bit I/O port with a user-configurable output type. Port 4 latches have
373IECI (P4.0):PCA External clock input.
474I/OCEX0 (P4.1):Capture/compare external I/O for PCA module 0.
575I/OCEX1 (P4.2):Capture/compare external I/O for PCA module 1.
676I/OCEX2 (P4.3):Capture/compare external I/O for PCA module 2.
777I/OCEX3 (P4.4):Capture/compare external I/O for PCA module 3.
878I/OCEX4 (P4.5):Capture/compare external I/O for PCA module 4.
979OA20 (P4.6):Address bit 20 of the external address bus.
102OA21 (P4.7):Address bit 21 of the external address bus.
1s written to them and are configured in the quasi-bidirectional mode during reset. The
operation of port 1 pins as inputs and outputs depends upon the port configuration
selected. Each port pin is configured independently. Refer to the section on I/O port
configuration and the DC Electrical Characteristics for details.
Port 1 also provides various special functions as described below:
bus is configured for an 8-bit width. When the external data bus
is configured for a 16-bit width, this pin becomes the high byte
write strobe.
1s written to them and are configured in the quasi-bidirectional mode during reset. The
operation of port 2 pins as inputs and outputs depends upon the port configuration
selected. Each port pin is configured independently. Refer to the section on I/O port
configuration and the DC Electrical Characteristics for details.
When the external program/data bus is used in 16-bit mode, Port 2 becomes the
multiplexed high data/instruction byte and address lines 12 through 19. When the external
data/address bus is used in 8-bit mode, the number of address lines that appear on Port 2
is user programmable in groups of 4 bits.
1s written to them and are configured in the quasi-bidirectional mode during reset. The
operation of port 3 pins as inputs and outputs depends upon the port configuration
selected. Each port pin is configured independently. Refer to the section on I/O port
configuration and the DC Electrical Characteristics for details.
Port 3 also provides the various special functions as described below:
value on this pin is latched as an external chip reset is
completed and defines the default external data bus width.
1s written to them and are configured in the quasi-bidirectional mode during reset. The
operation of Port 4 pins as inputs and outputs depends upon the port configuration
selected. Each port pin is configured independently. Refer to the section on I/O port
configuration and the DC Electrical Characteristics for details.
Port 4 also provides various special functions as described below:
1999 Oct 05
8
Philips SemiconductorsPreliminary specification
NAME
DESCRIPTION
S
XA 16-bit microcontroller
32K/1K OTP/ROM/ROMless, 8-channel 8-bit A/D, low voltage (2.7 V–5.5 V),
43, 4440, 41I/OPort 6: Port 6 is a 2-bit I/O port with a user-configurable output type. Port 6 latches have
4340OA22 (P6.0):Address bit 22 of the external address bus.
4441OA23 (P6.1):Address bit 23 of the external address bus.
I/OPort 5: Port 5 is an 8-bit I/O port with a user-configurable output type. Port 5 latches have
1s written to them and are configured in the quasi-bidirectional mode during reset. The
operation of Port 5 pins as inputs and outputs depends upon the port configuration
selected. Each port pin is configured independently. Refer to the section on I/O port
configuration and the DC Electrical Characteristics for details.
Port 5 also provides various special functions as described below. Port 5 pins used as A/D
inputs must be configured by the user to the high impedance mode.
1s written to them and are configured in the quasi-bidirectional mode during reset. The
operation of Port 6 pins as inputs and outputs depends upon the port configuration
selected. Each port pin is configured independently. Refer to the section on I/O port
configuration and the DC Electrical Characteristics for details.
Port 6 also provides special functions as described below:
I2CON#*I2C control register42CCR2ENASTASTOSIAACR1CR000h
I2STAT#I2C status register46CI2C Status Code/Vector000F8h
I2DAT#I2C data register46Dxx
I2ADDR# I2C address register46EI2C Slave AddressGC00h
IEH*Interrupt enable high byte427––––ETI1ERI1ETI0ERI000h
* SFRs are bit addressable.
# SFRs are modified from or added to XA-G3 SFRs.
1. At reset, the BCR is loaded with the binary value 00000a11, where “a’ is the value on the BUSW pin. This defaults the address bus size to 24 bits.
2. SFR is loaded from the reset vector.
3. All bits except F1, F0, and P are loaded from the reset vector. Those bits are all 0.
4. Unimplemented bits in SFRs are X (unknown) at all times. Ones should not be written to these bits since they may be used for other
purposes in future XA derivatives. The reset value shown for these bits is 0.
5. Port configurations default to quasi-bidirectional when the XA begins execution from internal code memory after reset, based on the
condition found on the EA
execution using internal code memory. When the XA begins execution using external code memory, the default configuration for pins that
are associated with the external bus will be push-pull. The PnCFGA and PnCFGB register contents will reflect this difference.
6. The WDCON reset value is E6 for a Watchdog reset, E4 for all other reset causes.
7. The RSTSRC register reflects the cause of the last XA-S3 reset. One bit will be set to 1, the others will be cleared to 0.
8. The XA guards writes to certain bits (typically interrupt flags) that may be altered directly by a peripheral function. This prevents loss of an
interrupt or other status if a bit was written directly by a peripheral action during the time between the read and write portions of an
instruction that performs a read-modify-write operation. Examples of such instructions are:
XA-S3 SFR bits that are guarded in this manner are: ADINT (in ADCON); CF, CCF4, CCF3, CCF2, CCF1, and CCF0 (in CCON); SI (in
I2CON); TI_0 and RI_0 (in S0CON); TI_1 and RI_1 (in S1CON); FE0, BR0, and OE0 (in S0STAT); FE1, BR1, and OE1 (in S1STAT); TF2 (in
T2CON); TF1, TF0, IE1, and IE0 (in TCON); and WDTOF (in WDCON).
9. The XA-S3 implements an 8-bit SFR bus, as stated in
to write 16 bits to an SFR will actually write only the lower 8 bits. Sixteen bit SFR reads will return undefined data in the upper byte.
DESCRIPTION
pin. Thus, all PnCFGA registers will contain FF, and PnCFGB register will contain 00 when the XA begins
ands0con,#$fb
clrtr0
setbti_0
SFR
Address
Address
21F21E21D21C21B21A219218
ESWENR6SEG R5SEG R4SEG R3SEG R2SEG R1SEG R0SEG
357356355354353352351350
2C72C62C52C42C32C22C12C0
2CF2CE2CD2CC2CB2CA2C92C8
287286285284283282281280
28F28E28D28C28B28A289288
2FF2FE2FD2FC2FB2FA2F92F8
Chapter 8
of the
BIT FUNCTIONS AND ADDRESSES
EXEN2
XA User Guide
. All SFR accesses must be 8-bit operations. Attempts
TR2C/T2
WDRUN WDTOF
CP/RL2
Reset
Reset
Value
LSBMSB
Value
00h
00h
–Note 6
1999 Oct 05
12
Philips SemiconductorsPreliminary specification
XA 16-bit microcontroller
32K/1K OTP/ROM/ROMless, 8-channel 8-bit A/D, low voltage (2.7 V–5.5 V),
2
C, 2 UARTs, 16 MB address range
I
FFFFFh
Up to 16 MB
Total Code
Memory
8000h
7FFFh
32 kB On-chip
Code Memory
0000h
SU01219
Figure 1. XA-S3 program memory map
XA-S3
1 kB
On-Chip Data
Memory
(RAM)
Data Segment 0
Data Memory
(Indirectly Addressed,
Off-Chip)
Data Memory
(Directly or Indirectly
Addressable, On-Chip
(Bit-Addressable
Data Area)
Data Memory
(Directly or Indirectly
Addressable, On-Chip
FFFFh
0400h
03FFh
0040h
003Fh
0020h
001Fh
0000h
Directly
Addressed
Data
(1 k per
Segment)
FFFFh
0400h
03FFh
0040h
003Fh
0020h
001Fh
0000h
Other Data Segments
Data Memory
(Indirectly Addressed,
Off-Chip)
Data Memory
(Directly or Indirectly
Addressable, On-Chip
(Bit-Addressable
Data Area)
Data Memory
(Directly or Indirectly
Addressable, Off-Chip
1999 Oct 05
SU01220
Figure 2. XA-S3 data memory map
13
Philips SemiconductorsPreliminary specification
XA 16-bit microcontroller
32K/1K OTP/ROM/ROMless, 8-channel 8-bit A/D, low voltage (2.7 V–5.5 V),
2
C, 2 UARTs, 16 MB address range
I
FUNCTIONAL DESCRIPTION
Details of XA-S3 functions will be described in the following sections.
Analog to Digital converter
The XA-S3 has an 8-channel, 8-bit A/D converter with 8 sets of result
registers, single scan and multiple scan operating modes. The A/D
also has a 10-bit conversion mode that provides greater result
resolution. The A/D input range is limited to 0 to AV
The A/D inputs are on Port 5. Analog Power and Ground as well as
AV
and AV
REF+
be used. Prior to enabling the A/D converter or driving analog signals
into the A/D inputs, the port configurations for the pins being used as
A/D inputs must be set to the “off” (high impedance, input only) mode.
A/D timing can be adapted to the application clock frequency in
order to provide the fastest possible conversion.
A/D converter operation is controlled through the ADCON (A/D Control)
register, see Figure 1. Bits in ADCON start and stop the A/D, flag
conversion completion, and select the converter operating modes. When
10-bit resolution is needed, the A/D mode may be set to give 10 result
bits by setting the ADRES bit to 1. In this mode, the A/D takes longer to
complete a conversion, and the timing must be set differently in ADCFG.
A/D Conversion Modes
The A/D converter supports a single scan mode and a continuous
scan mode. In either mode, one or more A/D channels may be
converted. The ADCS register determines which channels are
converted. If the corresponding bit in the ADCS register is set, that
channel is selected for conversions, otherwise that channel is
skipped. The ADCS register is detailed in Figure 2.
For any A/D conversion, the results are stored in ADRSHn,
corresponding to the A/D channel just converted. For a 10-bit
conversion, the two least significant bits are read from the upper end
of register ADRSL. These bits must be read before another
conversion is begun.
must be supplied in order for the A/D converter to
REF–
(3.3 V max.).
DD
A/D conversions are begun by setting the A/D Start and STatus bit in
ADCON. In the single scan mode, all of the channels selected by
bits in the ADCS register will be converted once. The ADINT flag is
set when the last channel is converted. In the continuous scan
mode, the A/D converter continuously converts all A/D channels
selected by bits in the ADCS register. The ADINT flag is set when all
channels have been converted once.
The A/D converter can generate an interrupt when the ADINT flag is
set. This will occur if the A/D interrupt is enabled (via the EAD bit in
IEL), the interrupt system is enabled (via the EA bit in IEL), and the
A/D interrupt priority (specified in IPA3 bits 3 to 0) is higher than the
currently running code (PSW bits IM3 through IM0) and any other
pending interrupt. ADINT must be cleared by software.
A/D Timing Configuration
The A/D sampling and conversion timing may be optimized for the
particular oscillator frequency and input drive characteristics of the
application. Because A/D operation is mostly dependent on real-time
effects (charging time of sampling capacitors, settling time of the
comparator, etc.), A/D conversion times are not necessarily much
longer at slower clock frequencies. The A/D timing is controlled by
the ADCFG register, as shown in Figure 3, Table 2 and Table 3.
The primary effect of ADCFG settings is to adjust the A/D sample
and hold time to be relatively constant over various clock
frequencies. Two settings (value 6 and B) are provided to allow fast
conversions with a lower external source driving the A/D inputs.
These settings provide double the sample time at the same
frequency. Of course, settings intended for lower frequencies may
also be used at higher frequencies in order to increase the A/D
sampling time, but this method has the side effect of significantly
increasing A/D conversion times.
XA-S3
ADCONAddress:43Eh
Bit Addressable
Reset Value: 00h
BITSYMBOLFUNCTION
ADCON.7—Reserved for future use. Should not be set to 1 by user programs.
ADCON.6—Reserved for future use. Should not be set to 1 by user programs.
ADCON.5—Reserved for future use. Should not be set to 1 by user programs.
ADCON.4—Reserved for future use. Should not be set to 1 by user programs.
ADCON.3ADRESSelects 8-bit (0) or 10-bit (1) conversion mode.
ADCON.2ADMODA/D mode select.
ADCON.1ADSSTA/D start and status. Setting this bit by software starts the A/D conversion of the selected A/D
ADCON.0ADINTA/D conversion complete/interrupt flag. This flag is set when all selected A/D channels are
1999 Oct 05
LSBMSB
ADSSTADMODADRES————
1 = continuous scan of selected inputs after a start of the A/D.
0 = single scan of selected inputs after a start of the A/D.
inputs. ADSST remains set as long as the A/D is in operation. In continuous conversion mode,
ADSST will remain set unless the A/D is stopped by software. While ADSST is set, new start
commands are ignored. An A/D conversion is progress may be aborted by software clearing
ADSST.
converted in either the single scan or continuous scan modes. Must be cleared by software.
Figure 1. A/D Control Register (ADCON)
14
ADINT
SU01229
Loading...
+ 30 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.