SDA6000 Micronas
SDA6000 Micronas
SDA6000 Micronas
SDA 6000
Teletext Decoder
with Embedded
16-bit Controller
M2
For questions on technology, delivery and prices please contact the Micronas Offices in Germany
or the Micronas GmbH Companies and Representatives worldwide:
see our webpage at http://www.micronas.com
Contents
Overview
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 3
1.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 7
1.2 Logic Symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 9
2 Pin Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 3
2.1 Pin Diagram (top view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 3
2.2 Pin Definitions and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 4
3 Architectural Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 3
4 C16X Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 3
4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 3
4.2 Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 5
4.3 On-Chip Microcontroller RAM and SFR Area . . . . . . . . . . . . . . . . . . . . 4 - 7
4.3.1 System Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 9
4.3.2 General Purpose Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 9
4.3.3 PEC Source and Destination Pointers . . . . . . . . . . . . . . . . . . . . . . . 4 - 10
4.3.4 Special Function Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 11
4.4 External Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 12
4.4.1 SDRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 13
4.4.2 External Static Memory Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 13
4.5 External Bus Interface (EBI). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 13
4.5.1 Memory Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 16
4.5.2 Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 19
4.5.3 Crossing Memory Boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 23
4.6 Central Processing Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 24
4.6.1 Instruction Pipelining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 26
4.6.2 Bit-Handling and Bit-Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 32
4.6.3 Instruction State Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 33
4.6.4 CPU Special Function Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 34
5 Interrupt and Trap Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 3
5.1 Interrupt System Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 3
5.1.1 Interrupt Allocation Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 4
5.1.2 Hardware Traps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 6
5.2 Operation of the PEC Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 13
5.2.1 Prioritization of Interrupt and PEC Service Requests . . . . . . . . . . . 5 - 20
5.2.2 Saving the Status during Interrupt Service . . . . . . . . . . . . . . . . . . . 5 - 22
5.2.3 Interrupt Response Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 23
5.2.4 PEC Response Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 25
5.2.5 Fast Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 27
5.3 Trap Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 28
5.3.1 External Interrupt Source Control . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 33
6 System Control & Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 3
A-3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
A-4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
A-5 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
A-6 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
A-7 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
B-1 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
B-2 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
B-3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Preface
M2 is a 16-bit controller based on Infineon’s C16x core with embedded teletext and
graphic controller functions. M2 can be used for a wide range of TV and OSD
applications. This document provides complete reference information on the hardware
of M2.
C-1 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Related Documentation
For easier understanding of this specification it is recommended to read the
documentation listed in the following table. Moreover it gives an overview of the software
drivers which are available for M2.
C-2 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Overview
1 Overview
M2 is designed to provide absolute top performance for a wide spectrum of teletext and
graphic applications in standard and high end TV-sets and VCRs. M2 contains a data
caption unit, a display unit and a high performance Infineon C16x based microcontroller
(so that M2 becomes a one chip TV-controller) an up to level 3.5 teletext decoder and
display processor with enhanced graphic accelerator capabilities. It is not only optimized
for teletext usage but also, due to its extremely efficient architecture, can be used as a
universal graphic engine.
M2 is able to support a wide range of standards like PAL, NTSC or applications like
Teletext, VPS, WSS, Chinatext, Closed Caption and EPG (Electronic Program Guide).
With the support of a huge number of variable character sets and graphic capabilities a
wide range of OSD applications are also open for M2.
A new flexible data caption system enables M2 to slice most data, making the IC an
universal data decoder. The digital slicer concept contains measurement circuitries that
help identify bad signal conditions and therefore support the automatic compensation of
the most common signal disturbances. M2’s enhanced data caption control logic allows
individual programming, which means that every line can carry an individual service to
be sliced and stored in the memory.
The display generation of M2 is based on frame buffer technology. A frame buffer
concept displays information which is individually stored for each pixel, allowing greater
flexibility with screen menus. Proportional fonts, asian characters and even HTML
browsers are just some examples of applications that can now be supported.
Thus, with the M2, the process of generation and display of on-screen graphics is split
up into two independent tasks. The generation of the image in the frame buffer is
supported by a hardware graphics accelerator which frees the CPU from power intensive
address calculations. The graphics accelerator ‘prints’ the characters, at the desired
‘screen’ position, into the frame buffer memory based on a display list provided by the
software.
The second part of the display generator (the screen refresh unit) then reads the frame
buffer according to the programmed display mode and screen refresh rate and converts
the pixel information into an analog RGB signal.
Furthermore, M2 has implemented an RGB-DAC for a maximum color resolution of
state-of-the-art up to 65536 colors, so that the complete graphic functionality is
implemented as a system on chip. The screen resolution is programmable up to SVGA,
to cover today’s and tomorrow’s applications, only limited by the available memory
(64 Mbit) and the maximum pixel clock frequency (50 MHz).
The memory architecture is based on the concept of a unified memory - placing program
code, variables, application data, bitmaps and data captured from the analog TV signal’s
vertical blanking interval (VBI) in the same physical memory. M2’s external bus interface
1-3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Overview
supports SDRAMs as well as ROMs or FLASH ROMs. The organization of the memory
is linear, so that it is easy to program the chip for graphic purposes.
The SW development environment “MATE” is available to simplify and speed up the
development of the software and displayed information. MATE stands for: M2 Advanced
Tool Environment. Using MATE, two primary goals are achieved: shorter Time-to-Market
and improved SW qualitiy. In detail:
• Re-usability
• Target independent development
• Verification and validation before targeting
• General test concept
• Documentation
• Graphical interface design for non-programmers
• Modular and open tool chain, configurable by customer
MATE uses available C166 microcontroller family standard tools as well as a
dedicated M2 tools.
1-4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Overview
Dedicated
C166-Available
UEB11114
1-5 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Overview
M2 Dedicated Tools
Special tools are primarily available for platform independent M2 software development
and secondly to generate data and control code for the M2 graphical user interface (GDI)
without having knowledge of M2 hardware. These are:
• Display Generator Simulator
• Teletext Data Slicer Simulator
• GDI (Graphical Device Interface)
• Teletext Decoder and Display Software for Level 1.5 and Level 2.5
• Mate Display Builder for management, editing, handling and generation of all
necessary data to display OSD’s
• Evaluation Board Simulator to connect a C166 EVA Board to the M2 simulation
The M2 software is written in ANSI-C to fulfil the platform independent development. The
ported software is code and runtime optimized. The layers of the modular architecture
are separated by application program interfaces which ensure independent handling of
the modules.
1-6 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Overview
1.1 Features
General
• Level 1.5, 2.5, 3.5 WST Display Compatible
• Fast External Bus Interface for SDRAM (Up to
8 MByte) and ROM or Flash-ROM (Up to 4 MByte) P-MQFP-128-2
• Embedded General Purpose 16 Bit CPU (Also used
as TV-System Controller, C16x Compatible)
• Display Generation Based on Pixel Memory
• Program Code also Executable From External
SDRAM
• Embedded Refresh Controller for External SDRAM
• Enhanced Programmable Low Power Modes
• Single 6 MHz Crystal Oscillator
• Multinorm H/V-Display Synchronization in Master or Slave Mode
• Free Programmable Pixel Clock from 10 MHz to 50 MHz
• Pixel Clock Independent from CPU Clock
• 3 ⌠ 6 Bits RGB-DACs On-Chip
• Supply Voltage 2.5 and 3.3 V
• P-MQFP-128 Package
Microcontroller Features
• 16-bit C166-CPU Kernel (C16x Compatible)
• 60 ns Instruction Cycle Time
• 2 KBytes Dual Ported IRAM
• 2 KBytes XRAM On-chip
• General Purpose Timer Units (GPT1 and GPT2).
• Asynchronous/Synchronous Serial Interface (ASC0) with IrDA Support. Full-duplex
Asynchronous Up To 2 MBaud or Half-duplex Synchronous up to 4.1 MBaud.
Type Package
SDA 6000 P-MQFP-128-2
1-7 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Overview
Display Features
• OSD size from 0 to 2046 (0 to 1023) pixels in horizontal (vertical) direction
• Frame Buffer Based Display
• 2 HW Display Layers
• Support of Double Page Level 2.5 TTX in 100 Hz Systems
• Support of Transparency for both Layers Pixel by Pixel
• User Programmable Pixel Frequency from 10.0 MHz to 50 MHz
• Up to 65536 Displayable Colors in one Frame
• DMA Functionality
• Graphic Accelerator Functions (Draw Lines, Draw and Fill Rectangle, etc.)
• 1, 2, 4 or 8-bit Bitmaps (up to 256 out of 4096 colors)
• 12 bit/16 bit RGB Mode for Display of up to 65535 Colors
• HW-support for Proportional Characters
• HW-support for Italic Characters
• User Definable Character Fonts
• Fast Blanking and Contrast Reduction Output
Acquisition Features
• Two Independent Data Slicers (One Multistandard Slicer + one WSS-only Slicer)
• Parallel Multi-norm Slicing (TTX, VPS, WSS, CC, G+)
• Four Different Framing Codes Available
• Data Caption only Limited by available Memory
• Programmable VBI-buffer
• Full Channel Data Slicing Supported
• Fully Digital Signal Processing
• Noise Measurement and Controlled Noise Compensation
• Attenuation Measurement and Compensation
• Group Delay Measurement and Compensation
• Exact Decoding of Echo Disturbed Signals
1-8 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Overview
VSS VDD(3.3 V)
Address
XTAL1
16 Bit
XTAL2
RSTIN
Data
CVBS1A 16 Bit
CVBS1B
CVBS2
Port 2
R 8 Bit
G
B
Port 3
COR 15 Bit
BLANK M2
HSYNC Port 4
6 Bit
VSYNC
RD
WR Port 5
6 Bit
CSROM
CSSDRAM
MEMCLK Port 6
7 Bit
UDQM
LDQM
JTAG
CLKEN
4 Bit
VSS VDD(2.5 V)
UEL11115
1-9 Micronas
Pin Description
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Pin Descriptions
2 Pin Descriptions
2-3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Pin Descriptions
P-MQFP-128-2
RSTIN
VDD25-2
VDD33-7
VDD33-6
VSS25-2
VSS33-7
VSS33-6
P5.15
P5.14
P3.15
P3.13
P3.12
P3.11
P3.10
P6.1
P6.0
P3.9
P3.8
P3.7
P3.6
P3.5
P3.4
P3.3
P3.2
P3.1
P3.0
D11
D10
D12
D3
D4
D2
91
81
71
92
82
72
95
89
85
79
75
69
65
88
78
68
96
90
86
80
76
70
66
87
77
67
94
93
84
83
74
73
P6.2 97 64 D5
P6.3 98 63 D9
P6.4 99 62 D13
P6.5 100 61 VDD33-5
P6.6 101 60 VSS33-5
VSYNC 102 59 D1
HSYNC 103 58 D6
COR/RSTOUT 104 57 D8
BLANK/CORBLA 105 56 D14
VDD33-8 106 55 D0
VSS33-8 107 54 D7
XTAL1 108 53 VDD33-4
XTAL2 109 52 VSS33-4
VSSA-1 110 51 D15
VDDA-1 111 50 WR
R 112 P-MQFP-128-2 49 LDQM
G 113 M2 48 UDQM
B 114 47 RD
VSSA-2 115 46 CSROM
VDDA-2 116 45 CLKEN
CVBS2 117 44 CSSDRAM
VSSA-3 118 43 MEMCLK
VDDA-3 119 42 VDD33-3
CVBS1B 120 41 VSS33-3
CVBS1A 121 40 A15/CAS
VSSA-4 122 39 A14/RAS
VDDA-4 123 38 A13
P5.0 124 37 A0
P5.1 125 36 A1
P5.2 126 35 A2
P5.3 127 34 A3
TMODE 128 33 A4
20
21
22
23
24
25
26
27
28
29
30
31
32
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
1
TDI
VSS33-1
VSS25-1
VSS33-2
P2.12
A12
TMS
P2.9
P2.15
P4.3/A19
A9
A5
P2.8
P4.2/A18
TDO
VDD33-1
VDD25-1
A8
VDD33-2
P2.10
P4.4/A20
P4.0/A16
A6
A10
P2.13
P2.14
P4.5/CS3
P4.1/A17
A7
P2.11
A11
TCK
UEP11116
2-4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Pin Descriptions
2-5 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Pin Descriptions
2-6 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Pin Descriptions
2-7 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Pin Descriptions
2-8 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Pin Descriptions
2-9 Micronas
Architectural Overview
3
3-3
CVBS1
Slicer1
ACQ Data 16
Figure 3-1
CVBS2
SDA 6000
Slicer2
Internal
RAM
32 Instr./Data Data 16 2 Kbyte
Ι-Cache CPU-Core
C166
AMI
16...21 16 Boot
ROM
Addr. 16
External
Bus
Interface
16 Interrupt Controller
D-Cache
PEC OSC
Data 16 XTAL
16 X-BUS Instr./Data (6 MHz)
36 nodes (8 ext.)
Architectural Overview
GA SRU
GPT1
4- GPT2 OCDS
T2
Channel USART SPI T5 2
D-Sync T3 Ι C RTC Watchdog
ADC ASC SSC
7-bit T6 JTAG
FIFO T4
3 x 6 Bit
DAC Port 5 Port 3 Port 2 Port 4 Port 6 4
3 6 15 8 8 7
H V UEB10716
PRELIMINARY DATA SHEET
Version 2.1
Micronas
Architectural Overview
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Architectural Overview
3-4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Architectural Overview
The screen refresh unit is used to read the frame buffer pixel by pixel in real time and to
process the transparency and RGB data. A color look up table (CLUT) can be used to
get the RGB data of the current pixel. Afterwards the RGB data is transferred to the D/A
converter. The blank signal and contrast reduction signal (COR) is also processed for
each pixel by the SRU and transferred to the corresponding output pins.
The pixel, line and field frequencies are widely programmable so that the sync system
can be used from low end 50 Hz to high end 100 HZ TV applications as well as for any
other standard.
The on chip clock system provides the M2 with its basic clock signals. Independent
clock domains are provided for the embedded controller, the bus interface and the
display system. The pixel clock can vary between 10 MHz and 50 MHz.
Due to the unified memory architecture of M2, a new bus concept is implemented. An
arbiter handles the bus requests from the different request sources. These are:
• Slicer 1 requests (normally used as a TTX slicer)
• Slicer 2 requests (used as a WSS slicer)
• Graphic accelerator requests
• Screen refresh unit requests
• Data requests from the CPU via XBUS
• Instruction requests via the CPU program bus
For exploiting the full computational power of the controller core the code of time critical
routines can be stored in one bank of the external SDRAM separated from all display
information (frame buffer, character set etc.). An instruction cache (I-CACHE) is used
for buffering instruction words in order to minimize the probability of wait states to occur
when the microcontroller is interfering with the display generator (DG) for access rights
to the external memory devices. The data cache (D-CACHE) serves for operand reads
and writes via the XBUS from/to external memory devices.
The external bus interface (EBI) features interleaved access cycles to one or two static
external memory devices (ROM, Flash-ROM or SRAM) with a total maximum size of
4 MByte and one PC100 compliant (Intel standard) SDRAM device (16 MBit organized
as 2 memory banks or 64 MBit organized as 4 memory banks).
For TV controlling tasks M2 provides three serial interfaces (I2C, ASC, SSC), two general
purpose timers, (GPT1, GPT2), a real time clock (RTC), a watch dog timer (WDT), an A/
D converter and eight external interrupts.
3-5 Micronas
C16X Microcontroller
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
4 C16X Microcontroller
4-3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
4.1 Overview
M2’s microcontroller and its peripherals are based on a Cell-Based Core (CBC) which is
compatible to the well known C166 architecture.
In M2, the CPU and its peripherals are generally clocked with 33.33 MHz which results
in an instruction cycle time of 60 ns. The implementation of the microcontroller within M2
deviates from other known C16x derivates since the controller’s XBUS is not used as the
external bus. All external access cycles of the microcontroller, the display generator and
the acquisition unit are performed via a high performance time interlocking SDRAM bus.
The external bus interface (EBI) manages the arbitration procedure for access cycles to
the external synchronous DRAM in parallel to an external static memory (ROM or
FLASH; for more details refer to Chapter 4.4).
Due to the realtime critical bus bandwidth requirements of the display generator,
unpredictable wait-states for the controller may occur. These wait-states do not destroy
the overall average system performance, because they are mostly buffered by the CPU
related instruction and data buffers. Nevertheless they can influence, for example, the
worst disconnection response time.
Emulation is now performed by an on-chip debug module which can be accessed by a
JTAG interface.
The following microcontroller peripherals are implemented:
• 2 KByte IRAM (System RAM)
• 2 KByte XRAM (XBUS located)
• 32 Interrupt Nodes
• General Purpose Timer Units (GPT1 and GPT2)
• Real Time Clock (RTC)
• Asynchronous/Synchronous Serial Interface (ASC0)
• High-Speed Synchronous Serial Interface (SSC)
• I2C Bus Interface (I2C)
• 4-Channel 8-bit A/D Converter (ADC)
• Watchdog Timer (WDT)
• On-Chip Debug Support Module (OCDS)
• 42 Multiple Purpose Ports
4-4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Interrupt Controller
Up to 32 interrupt sources can be managed by the Interrupt Controller through a multiple
priority system which provides the user with the ability to customize the interrupt
handling.
The interrupt system of M2 includes a Peripheral Event Controller (PEC). This processor
performs single-cycle interrupt-driven byte or word transfers between any two locations
in the entire memory space of M2.
In M2, the PEC functionalities are extended by the External PEC which allows an
external device to trigger a PEC transfer while providing the source and destination
pointers. New features also include the packet transfer mode and the channel link mode.
Besides user interrupts, the Interrupt Controller provides mechanisms to process
exceptions or error conditions, so-called “hardware traps”, that arise during program
execution.
4-5 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
OCDS
The On-Chip Debug System allows the detection of specific events during user program
execution through software and hardware breakpoints. An additional communication
module allows communication between the OCDS and an external debugger, through a
standard JTAG port. This communication is performed in parallel to program execution.
4-6 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
4-7 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
External M2
Memory
DG
SDRAM
Boot ROM
PMBUS
ROM1 EBI ICACHE
C16X
XBUS
AMI DCACHE
ROM2
ACQ
UED11214
4-8 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Figure 4-2 Storage of Words, Byte and Bits in a Byte Organized Memory
Note: Byte units forming a single word or a double word must always be stored within
the same physical (internal, external, ROM, RAM) and organizational (page,
segment) memory area.
4-9 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
00’C000 H
Page 2 2 Kbyte
IRAM 00’FA00 H
00’8000 H
Page 1 00’F600 H
00’4000 H
Reserved
00’F200 H
Page 0
ESFR Area
00’0000 H 00’F000 H
UED11213
4 - 10 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Code accesses are always made through even byte addresses. The highest possible
code storage location in the IRAM is either 00’FDFEH for single word instructions, or
00’FDFCH for double word instructions. The respective location must contain a branch
instruction (unconditional), because sequential boundary crossings from IRAM to the
SFR area are not supported and cause erroneous results.
Any word and byte data in the IRAM can be accessed via indirect or long 16-bit
addressing modes if the selected DPP register points to page 3. Any word data access
is made through an even byte address. The highest possible word data storage location
in the IRAM is 00’FDFEH. For PEC data transfers, the IRAM can be accessed
independent of the contents of the DPP registers via the PEC source and destination
pointers.
The upper 256 Byte of the IRAM (00’FD00 H through 00’FDFFH) and the GPRs of the
current bank are provided for single bit storage, and thus they are bit addressable.
For all system stack operations, the IRAM is accessed via the Stack Pointer (SP)
register. The stack grows downward from higher to lower RAM address locations. Only
word accesses are supported by the system stack. A stack overflow (STKOV) and a
stack underflow (STKUN) register are provided to control the lower and upper limits of
the selected stack area. These two stack boundary registers can be used not only for
protection against data destruction, but also to implement flushing and filling a circular
stack with a hardware supported system stack (except for option ‘111’).
4 - 11 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
M2 supports fast register bank (context) switching. Multiple register banks can physically
exist within the IRAM at the same time. However, only the register bank selected by the
Context Pointer register (CP) is active at a given time. Selecting a new active register
bank is simply done by updating the CP register. A particular Switch Context (SCXT)
instruction performs register bank switching and automatically saves the previous
4 - 12 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
context. The number of implemented register banks (arbitrary sizes) is only limited by the
size of the available internal RAM.
00’FD00 H
00’FDDE H
PEC
Source
and
Destination Internal
Pointers RAM
00’F5FE H
00’FCE0 H SRCP0
MCD02266
4 - 13 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
4 - 14 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Note: The tools are equipped to monitor accesses to the ESFR area and will
automatically insert EXTR instructions or issue a warning in case of missing or
excessive EXTR instructions.
4 - 15 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
4.4.1 SDRAM
PC SDRAM compliant (Intel standard) memory devices with 2 or 8 MByte and a
minimum clock period of 10 ns (latency 3) may be connected to M2’s external memory
bus.
Supported data organizations are given below:
4 - 16 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
4 - 17 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
ROM ROM
2...8 MByte
or or
SDRAM
Flash-ROM Flash-ROM
(2...4 banks)
128 KByte...4 MByte 128 KByte...4 MByte
M2
UEB11118
4 - 18 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
address locations are in different SDRAM banks. Detailed timings and the specification
of setup and hold conditions can be found in Chapter 14.
MEMCLK
CSSDRAM
Act
RAS
Read Write
CAS
WR
A(21:0) ca ROM_Adr ra ra
CSROM
RD
UET11119
4 - 19 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
MEMCLK
A (9:0) ra ca ca ra ca ra
A10 ra ra ra
Bank 1 Bank 0
A11 b1 b1 b1 b1 b0 b0 b1 b1
A (9:0) ra ca ca ra ca ra
A10 ra ra ra
A11 ra ra ra
Bank Y Bank X
A(13:12) by by by by bx bx by by
Precharge Activate Activate Precharge Activate
dx dy dy dx
D(15:0) 6 7 8 1 2 3 4 1 2 3 4 5 6 7 8 1 zo
UET11120
4 - 20 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
D D
XBUS
80’0000 H 80’0000 H
S2
60’0000 H S2
S1 41’0000 H
41’0000 H
41’0000 H
40’0000 H 40’0000 H
A PMBUS
C
01’8000 H S1
00’8000 H
00’0000 H 00’0000 H
B UED11212
4 - 21 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Access to segments 65 to 255 selects the XBUS. This address range (41’0000H ...
FF’FFFFH) is not remapped by the C16x.
b) Mapping by caches:
In normal operation mode the address requested by the controller is not altered by
ICACHE and DCACHE. In bootstrap loader mode, instruction fetches via the
ICACHE are mapped to the boot ROM by the ICACHE:
• Address is mapped to address mod 40H
Operand reads via ICACHE and all accesses via DCACHE are passed unaltered to
the AMI.
c) Mapping and redirection in AMI:
Address mapping in AMIdepends on the settings of the ESFRs REDIR and REDIR1
as well as on the total amount of static memory. The mapping is done in the
following order:
1) Check for redirection via REDIR1: If the requested address lies in segment 255
the segment address is replaced by the low byte of REDIR1.
2) Check for redirection via REDIR: If the address resulting from step1 lies in the
address range specified by REDIR, the address is shifted to SDRAM area:
• Address is mapped to 80’0000H + address – REDIR_LOWER 16 kBytes
3) If the total amount of static memeory in 4 MBytes or less (i.e. SALSEL “111”
or SALSEL = “111” and no second device present) and the address resulting from
step 2 is below 4 MBytes the address is shifted by 4 MBytes:
• Address is mapped to address + 40’0000H
This means that the address ranges 02’0000H ... 40’FFFFH (PMBUS) and 41’0000H
... 7F’FFFFH (XBUS) in the address space of the C16x are mapped to the same
physical memory. The overlap allows to make use of 2 independent busses for
code (PMBUS) and data (XBUS) for fast parallel access.
If the total amount of static memory is 8 MBytes (i.e. SALSEL = “111” and a second
device is present) no further mapping occurs.
d) Mapping to addresses of specific physical devices by EBI:
1) dynamic memory:
• addresses 80’0000H ... FF’FFFFH (9F’FFFFH) access the 64MBit (16 MBit) SDRAM
(CSSDRAM)
2) static memory:
In the total amount of static memory is 4 MBytes or less (see above) the requests
of the AMI or the DG in the address range 40’0000H ... 7F’FFFFH are passed to the
external static memory devices according to the SALSEL and CSENA settings (see
Chapter 6.1). The address range 00’0000H ... 3F’FFFFH must not be used. If the
total amount of the static memory is 8 MBytes there is no reserved address range:
4 - 22 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
• Addresses 00’0000H ... 3F’FFFFH access the first static memory device (CSROM)
• Addresses 40’0000H ... 7F’FFFFH access the second static memory device (CS3)
The addresses shown on the external address lines of M2 are word oriented,
starting at 0 for each device.
The External Bus Interface (EBI) provides a special mode, the “EBI direct mode”, where
the control pins to the SDRAM device are directly controlled by the CPU while the HW
finite state machines of the EBI are bypassed. “EBI direct mode” is used for
accomplishing operations on the SDRAM such as the execution of the requisite
initialization sequence, power down mode entry/exit etc. When executing a direct mode
command the EBI shifts the contents of register EBIDIR into the SDRAM control lines.
The Micronas SDRAM driver (refer to document list) provides appropriate functions for
executing operations in direct mode.
rw rw
Bit Function
REDIR_LOWER Base address of selected range in the ROM Area
(7:0) Bitfield REDIR_LOWER specifies the MSBs of the base address of
the selected range.
REDIR_UPPER Upper address of selected range in the ROM Area (exclusive)
(7:0) Bitfield REDIR_UPPER specifies the MSBs of the first no longer
redirected 16 KBytes.
To gain access to memory areas covered by the read only PMBUS or to areas not
accessible at all (see Figure 4-8) accesses to segment 255 can be redirected to any
other segment in EBI address space.
4 - 23 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
rw
Bit Function
REDIR1_SEG For access to segment 255, the segment part of the address is
(7:0) replaced by REDIR1_SEG.
The configuration of the “External Bus Interface” and its operation mode is defined with
the EBICON register.
EBICON Reset Value: 0000H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - - - - - - - REF SDR ED ED
EN SZE MA MR
rw r r rw
Bit Function
EDMR EBI Direct Mode Request Flag
‘0’: EBI direct mode is disabled
‘1’: EBI direct mode is enabled
Note: This bit is only used for EBI direct mode.
EDMA EBI Direct Mode Acknowledge Flag
‘0’: The EBI has not (yet) entered direct mode
‘1’: The EBI has entered direct mode
Note: This bit is only used for EBI direct mode.
SDRSZE SDRAM Size
‘0’: 16 MBit (2 ⌠ 2048 ⌠ 256 ⌠ 2B), 2 banks (bank = adr_11)
‘1’: 64 MBit (4 ⌠ 4096 ⌠ 256 ⌠ 2B), 4 banks (bank = adr_13:12)
REFEN Refresh Controller Enable Bit
‘0’: Refresh controller for SDRAM is disabled
‘1’: Refresh controller for SDRAM is enabled
The EDMR request flag and the hardware controlled acknowledge flag EDMA are used
during “EBI direct mode” for implementing a four-phase handshake which guarantees
that each direct mode command is executed exactly once by the EBI.
4 - 24 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Phase I II III IV
EDMR
EDMA
UET11123
When executing a direct mode command the EBI shifts the contents of register EBIDIR
into the external control pins of the SDRAM.
EBIDIR Reset Value: 0000H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - - - - - CLK CS RAS CAS WR ADR
EN _N _N _N _N _10
rw rw rw rw rw rw
Bit Function
ADR_10 Control Bit for Address Pin A10 in Direct Mode
WR_N Control Bit for Pin WR in Direct Mode
CAS_N Control Bit for Pin CAS (A15) in Direct Mode
RAS_N Control Bit for Pin RAS (A14) in Direct Mode
CS_N Control Bit for Pin CSSDRAM in Direct Mode
CLKEN Control Bit for Pin CLKEN in Direct Mode
4 - 25 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
The setting required for initiating a certain command on the SDRAM has to be written to
the EBIDIR register before the direct mode request, the EDMR bit in the EBICON
register is asserted.
The following table shows the commands that may be executed in direct mode along
with the associated settings of the EBIDIR register.
The MRS command (mode register set) is used to program the SDRAM for the desired
operating mode. When executing the MRS command, address lines A11-A10 encode
the operating mode. M2 then issues a hardwired pattern that sets the SDRAM to latency
mode 3, wrap type linear and burst length 4.
For the correct handling of access cycles the user has to provide the EBI with information
about the external memory configuration and memory sizes. The combination of reset
configuration and the SDRSZE bit of the EBICON register includes all the information
needed. Based on these inputs the EBI constructs its internal address map for allocating
ROM devices and SDRAM banks.
The external memory configuration is defined with bit CSENA of the RP0H register (refer
to Chapter 6.1). The memory configuration controls the correct behavior of pin CS3.
4 - 26 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
.
Bit Function
CSENA Chip Select Enable
‘0’: CS3 is active for 2nd ROM device
‘1’: CS3 is inactive
The allocation of address ranges for the SDRAM banks is controlled through the
SDRSZE bit.
SDRSZE = ‘0’ (16 MBit): Address Ranges of Banks
Bank Address Range
Bank1 80’0000H - 8F’FFFFH
Bank2 90’0000H - 9F’FFFFH
If a second ROM device is enabled, its base address depends on the maximum size of
both ROM devices as defined within bit field SALSEL of register RP0H during reset.
.
4 - 27 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
blocks (code or data) or areas requires special attention to ensure that the controller
executes the desired operations.
Memory Areas are partitions of the address space that represent different kinds of
memory (if provided at all). These memory areas are the internal RAM/SFR area, the
program memory (if available), the on-chip X-Peripherals (if integrated) and the external
memory.
Accessing subsequent data locations that belong to different memory areas is no
problem. However, when executing code, the different memory areas must be switched
explicitly via branch instructions. Sequential boundary crossing is not supported and
leads to erroneous results.
Note: Changing from the external memory area to the internal RAM/SFR area takes
place within segment 0.
Segments are contiguous blocks of 64 KByte each. They are referenced via the code
segment pointer CSP for code fetches and via an explicit segment number for data
accesses overriding the standard DPP scheme.
During code fetching segments are not changed automatically, but rather must be
switched explicitly. The instructions JMPS, CALLS and RETS will do this.
In larger sequential programs make sure that the highest used code location of a
segment contains an unconditional branch instruction to the respective following
segment, to prevent the prefetcher from trying to leave the current segment.
Data Pages are contiguous blocks of 16 KByte each. They are referenced via the data
page pointers DPP3…0 and via an explicit data page number for data accesses
overriding the standard DPP scheme. Each DPP register can select one of the 1024
possible data pages. The DPP register that is used for the current access is selected via
the two upper bits of the 16-bit data address. Subsequent 16-bit data addresses that
cross the 16 KByte data page boundaries will therefore use different data page pointers,
while the physical locations need not be subsequent within memory.
4 - 28 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
CPU 16
Internal
SP MDH RAM
STKOV MDL R15
STKUN
Exec. Unit Mul/Div-HW
Instr. Ptr. Bit-Mask Gen General
R15
Instr. Reg.
32 ALU Purpose
4-Stage (16-bit)
ROM Pipeline Registers
Barrel - Shifter
PSW R0
SYSCON Context Ptr.
BUSCON 0 16
R0
BUSCON 1 ADDRSEL 1
BUSCON 2 ADDRSEL 2
BUSCON 3 ADDRSEL 3
BUSCON 4 ADDRSEL 4
MCB02147
4 - 29 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Peripheral units are connected to the CPU by the peripheral bus or the XBUS and can
work practically independent of the CPU. Data and control information is interchanged
between the CPU and these peripherals by Special Function Registers (SFRs) or
external memory locations, depending on to which bus they are connected. Whenever
peripherals need a non-deterministic CPU action, the Interrupt Controller compares all
pending peripheral service requests with each other and prioritizes one of them. If the
priority of the current CPU operation is lower than the priority of the selected peripheral
request, an interrupt will occur.
Basically, there are two types of interrupt processing:
• Standard interrupt processing forces the CPU to save the current program status
and the return address to the stack before branching to the interrupt vector jump table.
• PEC interrupt processing steals just one machine cycle from the current CPU
activity to perform a single data transfer via the on-chip Peripheral Event Controller
(PEC).
System errors detected during program execution (so-called hardware traps) are also
processed as standard interrupts with a very high priority.
Besides its normal operation there are the following particular CPU states:
• Reset state: Any reset (hardware, software, watchdog) forces the CPU into a
predefined active state.
• IDLE state: The clock signal to the CPU itself is switched off, while the clocks for the
peripherals keep running.
• POWER DOWN state: All of the on-chip clocks are switched off.
A transition into an active CPU state is forced by an interrupt (if in IDLE mode) or by a
reset (if in POWER DOWN mode).
The IDLE, POWER DOWN and RESET states can be entered by particular system
control instructions.
A set of Special Function Registers is dedicated to the functions of the CPU core:
• General System Configuration: SYSCON (RP0H)
• CPU Status Indication and Control: PSW
• Code Access Control: IP, CSP
• Data Paging Control: DPP0, DPP1, DPP2, DPP3
• GPRs Access Control: CP
• System Stack Access Control: SP, STKUN, STKOV
• Multiply and Divide Support: MDL, MDH, MDC
• ALU Constants Support: ZEROS, ONES
4 - 30 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
1st –>FETCH:
In this stage the instruction selected by the Instruction Pointer (IP) and the Code
Segment Pointer (CSP) is fetched from either the program memory, internal RAM, or
external memory.
2nd –>DECODE:
In this stage the instructions are decoded and, if required, the operand addresses are
calculated and the respective operands are fetched. For all instructions, which implicitly
access the system stack, the SP register is either decremented or incremented, as
specified. For branch instructions the Instruction Pointer and the Code Segment Pointer
are updated to the desired branch target address (provided that the branch is taken).
3rd –>EXECUTE:
In this stage an operation is performed on the previously fetched operands in the ALU.
In addition, the condition flags in the PSW register are updated, as specified by the
instruction. All explicit writes to the SFR memory space and all auto-increment or auto-
decrement writes to GPRs used as indirect address pointers are also performed during
the execute stage of an instruction.
4 - 31 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
1 Machine Cycle
FETCH I1 I2 I3 I4 I5 I6
DECODE I1 I2 I3 I4 I5
EXECUTE I1 I2 I3 I4
WRITEBACK I1 I2 I3
Time
UED11124
Time
UED11125
4 - 32 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Injection of Cached
Injection Target Instruction
1 Machine Cycle
4 - 33 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
possible conflicts (e.g. multiple usage of buses) in a time optimized way and thus usually
avoids the pipeline being noticed by the user. However, there are some very rare cases,
where the CPU, being a pipelined machine, requires attention by the programmer. In
these cases the delays caused by pipeline conflicts can be used for other instructions in
order to optimize performance.
4 - 34 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
In+2 : POP R0 ; pop word value from new top of stack into
R0
Note: Conflicts with instructions writing to the stack (PUSH, CALL, SCXT) are solved
internally by the CPU logic.
Controlling Interrupts
Software modifications (implicit or explicit) of the PSW are done in the execute phase of
the respective instructions. In order to maintain fast interrupt responses, however, the
current interrupt prioritization round does not consider these changes, i.e. an interrupt
request may be acknowledged after the instruction that disables interrupts via IEN or
ILVL or after the subsequent instructions. Timecritical instruction sequences therefore
should not begin directly after the instruction disabling interrupts, as shown in the
following example:
INT_OFF: BCLR IEN ; globally disable interrupts
IN-1 ; non-critical instruction
CRIT_1ST: IN ; begin of uninterruptable critical sequence
...
CRIT_LAST:IN+x ; end of uninterruptable critical sequence
INT_ON: BSET IEN ; globally re-enable interrupts
Note: The described delay of 1 instruction also applies for enabling the interrupts system
i.e. no interrupt requests are acknowledged until the instruction after the enabling
instruction.
4 - 35 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Timing
Instruction pipelining reduces the average instruction processing time on a wide scale
(usually from four to one machine cycles). However, there are some rare cases where a
particular pipeline situation causes the processing time for a single instruction to be
extended either by a half or by one machine cycle. Although this additional time
represents only a tiny part of the total program execution time, it might be of interest to
avoid these pipeline-caused time delays in time critical program modules.
Besides a general execution time description, the following section provides some hints
on how to optimize time-critical program parts with regard to such pipeline-caused timing
particularities.
4 - 36 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Execution from the internal RAM provides flexibility in terms of loadable and modifiable
code on the account of execution time.
4 - 37 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Execution from external memory strongly depends on the selected bus mode and the
programming of the bus cycles (wait-states).
The operand and instruction accesses listed below can extend the execution time of an
instruction:
• Internal code memory operand reads (same for byte and word operand reads)
• Internal RAM operand reads via indirect addressing modes
• Internal SFR operand reads immediately after writing
• External operand reads
• External operand writes
• Jumps to non-aligned double word instructions in the program memory space
• Testing Branch Conditions immediately after PSW writes
4 - 38 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ROM SGT ROM CS RSO
STKSZ(2..0) - - - - - XPEN - -
S1 DIS EN CFG EN
rw rw rw rw rw rw rw
Bit Function
XPEN XBUS Peripheral Enable Bit
‘0’: Accesses to the on-chip X-Peripherals and their functions are
disabled.
‘1’: The on-chip X-Peripherals are enabled and can be accessed.
RSOEN Reset Output Enable Bit
‘0’: The contrast reduction signal is driven on pin 104.
‘1’: The reset output signal is driven on pin 104, i.e. pin 104 is pulled
low during internal reset sequence.
Note: Refer also to Chapter 6.7
CSCFG Select Line Configuration Control
‘0’: Latched select line mode for X-Peripherals.
‘1’: Select lines for access cycles via XBUS are directly derived from
the address lines.
Note: CSCFG = ‘1’ is recommended. The effect of the switch is not
visible at an external interface.
ROMEN PM-Bus Enable Bit
‘0’: PM-Bus disabled: accesses to the ROM area use the XBUS.
‘1’: PM-Bus enabled: PM-Bus enabled for access cycles to the ROM
area.
Note: The recommended value ROMEN = ‘1’ is set by hardware during
reset.
SGTDIS Segmentation Disable/Enable Control
‘0’: Segmentation enabled (CSP is saved/restored during interrupt
entry/exit).
‘1’: Segmentation disabled (Only IP is saved/restored).
4 - 39 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Bit Function
ROMS1 Internal ROM Mapping
‘0’: External ROM area mapped to segment 0
(00’0000H … 00’7FFFH)
‘1’: External ROM area mapped to segment 1
(01’0000H … 01’7FFFH).
Note: ROMS1 = ‘0’ is recommended.
STKSZ System Stack Size
(2 … 0) Selects the size of the system stack (in the internal RAM) from 32 to
1024 words.
Note: Register SYSCON cannot be changed after execution of the EINIT instruction.
4 - 40 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ILVL(3..0) IEN HLD - - - USR0 MUL E Z V C N
EN IP
rw rw rw rw rw rw rw rw rw rw
Bit Function
N Negative Result
Set, when the result of an ALU operation is negative.
C Carry Flag
Set, when the result of an ALU operation produces a carry bit.
V Overflow Result
Set, when the result of an ALU operation produces an overflow.
Z Zero Flag
Set, when the result of an ALU operation is zero.
E End of Table Flag
Set, when the source operand of an instruction is 8000H or 80H.
MULIP Multiplication/Division In Progress
‘0’: There is no multiplication/division in progress.
‘1’: A multiplication/division has been interrupted.
USR0 User General Purpose Flag
May be used by the application software.
HLDEN, Interrupt and EBC Control Fields
ILVL, IEN Define the response to interrupt requests and enable external bus
arbitration.
4 - 41 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
• N-Flag: For most of the ALU operations, the N-flag is set to ‘1’ if the most significant
bit of the result contains a ‘1’, otherwise it is cleared. In the case of integer operations
the N-flag can be interpreted as the sign bit of the result (negative: N = ‘1’, positive:
N = ‘0’). Negative numbers are always represented as the 2’s complement of the
corresponding positive number. The range of signed numbers extends from ‘–8000H’
to ‘+7FFFH’ for the word data type, or from ‘–80H’ to ‘+7FH’ for the byte data type. For
Boolean bit operations with only one operand, the N-flag represents the previous state
of the specified bit. For Boolean bit operations with two operands, the N-flag
represents the logical XORing of the two specified bits.
• C-Flag: After an addition, the C-flag indicates that a carry from the most significant bit
of the specified word or byte data type has been generated. After a subtraction or a
comparison, the C-flag indicates a borrow, which represents the logical negation of a
carry for the addition.
This means that the C-flag is set to ‘1’ if no carry from the most significant bit of the
specified word or byte data type has been generated during a subtraction, which is
performed internally by the ALU as a 2’s complement addition, and the C-flag is
cleared when this complement addition causes a carry.
The C-flag is always cleared for logical, multiply and divide ALU operations, because
these operations cannot cause a carry.
For shift and rotate operations the C-flag represents the value of the bit last shifted
out. If a shift count of zero is specified, the C-flag will be cleared. The C-flag is also
cleared for a prioritized ALU operation because a ‘1’ is never shifted out of the MSB
during the normalization of an operand.
For Boolean bit operations with only one operand the C-flag is always cleared. For
Boolean bit operations with two operands the C-flag represents the logical ANDing of
the two specified bits.
• V-Flag: For addition, subtraction and 2’s complementation the V-flag is always set to
‘1’, if the result overflows the maximum range of signed numbers, which are
representable by either 16 bits for word operations (‘–8000H’ to ‘+7FFFH’), or by 8 bits
for byte operations (‘–80H’ to ‘+7FH’), otherwise the V-flag is cleared. Note that the
result of an integer addition, integer subtraction, or 2’s complement is not valid if the
V-flag indicates an arithmetic overflow.
For multiplication and division the V-flag is set to ‘1’ if the result cannot be represented
in a word data type, otherwise it is cleared. Note that a division by zero will always
cause an overflow. In contrast to the result of a division, the result of a multiplication
is valid regardless of whether the V-flag is set to ‘1’ or not.
Since logical ALU operations cannot produce an invalid result, the V-flag is cleared by
these operations.
The V-flag is also used as a “Sticky Bit” for rotate right and shift right operations. By
only using the C-flag, a rounding error caused by a shift right operation can be
estimated up to a quantity of one half of the LSB of the result. In conjunction with the
4 - 42 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
V-flag, the C-flag allows the evaluation of the rounding error with a finer resolution
(see Table 4-3).
For Boolean bit operations with only one operand the V-flag is always cleared. For
Boolean bit operations with two operands the V-flag represents the logical ORing of
the two specified bits.
• Z-Flag: The Z-flag is normally set to ‘1’ if the result of an ALU operation equals zero,
otherwise it is cleared.
For the addition and subtraction with carry, the Z-flag is only set to ‘1’ if the Z-flag
already contains a ‘1’ and the result of the current ALU operation additionally equals
zero. This mechanism is provided for the support of multiple precision calculations.
For Boolean bit operations with only one operand the Z-flag represents the logical
negation of the previous state of the specified bit. For Boolean bit operations with two
operands the Z-flag represents the logical NORing of the two specified bits. For the
prioritized ALU operation the Z-flag indicates whether the second operand is zero or
not.
• E-Flag: The E-flag can be altered by instructions, which perform ALU or data
movement operations. The E-flag is cleared by those instructions which cannot be
reasonably used for table search operations. In all other cases the E-flag is set
depending on the value of the source operand to signify whether the end of a search
table is reached or not. If the value of the source operand of an instruction equals the
lowest negative number, which is representable by the data format of the
corresponding instruction (‘8000H’ for the word data type, or ‘80H’ for the byte data
type), the E-flag is set to ‘1’, otherwise it is cleared.
• MULIP-Flag: The MULIP-flag will be set to ‘1’ by hardware upon entry to an interrupt
service routine, when a multiply or divide ALU operation was interrupted before
completion. Depending on the state of the MULIP bit, the hardware decides whether
multiplication or division must be continued or not after the end of an interrupt service.
The MULIP bit is overwritten with the contents of the stacked MULIP-flag when the
return-from-interrupt-instruction (RETI) is executed. This normally means that the
MULIP-flag is cleared again after that.
Note: The MULIP flag is a part of the task environment. When the interrupting service
routine does not return to the interrupted multiply/divide instruction (i.e. as in the
4 - 43 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
case of a task scheduler that switches between independent tasks), the MULIP
flag must be saved as part of the task environment and must be updated
accordingly for the new task before this task is entered.
r/w
Bit Function
ip(15 … 0) Specifies the intra segment offset, from where the current instruction is
to be fetched. IP refers to the current segment <SEGNR>.
4 - 44 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
- - - - - - - - r
Bit Function
SEGNR Segment Number
(7 … 0) Specifies the code segment, from where the current instruction is to be
fetched. SEGNR is ignored when segmentation is disabled.
Code memory addresses are generated by directly extending the 16-bit contents of the
IP register by the contents of the CSP register, as shown in Figure 4-14.
In case of the segmented memory mode the selected number of segment address bits
(via bit field SALSEL) of the CSP register is output on the respective segment address
pins of Port 4 for all external code accesses. For non-segmented memory mode the
content of this register is not significant, because all code accesses are automatically
restricted to segment 0.
Note: The CSP register can only be read but not written by data operations. It is,
however, modified either directly by means of the JMPS and CALLS instructions,
or indirectly via the stack by means of the RETS and RETI instructions.
Upon the acceptance of an interrupt or the execution of a software TRAP
instruction, the CSP register is automatically set to zero.
4 - 45 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
254
FE’0000 H
1
01’0000 H 24/20/18-Bit Physical Code Address
0
00’0000 H
MCA02265
- - - - - - rw
DPP1 Reset Value: 0001H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - DPP1PN
- - - - - - rw
4 - 46 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
- - - - - - rw
DPP3 Reset Value: 0003H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - DPP3PN
- - - - - - rw
Bit Function
DPPxPN Data Page Number of DPPx
Specifies the data page selected via DPPx. Only the least significant two
bits of DPPx are significant, when segmentation is disabled.
The DPP registers are implicitly used whenever data accesses to any memory location
are made via indirect or direct long 16-bit addressing modes (except for override
accesses via EXTended instructions and PEC data transfers). After reset, the Data Page
Pointers are initialized in a way that all indirect or direct long 16-bit addresses result in
identical 18-bit addresses. This allows access to data pages 3 … 0 within segment 0 as
shown in the figure below. If the user does not want to use any data paging, no further
action is required.
Data paging is performed by concatenating the lower 14 bits of an indirect or direct long
16-bit address with the contents of the DPP register selected by the upper two bits of the
16-bit address. The contents of the selected DPP register specify one of the 1024
possible data pages. This data page base address, together with the 14-bit page offset,
forms the physical 24-bit address (selectable part is driven to the address pins).
In case of non-segmented memory mode, only the two least significant bits of the
implicitly selected DPP register are used to generate the physical address. Thus,
extreme care should be taken when changing the content of a DPP register if a non-
segmented memory model is selected, because otherwise unexpected results could
occur.
In case of the segmented memory mode the selected number of segment address bits
(via bit field SALSEL) of the respective DPP register is output on the respective segment
address pins of Port 4 for all external data accesses.
A DPP register can be updated via any instruction, which is capable of modifying an
SFR.
4 - 47 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Note: Due to the internal instruction pipeline, a new DPP value is not yet usable for the
operand address calculation of the instruction immediately following the updating
of the DPP register by the instruction.
DPP Registers
3 DPP3-11 14-Bit
Intra-Page Address
2 DPP2-10
(concatenated with
1 DPP1-01 content of DPPx).
0 DPP0-00
Affer reset or with segmentation disabled the DPP registers select data pages 3...0.
All of the internal memory is accessible in these cases.
MCA02264
r r r r rw r
Bit Function
cp Modifiable Portion of Register CP
Specifies the (word) base address of the current register bank.
When writing a value to register CP with bits CP.11 … CP.9 = ‘000’, bits
CP.11 … CP.10 are set to ‘11’ by hardware, in all other cases all bits of
bit field “cp” receive the written value.
4 - 48 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Note: It is the user's responsibility that the physical GPR address specified via CP
register plus short GPR address must always be an internal RAM location. If this
condition is not met, unexpected results may occur.
• Do not set CP below the IRAM start address, i.e. 00’FA00H/00’F600H/00’F200H
(1/2/3KB)
• Do not set CP above 00’FDFEH
• Be careful when using the upper GPRs with CP above 00’FDE0H
The CP register can be updated via any instruction which is capable of modifying an
SFR.
Note: Due to the internal instruction pipeline, a new CP value is not yet usable for GPR
address calculations of the instruction immediately following the instruction
updating the CP register.
The Switch Context instruction (SCXT) allows the saving of the contents of the CP
register onto the stack and updating of it with a new value in just one machine cycle.
4 - 49 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
Short 4-Bit GPR Addresses (mnemonic: Rw or Rb) specify an address relative to the
memory location specified by the contents of the CP register, i.e. the base of the current
register bank.
Depending on whether a relative word (Rw) or byte (Rb) GPR address is specified, the
short 4-bit GPR address is sometimes multiplied by two before it is added to the contents
of the CP register (see Figure 4-17). Thus, in this way, both byte and word GPR
accesses are possible.
GPRs used as indirect address pointers are always word accessed. For some
instructions only the first four GPRs can be used as indirect address pointers. These
GPRs are specified by short 2-bit GPR addresses. The respective physical address
calculation is identical to that for the short 4-bit GPR addresses.
Short 8-Bit Register Addresses (mnemonic: reg or bitoff), within a range from F0H to
FFH, interpret the four least significant bits as short 4-bit GPR addresses, while the four
most significant bits are ignored. The respective physical GPR address calculation is
identical to that for the short 4-bit GPR addresses. For single bit accesses on a GPR, the
GPR's word address is calculated as described above, but the position of the bit within
the word is specified by a separate additional 4-bit value.
4 - 50 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
(usually bigger) can be realized via software. This mechanism is supported by the
STKOV and STKUN registers (see respective descriptions below).
The SP register can be updated via any instruction, which is capable of modifying an
SFR.
Note: Due to the internal instruction pipeline, a POP or RETURN instruction must not
immediately follow an instruction updating the SP register.
SP Reset Value: FC00H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 1 1 sp 0
r r r r rw r
Bit Function
sp Modifiable portion of register SP
Specifies the top of the internal system stack.
r r r r rw r
Bit Function
stkov Modifiable portion of register STKOV
Specifies the lower limit of the internal system stack.
The Stack Overflow Trap (entered when (SP) < (STKOV)) may be used in two different
ways:
• Fatal error indication treats the stack overflow as a system error through the
associated trap service routine. Under these circumstances data in the bottom of the
4 - 51 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
stack may have been overwritten by the status information stacked upon the stack
overflow trap service.
• Automatic system stack flushing allows the use of the system stack as a “Stack
Cache” for a bigger external user stack. In this case the STKOV register should be
initialized to a value which represents the desired lowest Top of Stack address plus
12 according to the selected maximum stack size. This takes into consideration the
worst case that could occur, when a stack overflow condition is only detected during
entry into an interrupt service routine. Then, six additional stack word locations are
required to push IP, PSW, and CSP for both the interrupt service routine and the
hardware trap service routine.
r r r r rw r
Bit Function
stkun Modifiable portion of register STKUN
Specifies the upper limit of the internal system stack.
The Stack Underflow Trap (entered when (SP) > (STKUN)) may be used in two different
ways:
• Fatal error indication treats the stack underflow as a system error through the
associated trap service routine.
• Automatic system stack refilling allows the use of the system stack as a “Stack
Cache” for a bigger external user stack. In this case the STKUN register should be
initialized to a value which represents the desired highest Bottom of Stack address.
4 - 52 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
SUB instructions or by PUSH or POP operations (explicit or implicit, i.e. CALL or RET
instructions).
This control mechanism is not triggered, i.e. no stack trap is generated, when
• the stack pointer SP is directly updated via MOV instructions
• the limits of the stack area (STKOV, STKUN) are changed, so that SP is outside of the
new limits.
rw
Bit Function
mdh Specifies the high order 16 bits of the 32-bit multiply and divide register
MD.
Whenever this register is updated via software, the Multiply/Divide Register In Use
(MDRIU) flag in the Multiply/Divide Control register (MDC) is set to ‘1’.
When multiplication or division is interrupted before its completion and when a new
multiply or divide operation is to be performed within the interrupt service routine, the
MDH register must be saved along with the MDL and MDC registers to avoid erroneous
results.
4 - 53 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
rw
Bit Function
mdl Specifies the low order 16 bits of the 32-bit multiply and divide register
MD.
Whenever this register is updated via software, the Multiply/Divide Register In Use
(MDRIU) flag in the Multiply/Divide Control register (MDC) is set to ‘1’. The MDRIU flag
is cleared whenever the MDL register is read via software.
When multiplication or division is interrupted before its completion and when a new
multiply or divide operation is to be performed within the interrupt service routine, the
MDL register must be saved along with the MDH and MDC registers to avoid erroneous
results.
Bit Function
MDRIU Multiply/Divide Register In Use
‘0’: Cleared, when register MDL is read via software.
‘1’: Set when the MDL or MDH register is written via software, or when
a multiply or divide instruction is executed.
!! Internal Machine Status
The multiply/divide unit uses these bits to control internal operations.
Never modify these bits without saving and restoring the MDC register.
When division or multiplication is interrupted before its completion and the multiply/divide
unit is required, the MDC register must first be saved along with the MDH and MDL
4 - 54 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
registers (to be able to restart the interrupted operation later), and then it must be cleared
to prepare it for the new calculation. After the completion of the new division or
multiplication the state of the interrupted multiply or divide operation must be restored.
The MDRIU flag is the only portion of the MDC register which might be of interest to the
user. The remaining portions of the MDC register are reserved for dedicated use by the
hardware, and should never be modified by the user in any way other than described
above. Otherwise a correct continuation of an interrupted multiply or divide operation
cannot be guaranteed.
r r r r r r r r r r r r r r r r
r r r r r r r r r r r r r r r r
Note: Register SYSCON cannot be changed after execution of the EINIT instruction.
4 - 55 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
C16X Microcontroller
IDCHIP
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CHIPID(7..0) CHIPREVNU(7..0)
r r
Bit Function
CHIPREVNU Device Revision Code
(7 … 0) Identifies the device step where the first release is marked ‘01H’.
CHIPID Device Identification
(7 … 0) Identifies the device name.
IDMANUF
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MANUF - - - -
Bit Function
MANUF JEDEC Normalized Manufacturer Code
0C1H: Infineon Technologies
4 - 56 Micronas
Interrupt and Trap Function
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
Trap Functions
Trap functions are activated in response to special conditions that occur during the
execution of instructions. Several hardware trap functions are provided for handling
erroneous conditions and exceptions that arise during the execution of an instruction.
Hardware traps always have highest priority and cause immediate system reaction. The
software trap function is invoked by the TRAP instruction, which generates a software
interrupt for a specified interrupt vector. For all types of traps the current program status
is saved on the system stack.
5-3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
5-4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
5-5 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
Note: Each entry of the interrupt vector table provides room for two word instructions or
one doubleword instruction. The respective vector location results from multiplying
the trap number by 4 (4 bytes per entry).
Note: * = Interrupts relevant for acquisition and graphic support.
5-6 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
Table 5-2
Exception Condition Trap Trap Vector Trap Trap
Flag Vector Location Number Priority
Reset Functions:
Hardware Reset – RESET 00’0000H 00H IV
Software Reset RESET 00’0000H 00H IV
Watchdog Timer RESET 00’0000H 00H IV
Overflow
Debug Hardware Trap DEBUG DTRAP 00’0020H 08H III
Class A Hardware Traps:
Non-Maskable Interrupt NMI NMITRAP 00’0008H 02H II
Stack Overflow STKOF STOTRAP 00’0010H 04H II
Stack Underflow STKUF STUTRAP 00’0018H 06H II
Class B Hardware Traps:
Undefined Opcode UNDOPC BTRAP 00’0028H 0AH I
Protected Instruction PRTFLT BTRAP 00’0028H 0AH I
Fault
Illegal Word Operand ILLOPA BTRAP 00’0028H 0AH I
Access
Illegal Instruction Access ILLINA BTRAP 00’0028H 0AH I
Illegal External Bus ILLBUS BTRAP 00’0028H 0AH I
Access
Reserved – – [2CH – 3CH] [0BH – 0FH] –
Software Traps – – Any Any Current
TRAP Instruction [00’0000H – [00H – 7FH] CPU
00’01FCH] Priority
in steps
of 4H
5-7 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
5-8 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
- - - - - - - - rw rw rw rw
Bit Function
GLVL Group Level
Defines the internal order for simultaneous requests of the same priority.
3: Highest group priority
0: Lowest group priority
ILVL Interrupt Priority Level
Defines the priority level for the arbitration of requests.
FH: Highest priority level
0H: Lowest priority level
xxIE Interrupt Enable Control Bit (individually enables/disables a specific
source)
‘0’: Interrupt request is disabled
‘1’: Interrupt Request is enabled
xxIR Interrupt Request Flag
‘0’: No request pending
‘1’: This source has raised an interrupt request
The Interrupt Request Flag is set by hardware whenever a service request from the
respective source occurs. It is cleared automatically upon entry into the interrupt service
routine or upon a PEC service. In the case of PEC service, the Interrupt Request flag
remains set if the COUNT field in register PECCx of the selected PEC channel
decrements to zero. This allows a normal CPU interrupt to respond to a completed PEC
block transfer.
Note: Modifying the Interrupt Request flag via software causes the same effect as if it
had been set or cleared by hardware.
5-9 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
Note: All interrupt request sources that are enabled and programmed to the same
priority level must always be programmed to different group priorities. Otherwise
an incorrect interrupt vector will be generated.
Upon entry into the interrupt service routine the priority level of the source that won the
arbitration and who’s priority level is higher than the current CPU level, is copied into the
ILVL bit field of register PSW after pushing the old PSW contents onto the stack.
The interrupt system of M2 allows nesting of up to 15 interrupt service routines of
different priority levels (level 0 cannot be arbitrated).
Interrupt requests that are programmed to priority levels 15 or 14 (i.e., ILVL = 111XB) will
be serviced by the PEC unless the COUNT field of the associated PECC register
contains zero. In this case the request will instead be serviced by normal interrupt
processing. Interrupt requests that are programmed to priority levels 13 through 1 will
always be serviced by normal interrupt processing.
Note: Priority level 0000B is the default level of the CPU. Therefore a request on level 0
will never be serviced, because it can never interrupt the CPU. However, an
enabled interrupt request on level 0000B will terminate the Idle mode and
reactivate the CPU.
For interrupt requests which are to be serviced by the PEC, the associated PEC channel
number is derived from the respective ILVL (LSB) and GLVL (see Figure 5-1). So
programming a source to priority level 15 (ILVL = 1111B) selects the PEC channel group
7 … 4, programming a source to priority level 14 (ILVL = 1110B) selects the PEC
channel group 3 … 0. The actual PEC channel number is then determined by the GLVL
group priority field.
5 - 10 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
The table below shows a few examples of each action executed with each particular
programming of an interrupt control register.
Note: All requests on levels 13 … 1 cannot initiate PEC transfers. They are always
serviced by an interrupt service routine. No PECC register is associated and no
COUNT field is checked.
5 - 11 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
rw rw rw - - - rw rw rw rw rw rw rw
Bit Function
N, C, V, Z, E, CPU status flags (Described in Chapter 4.6)
MULIP, Define the current status of the CPU (ALU, multiplication unit).
USR0
HLDEN HOLD Enable (Enables External Bus Arbitration)
0: Bus arbitration disabled, P6.7 ... P6.5 may be used for general
purpose IO
1: Bus arbitration enabled, P6.7 ... P6.5 serve as BREQ, HLDA,
HOLD, resp.
ILVL CPU Priority Level
Defines the current priority level for the CPU
FH: Highest priority level
0H: Lowest priority level
IEN Interrupt Enable Control Bit (globally enables/disables interrupt
requests)
‘0’: Interrupt requests are disabled
‘1’: Interrupt requests are enabled
CPU Priority ILVL defines the current level for the operation of the CPU. This bit field
reflects the priority level of the routine that is currently being executed. Upon entry into
an interrupt service routine, this bit field is updated with the priority level of the request
that is being serviced. The PSW is saved on the system stack before. The CPU level
determines the minimum interrupt priority level that will be serviced. Any request on the
same or lower level will not be acknowledged.
The current CPU priority level may be adjusted via software, to control which interrupt
request sources will be acknowledged.
PEC transfers do not really interrupt the CPU, but rather “steal” a single cycle, so PEC
services do not influence the ILVL field in the PSW.
Hardware traps switch the CPU level to maximum priority (i.e. 15) so no interrupt or PEC
requests will be acknowledged while an exception trap service routine is being executed.
Note: The TRAP instruction does not change the CPU level, so software invoked trap
service routines may be interrupted by higher requests.
Interrupt Enable bit IEN globally enables or disables PEC operations and the
acceptance of interrupts by the CPU. When IEN is cleared, no new interrupt requests are
5 - 12 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
accepted by the CPU. However requests that have already entered the pipeline at that
time will be processed. When IEN is set to ‘1’, all interrupt sources, which have been
individually enabled by the interrupt enable bits in their associated control registers, are
globally enabled.
Note: Traps are non-maskable and are therefore not affected by the IEN bit.
5 - 13 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - CLT CL INC(1..0) BWT COUNT (7...0)
rw rw rw rw rw
Bit Function
COUNT PEC Transfer Count
(7 … 0) Counts PEC transfers (bytes or words) and influences the channel’s
action.
BWT Byte / Word Transfer Selection
0: Transfer a Word.
1: Transfer a Byte.
5 - 14 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
Bit Function
INC(1 … 0) Increment Control
(Modification of SRCPx or DSTPx)
0 0: Pointers are not modified.
0 1: Increment DSTPx by 1 or 2.
1 0: Increment SRCPx by 1 or 2.
1 1: Reserved. Do not use this combination.
CL Channel Link Control
0: PEC channels work independent
1: Pairs of channels are linked together
CLT Channel Link Toggle State
0: Even numbered PEC channel of linked channels active
1: Odd numbered PEC channel of linked channels active
Byte/Word Transfer bit BWT controls, if a byte or a word is moved during a PEC service
cycle. This selection controls the transferred data size and the increment step for the
modified pointer.
Increment Control Field INC controls, if one of the PEC pointers is incremented after
the PEC transfer. However, it is not possible to increment both pointers. If the pointers
are not modified (INC = ‘00’) the respective channel will always move data from the
same source to the same destination.
Note: The reserved combination ‘11’ is changed to ‘10’ by hardware. However, it is not
recommended to use this combination.
The PEC Transfer Count Field COUNT controls the action of a respective PEC channel,
where the content of bit field COUNT, at the time the request is activated, selects the
action. COUNT may allow a specified number of PEC transfers, unlimited transfers or no
PEC service at all.
The table below summarizes, how the COUNT field itself, the interrupt requests flag IR
and the PEC channel action depends on the previous content of COUNT.
5 - 15 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
The PEC transfer counter allows the servicing of a specified number of requests by the
respective PEC channel, and then (when COUNT reaches 00H) activates the interrupt
service routine, which is associated with the priority level. After each PEC transfer the
COUNT field is decremented and the request flag is cleared to indicate that the request
has been serviced.
Continuous transfers are selected by the value FFH in bit field COUNT. In this case
COUNT is not modified and the respective PEC channel services any request until it is
disabled again.
When COUNT is decremented from 01H to 00H after a transfer the request flag is not
cleared, which generates another request from the same source. When COUNT already
contains the value 00H, the respective PEC channel remains idle and the associated
interrupt service routine is activated instead. This provides a choice if a level 15 or 14
request is to be serviced by the PEC or by the interrupt service routine.
Note: PEC transfers are only executed if their priority level is higher than the CPU level,
i.e. only PEC channels 7 … 4 are processed, while the CPU executes on level 14.
All interrupt request sources that are enabled and programmed for PEC service
should use different channels. Otherwise only one transfer will be performed for
all simultaneous requests. When COUNT is decremented to 00H, and the CPU is
interrupted, an incorrect interrupt vector will be generated.
5 - 16 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
When a data block is completely transferred a channel link interrupt is generated and
the PEC service request processing is automatically switched to the “other” PEC channel
of the channel-pair. Thus, PEC service requests addressed to a linked PEC channel are
either handled by linked PEC channel A or by linked PEC channel B. This channel toggle
allows the setting up of shadow and multiple buffers for PEC transfers by changing
pointer and count values of one channel while the other channel is active. The following
table lists the channels that can be linked together, and the channel numbers to address
the linked channels.
For each pair of linked channels an internal channel flag, the channel link toggle flag
CLT, identifies which of the two PEC channels will serve the next PEC request. The CLT
flag is indicated in both PECCx registers of the two linked PEC channels, where the CLT
bit in channel B is always inverse to the CLT bit in channel A. The very first transfer is
always started with the channel A if the CLT bit is not otherwise programmed before. The
CLT bit is only valid in the case of linked PEC channels, indicated by the CL bits of linked
channels. If linking is not enabled, the CLT bit of both channels is always zero.
The internal channel link flag CLT toggles, and the other channel begins servicing with
the next request if the “old” channel stops the service (COUNT = 0), and if the new
channel has in its PEC control register the enabled CL flag and if its transfer count is
more than zero.
Note: With the last transfer of a block transfer (COUNT = 0), the channel link control flag
CL of that channel is cleared in its PECCx register. If the CL channel link flag of
the new (chained) PEC control register is found to be zero, the whole data transfer
is finished and the channel link interrupt is coincidentally a termination interrupt.
The channel link mode is finished and the internal channel toggle flag is cleared
after the last transfer of the block, if the CL flags of both pair channels are cleared.
5 - 17 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
link interrupt condition of linked PEC channels (A and B channels) which requires
support from the CPU. The following channel link interrupt conditions requesting CPU
service are possible:
• In single transfer mode a COUNT value change from 01H to 00H in a linked PEC
channel and CL flag is set in the respective PEC control register.
In this case the CPU service is requested to update the PEC control and pointer registers
while the next block transfer is executed (the whole transfer is divided into separately
controlled block transfers). The last block transfer is determined by the missing link bit in
the new (linked) PEC control register. If a new service request hits a linked channel with
count equal to zero and channel link flag disabled, a standard interrupt, as known from
standard PEC channels, is performed.
The channel link interrupt subnode register CLISNC is defined as follows:
CLISNC Reset Value: 0000H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - C6 C6 - - C4 C4 - - C2 C2 - - C0 C0
IR IE IR IE IR IE IR IE
rw rw rw rw rw rw rw rw
Bit Function
xxIE PEC Channel Link Interrupt Enable Control Bit
(individually enables/disables a specific channel pair interrupt request)
‘0’: PEC interrupt request is disabled
‘1’: PEC interrupt request is enabled
xxIR PEC Channel Service Request Flag
‘0’: No channel link service request pending
‘1’: This source (channel pair) has raised an request to service a PEC
channel after channel linking
The source and destination pointers specifiy the locations between which the data is
to be moved. PEC transfers can be performed between any locations in the entire
memory space of the M2. For each of the 8 PEC channels, the source and destination
addresses are specified by a 8-bit segment number and a 16-bit offset. The source and
destination segment numbers, respectively PECSSN and PECDSN, are stored in a SFR
associated with each channel (PECSNx, see description below). The offset pointers for
the source and destination address do not reside in specific SFRs, but are mapped into
the internal RAM of the M2 just below the bit-addressable area (see Figure 5-2).
5 - 18 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
UED11128
Figure 5-2 Mapping of PEC Offset Pointers into the Internal RAM
The pointer locations for inactive PEC channels may be used for general data storage.
Only the required pointers occupy RAM locations.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PECDSN (7...0) PECSSN (7...0)
rw rw
Bit Function
PECSSN PEC Source Segment Number
(7 … 0) 8-bit Segment Number (address bits A23 … 16) used for addressing the
source of the respective PEC transfer.
PECDSN PEC Destination Segment Number
(7 … 0) 8-bit Segment Number (address bits A23 … 16) used for addressing the
destination of the respective PEC transfer.
5 - 19 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
If a word data transfer is selected for a specific PEC channel (i.e. BWT = ‘0’), the
respective source and destination pointers must both contain a valid word address which
points to an even byte boundary. Otherwise the Illegal Word Access trap will be invoked
when this channel is used.
5 - 20 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
Classes with up to 4 members can be established by using the same interrupt priority
(ILVL) and assigning a dedicated group level (GLVL) to each member. This functionality
is built-in and handled automatically by the interrupt controller.
Classes with more than 4 members can be established by using a number of adjacent
interrupt priorities (ILVL) and the respective group levels (4 per ILVL). Each interrupt
service routine within this class sets the CPU level to the highest interrupt priority within
the class. All requests from the same or any lower level are blocked now, i.e. no request
of this class will be accepted.
The example below establishes 3 interrupt classes which cover 2 or 3 interrupt priorities,
depending on the number of members in a class. A level 6 interrupt disables all other
sources in class 2 by changing the current CPU level to 8, which is the highest priority
(ILVL) in class 2. Class 1 requests or PEC requests are still serviced in this case.
The 24 interrupt sources (excluding PEC requests) are assigned to 3 classes of priority
rather than to 7 different levels, as the hardware support would do.
10
9
8 X X X X Interrupt Class 2
7 X X X X 9 sources on 3 levels
6 X
5 X X X X Interrupt Class 3
4 X 5 sources on 2 levels
3
2
1
0 No service!
5 - 21 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
5 - 22 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
When the interrupt service routine is left (RETI is executed), the status information is
popped from the system stack in reverse order, taking into account the value of bit
SGTDIS.
Context Switching
An interrupt service routine usually saves all the registers it uses on the stack, and
restores them before returning. The more registers a routine uses, the more time is
wasted with saving and restoring. The M2 allows the complete bank of CPU registers
(GPRs) to switch with a single instruction, so the service routine executes within its own,
separate context.
The instruction “SCXT CP, #New_Bank” pushes the contents of the context pointer (CP)
on the system stack and loads CP with the immediate value “New_Bank”, which selects
a new register bank. The service routine may now use its “own registers”. This register
bank is preserved when the service routine terminates, i.e. its contents are available on
the next call.
Before returning (RETI) the previous CP is simply POPped from the system stack, which
returns the registers to the original bank.
Note: The first instruction following the SCXT instruction must not use a GPR.
Resources that are used by the interrupting program must eventually be saved and
restored, e.g. the DPPs and the registers of the MUL/DIV unit.
1
IR-Flag
0
UED11129
5 - 23 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
All instructions in the pipeline, including instruction N (during which the interrupt request
flag is set), are completed before entering the service routine. The actual execution time
for these instructions (e.g. wait-states) therefore influences the interrupt response time.
In Figure 5-4 the respective interrupt request flag is set in cycle 1 (the fetching of
instruction N). The indicated source wins the prioritization round (during cycle 2). In
cycle 3 a TRAP instruction is injected into the decode stage of the pipeline, replacing
instruction N+1 and clearing the source's interrupt request flag to ‘0’. Cycle 4 completes
the injected TRAP instruction (save PSW, IP and CSP, if in segmented mode) and
fetches the first instruction (I1) from the respective vector location.
All instructions that entered the pipeline, after the setting of the interrupt request flag
(N+1, N+2), will be executed after returning from the interrupt service routine.
The minimum interrupt response time is 5 states (10 TCL). This requires program
execution from the internal code memory, no external operand read requests and setting
the interrupt request flag during the last state of an instruction cycle. When the interrupt
request flag is set during the first state of an instruction cycle, the minimum interrupt
response time under these conditions is 6 state times (12 TCL).
The interrupt response time is increased by all delays of the instructions in the pipeline
that are executed before entering the service routine (including N).
• When internal hold conditions between instruction pairs N-2/N-1 or N-1/N occur, or
when instruction N explicitly writes to the PSW or the SP, the minimum interrupt
response time may be extended by 1 state time for each of these conditions.
• When instruction N reads an operand from the internal code memory, or when N is a
call, return, trap, or MOV Rn, [Rm+ #data16] instruction, the minimum interrupt
response time may be extended by 2 state times during internal code memory
program execution.
• In case instruction N reads the PSW and instruction N-1 effects the condition flags,
the interrupt response time may be extended by 2 state times.
The worst case interrupt response time during internal code memory program execution
adds 12 state times (24 TCL).
Any reference to external locations increases the interrupt response time due to pipeline
related access priorities. The following conditions have to be considered:
• Instruction fetch from an external location
• Operand read from an external location
• Result write-back to an external location
There are a number of combinations depending on where the instructions, source and
destination operands are located. Note, however, that only access conflicts contribute to
the delay.
A few examples illustrate these delays:
• The worst case interrupt response time, including external accesses, will occur when
instructions N, N+1 and N+2 are executed out of external memory, instructions N-1
5 - 24 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
and N require external operand read accesses, instructions N-3 through N write back
external operands, and the interrupt vector also points to an external location. In this
case the interrupt response time is the time needed to perform 9 word bus accesses,
because instruction I1 cannot be fetched via the external bus until all write, fetch and
read requests from preceding instructions in the pipeline are terminated.
• When the interrupt vector, of the example above, is pointing into the internal code
memory, the interrupt response time is 7 word bus accesses plus 2 states because
the fetching of instruction I1 from internal code memory can start earlier.
• When instructions N, N+1 and N+2 are executed out of the external memory and the
interrupt vector points to an external location, but all operands for instructions N-3
through N are in internal memory, then the interrupt response time is the time needed
to perform 3 word bus accesses.
• When the interrupt vector, of the example above, is pointing into the internal code
memory, the interrupt response time is 1 word bus access plus 4 states.
After an interrupt service routine has been terminated by executing the RETI instruction,
and if further interrupts are pending, the next interrupt service routine will not be entered
until at least two instruction cycles of the program that was interrupted have been
executed. In most cases two instructions will be executed during this time. Only one
instruction will typically be executed if the first instruction following the RETI instruction
is a branch instruction (without cache hit), if it reads an operand from internal code
memory, or if it is executed out of the internal RAM.
Note: A bus access, in this context, includes all delays which can occur during an
external bus cycle.
5 - 25 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
1
IR-Flag
0
UED11130
5 - 26 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
• If instruction N reads the PSW and instruction N-1 effects the condition flags, the PEC
response time may additionally be extended by 2 state times.
The worst case PEC response time during internal code memory program execution
adds to 9 state times (18 TCL).
Any reference to external locations increases the PEC response time due to pipeline
related access priorities. The following conditions have to be considered:
• Instruction fetch from an external location
• Operand read from an external location
• Result write-back to an external location
There are a number of combinations depending on where the instructions, source and
destination operands are located. Note, however, that only access conflicts contribute to
the delay.
A few examples illustrate these delays:
• The worst case interrupt response time, including external accesses, will occur when
instructions N and N+1 are executed out of external memory, instructions N-1 and N
require external operand read accesses and instructions N-3, N-2 and N-1 write back
external operands. In this case the PEC response time is the time needed to perform
7 word bus accesses.
• When instructions N and N+1 are executed out of the external memory, but all
operands for instructions N-3 through N-1 are in internal memory, then the PEC
response time is the time needed to perform 1 word bus access plus 2 state times.
Once a request for PEC service has been acknowledged by the CPU, the execution of
the next instruction is delayed by 2 state times plus the additional time it might take to
fetch the source operand from internal code memory or external memory and to write the
destination operand over the external bus in an external program environment.
Note: A bus access, in this context, includes all delays which can occur during an
external bus cycle.
For an EPEC request, the basic response time is 3 instruction cycles. The minimum
response time is reached when the request occurs at the end of an instruction cycle. In
this case the response time is 5 states (10 TCL). All the conditions described below that
may increase the response time apply to the EPEC.
5 - 27 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
The 8 lines can be programmed individually to this fast interrupt mode, where the trigger
transition (rising, falling or both) can also be selected. The External Interrupt Control
register EXICON controls this feature for all 8 signals.
EXICON (F1C0H / E0H) Reset Value: 0000H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw
Bit Function
EXIxES External Interrupt x Edge Selection Field (x = 7 … 0)
0 0: Fast external interrupts disabled: standard mode
0 1: Interrupt on positive edge (rising)
1 0: Interrupt on negative edge (falling)
1 1: Interrupt on any edge (rising or falling)
Note: The fast external interrupt inputs are sampled every 2 TCL. The interrupt request
arbitration and processing, however, is executed every 8 TCL.
In Sleep mode, no clock is available for sampling, but interrupt request detection is still
possible on fast interrupt request lines using asynchronous logic.
5 - 28 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
Software Traps
The TRAP instruction is used to cause a software call to an interrupt service routine. The
trap number that is specified in the operand field of the trap instruction determines which
vector location in the address range from 00’0000H through 00’01FCH will be branched.
Executing a TRAP instruction causes a similar effect as if an interrupt at the same vector
had occurred. PSW, CSP (in segmentation mode), and IP are pushed on the internal
system stack and a jump is taken to the specified vector location. When segmentation is
enabled and a trap is executed, the CSP for the trap service routine is set to code
segment 0. No Interrupt Request flags are affected by the TRAP instruction. The
interrupt service routine called by a TRAP instruction must be terminated with a RETI
(return from interrupt) instruction to ensure correct operation.
Note: The CPU level in register PSW is not modified by the TRAP instruction, so the
service routine is executed on the same priority level from which it was invoked.
Therefore, the service routine entered by the TRAP instruction can be interrupted
by other traps or higher priority interrupts, other than when triggered by a
hardware trap.
Hardware Traps
Hardware traps are issued by faults or specific system states that occur during runtime
of a program (not identified at assembly time). A hardware trap may also be triggered
intentionally, e.g. to emulate additional instructions by generating an Illegal Opcode trap
or to enter the OCDS Software Debug Mode. M2 distinguishes eight different hardware
trap functions. When a hardware trap condition has been detected, the CPU branches
to the trap vector location for the respective trap condition. Depending on the trap
condition, the instruction which caused the trap is either completed or cancelled (i.e. it
has no effect on the system state) before the trap handling routine is entered.
Hardware traps are non-maskable and always have priority over every other CPU
activity. If several hardware trap conditions are detected within the same instruction
cycle, the highest priority trap is serviced (see Table 5-1).
PSW, CSP (in segmentation mode), and IP are pushed on the internal system stack and
the CPU level in the PSW register is set to the highest possible priority level (i.e. level
5 - 29 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
15), disabling all interrupts. The CSP is set to code segment zero, if segmentation is
enabled. A trap service routine must be terminated with the RETI instruction.
The nine hardware trap functions of M2 are divided into two classes:
Class A traps are
• external Non-Maskable Interrupt (NMI)
• Stack Overflow
• Stack Underflow trap
These traps share the same trap priority, but have an individual vector address.
Class B traps are
• Undefined Opcode
• Protection Fault
• Illegal Word Operand Access
• Illegal Instruction Access
• Illegal External Bus Access Trap
These traps share the same trap priority and vector address.
The Debug Trap (see chapter x “OCDS”) is set apart and has its own individual priority
and vector address.
The bit-addressable Trap Flag Register (TFR) allows a trap service routine to identify the
kind of trap which caused the exception. Each trap function is indicated by a separate
request flag. When a hardware trap occurs, the corresponding request flag in the TFR
register is set to ‘1’.
TFR Reset Value: 0000H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
STK STK DE UND PRT ILL ILL ILL
- OF UF BUG - - - - OPC - - - FLT OPA INA BUS
rw rw rw rw - - - - rw - - - rw rw rw rw
Bit Function
ILLBUS Illegal External Bus Access Flag
An external access has been attempted without a defined external bus.
ILLINA Illegal Instruction Access Flag
A branch to an odd address has been attempted.
ILLOPA Illegal Word Operand Access Flag
A word operand access (read or write) to an odd address has been
attempted.
PRTFLT Protection Fault Flag
A protected instruction with an illegal format has been detected.
5 - 30 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
Bit Function
UNDOPC Undefined Opcode Flag
The currently decoded instruction has no valid M2 opcode.
DEBUG Debug Trap Flag
A debug event programmed to trigger a Debug Trap has been detected
by the OCDS.
STKUF Stack Underflow Flag
The current stack pointer value exceeds the content of register STKUN.
STKOF Stack Overflow Flag
The current stack pointer value falls below the content of register
STKOV.
Note: The trap service routine must clear the respective trap flag, otherwise a new trap
will be requested after exiting the service routine. Setting a trap request flag by
software causes the same effects as if it had been set by hardware.
The reset functions (hardware, software, watchdog) may be regarded as a type of trap.
Reset functions have the highest system priority (trap priority IV).
The Debug Trap has the second highest priority (trap priority III) and can interrupt any
class A or class B trap. If a class A or class B trap and a Debug Trap occur at the same
time, both flags are set in the TFR but the Debug Trap is executed first.
Class A traps have the third highest priority (trap priority II), class B traps are on the 4rd
rank so a class A trap can interrupt a class B trap. If more than one class A trap occurs
at a time, they are prioritized internally, with the NMI trap on the highest and the stack
underflow trap on the lowest priority.
All class B traps have the same trap priority (trap priority I). When several class B traps
are activated at a time, the corresponding flags in the TFR register are set and the trap
service routine is entered. Since all class B traps have the same vector, the priority of
service of simultaneously occurring class B traps is determined by software in the trap
service routine.
A class A trap occurring during the execution of a class B trap service routine will be
serviced immediately. However, during the execution of a class A trap service routine,
any class B trap which occurs will not be serviced until the class A trap service routine is
exited with a RETI instruction. In this case, the occurrence of the class B trap condition
is stored in the TFR register, but the IP value of the instruction which caused this trap is
lost.
In the case where e.g. an Undefined Opcode trap (class B) occurs simultaneously with
an NMI trap (class A), both the NMI and the UNDOPC flag is set, the IP of the instruction
with the undefined opcode is pushed onto the system stack, but the NMI trap is executed.
5 - 31 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
After returning from the NMI service routine, the IP is popped from the stack and
immediately pushed again because of the pending UNDOPC trap.
Debug Trap
The OCDS may be programmed to trigger a Debug Trap when a debug event (match of
data/address comparison, execution of DEBUG instruction, event on brk_in_n input)
rises. This is normally used to call a monitor routine (software debug mode) for
debugging purposes. Normal program execution resumes when a regular RETI
instruction is executed, which ends the monitor routine. This trap has the highest priority
(except for reset functions) but the monitor routine can reduce its own priority by writing
the ILVL field in the PSW.
5 - 32 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
add instruction, the pushed IP value represents the instruction address following the post
add-instruction command.
5 - 33 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
5 - 34 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Interrupt and Trap Functions
rw rw rw rw rw rw rw rw
Bit Function
EXIxSS External Interrupt x Source Selection Field (x = 7 … 0)
0 0: Input from default pin
0 1: Input from “alternate source”
1 0: Input from default pin ORed with “alternate source”
1 1: Input from default pin ANDed with “alternate source”
5 - 35 Micronas
System Control & Configuration
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
6-3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Hardware Reset
A hardware reset is triggered asynchronously by a falling edge of the reset input signal,
RSTIN. To ensure the recognition of the RSTIN signal, it must be held low for at least
2 CPU clock cycles, assuming the clock input signal is stable. Also, shorter RSTIN
pulses may trigger a hardware reset, however, this is not recommended. The internal
reset condition is prolonged until one of the following conditions arises:
• the rising edge of the RSTIN signal, or
• the termination of the reset sequence, if RSTIN was deasserted before, or
• the termination of the lengthening conditions.
After termination of the reset state, program execution will start.
Three different kinds of hardware reset conditions are considered:
• Power-on Reset
A complete power-on reset requires an active RSTIN time until a stable clock signal
is available. The on-chip oscillator needs about 2 ms to stabilize.
6-4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Software Reset
The reset sequence can be triggered at any time via the protected instruction SRST
(Software Reset). This instruction can be executed deliberately within a program, e.g. to
leave bootstrap loader mode, or upon a hardware trap that reveals a system failure.
6-5 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
few exceptions to this rule provide a first pre-initialization, which is either fixed or
controlled by input pins.
DPP1: 0001H (points to data page 1)
DPP2: 0002H (points to data page 2)
DPP3: 0003H (points to data page 3)
CP: FC00H
STKUN: FC00H
STKOV: FA00H
SP: FC00H
SYSCON: 0400H (set according to start-up configuration)
BUSCON0: 15B7H (set according to start-up configuration)
ONES: FFFFH (fixed value)
6-6 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 1 1 SALSEL(2..0) 1 CS 1
ENA
r
Bit Function
CSENA Chip Select Lines Selection
Number of external ROMs.
Description of possible selections: see table below (Start up
Configuration)
SALSEL Segment Address Lines Selection
(2 … 0) Number of active segment address outputs.
Description of possible selections: see table below (Start up
Configuration)
6-7 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
serial interface ASC0. The M2 will remain in bootstrap loader mode until a hardware
reset with P4.0 high or a software reset.
Default: The M2 starts fetching code from location 00’0000H, the bootstrap loader is off.
6-8 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
6-9 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
The new password is defined with command 3 and stored in the according 8-bit field in
the SCUSLS register.
The SCUSLC register is defined as follows
SCUSLC Reset Value: 0000H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
COMMAND
rw
Bit Function
Command Code of Command to be Executed
Command 0: ‘AAAAH’
Command 1: ‘5554 H’
Command 2: ‘96 & inverse password’
Command 3: ‘000b’ & new level & ‘000b’ & new password
Command 4: ‘8EH’ & inverse password (Command 4 unlocks protected
registers for one write access if current security level is in
low protected mode.)
The security level status register SCUSLS is a read only register which shows the
current password, the actual security level and the state of the switching state machine.
The SCUSLS is defined as follows:
6 - 10 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
r r r
Bit Function
PASSWORD Current Password
SL Current Security Level
‘00’: Unprotected Write Mode
‘01’: Low Protected Mode
‘10’: Reserved
‘11’: Write Protected Mode
STATE Current State
‘000’: State 0 = Wait for Command 0.
‘001’: State 1 = Wait for Command 1.
‘010’: State 2 = Wait for Command 2.
‘011’: State 3 = Wait for new security level and new password
(Command 3).
‘100’: State 4 = Protected registers are unlocked. Write access to one
register is possible (only in low protected mode).
‘101’: Reserved
‘110’: Reserved
‘111’: Reserved
6 - 11 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
The following state diagram shows the state machine for security level switching and for
unlock command execution in low protected mode:
Command 3 1)
or any other SCU
Register Write Access
Reset State 0 State 3
Command 2
Command 4 or any other SCU
Command 0
Command 2
and Low Protected Mode Register Write Access
Command 1
or any other SCU
Register Write Access
Any SCU
Register Write Access
Command 1
State 4 State 1 State 2
UED11131
6 - 12 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
In the table above clocking frequencies have been specified, indicating that power
reduction is achieved by means of clock-gating. None of the power supplies are
internally switched, neither may voltage be turned off at the supply pins.
M2’s power management functions are supplemented by a Real Time Clock (RTC) timer
with optional periodic wake-up from idle mode. The periodic wake-up combines the
reduced power consumption in power reduction modes with a high level of system
availability. External signals and events can be scanned (at a lower rate) by periodically
activating the CPU and selected peripherals which then return to power-save mode after
a short time. This greatly reduces the system’s average power consumption.
6 - 13 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
interrupt requests can be used. Power down mode can only be terminated with hardware
reset.
To prevent unintentional entry into Idle mode, the IDLE instruction has been
implemented as a protected 32-bit instruction.
Idle mode is terminated by interrupt requests from any enabled interrupt source whose
individual Interrupt Enable flag was set before the Idle mode was entered, regardless of
bit IEN.
For a request selected for CPU interrupt service, the associated interrupt service routine
is entered if the priority level of the requesting source is higher than the current CPU
priority and the interrupt system is globally enabled. After the RETI (Return from
Interrupt) instruction of the interrupt service routine is executed the CPU continues
executing the program with the instruction following the IDLE instruction. Otherwise, if
the interrupt request cannot be serviced because of a too low priority or a globally
disabled interrupt system the CPU immediately resumes normal program execution with
the instruction following the IDLE instruction.
For a request which was programmed for PEC service, a PEC data transfer is performed
if the priority level of this request is higher than the current CPU priority and the interrupt
system is globally enabled. After the PEC data transfer has been completed the CPU
remains in Idle mode. Otherwise, if the PEC request cannot be serviced because of a
too low priority or a globally disabled interrupt system, the CPU does not remain in Idle
mode but continues program execution with the instruction following the IDLE
instruction.
6 - 14 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Denied
CPU Interrupt Request
Accepted
Active IDLE Instruction Idle
Mode Mode
SDRAM Refreshing
Before entering into one of the power save modes the external SDRAM must be put into
self-refresh-mode by use of register EBIDIR (see Chapter 4.5).
6 - 15 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - - - - - - - - - SLEEPCON
rw
Bit Function
SLEEPCON Power Save Mode Selection
00: Idle Mode
01: Sleep Mode
10: reserved
11: Power Down Mode
Note: This register is a protected register; it’s security level is automatically set to full
write protection after execution of the EINIT instruction.
6 - 16 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Pin(s) Function
RD External Read Strobe
WR Write Enable Strobe for SDRAM
LDQM, UDQM Byte Mask Signals for SDRAM
XTAL1, XTAL2 Oscillator Input/Output
RSTIN Reset Input Pin
CSDRAM, CSROM, CS3 Chip Select Signals
MEMCLK, CLKEN Clock Signals for SDRAM
CVBS1, CVBS2 CVBS Input Signals
R, G, B Analog RGB Output
CORBLA Contrast Reduction and Blanking Pin
HSYNC, VSYNC Sync Inputs/Outputs for the Display
The external read strobe RD controls the output drivers of external memory or
peripherals when M2 reads data from these external devices. During reset an internal
pull-up ensures an inactive (high) level on the RD output.
The external write strobe WR controls the data transfer from the M2 to an external
memory. During reset an internal pull-up ensures an inactive (high) level on the WR
output.
Byte mask signals LDQM and UDQM control the byte access to an external SDRAM
according to the PC100 specification. These pins are active if either the high byte or the
low byte of a 16-bit word are written.
The oscillator input XTAL1 and output XTAL2 connect the internal oscillator to the
external crystal. The oscillator provides an inverter and a feedback element. An external
TTL clock signal may be fed to the input XTAL1, leaving XTAL2 open.
By using the RSTIN pin M2 can be put into the well defined reset condition either at
power-up or upon external events like a hardware failure or manual reset. The internal
reset signal can be driven on output pin RSTOUT/COR.
The chipselect signals CSDRAM, CSROM , CS3 are for general control of external
memories. During reset an internal pull-up ensures an inactive (high) level on these
outputs. CS3 can be used for a ROM.
6 - 17 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Signals MEMCLK, CLKEN are used to provide a clock and an enable signal for an
external SDRAM. During reset an internal pull-down ensures an inactive (low) level on
these outputs.
CVBS1A, CVBS1B and CVBS2 can carry two analog composite video signals and act
as inputs for the two data slicers. The video signal on channel 1 can be either differential
(CVBS1A and CVBS1B) or single-ended (CVBS1A, CVBS1B to ground).
R, G, B are analog outputs from the display generator.
CORBLA is a signal which indicates whether a pixel created by M2 should be displayed
or mixed with external video source (blanking function). At the same time this signal
carries information on contrast reduction of this pixel. Alternatively BLANK can be
generated as a separate output signal. COR can be generated separately as well, in
which case no RSTOUT is available.
HSYNC and VSYNC are bidirectional pins which are used to synchronize M2 to an
external video source or to deliver a stable horizontal and vertical sync timing to external
components.
6 - 18 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Register Value
SYSCON E444H
XADRS1 0E03H
XADRS2 0E83H
XADRS3 - XADRS6 (not used) 0000H
ADDRSEL1 - ADDRSEL4 (not used) 0000H
XBCON1 05BFH
XBCON2 05BFH
XBCON3 - XBCON6 (not used) 0000H
BUSCON0 15B7H
BUSCON1 - BUSCON4 (not used) 0000H
XPERCON 0003H
6 - 19 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
÷2 Clear
MUX WDT Low Byte WDT High Byte WDTR
fWDT ÷ 128
DISWDT
WDTIN
UEB11133
6 - 20 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
To prevent the watchdog timer from overflowing, it must be serviced periodically by the
user software. The watchdog timer is serviced with the instruction SRVWDT, which is a
protected 32-bit instruction. Servicing the watchdog timer clears the low byte and reloads
the high byte of the watchdog time WDT register with the preset value in bit field
WDTREL, which is the high byte of the WDTCON register. Servicing the watchdog timer
will also reset the WDTR bit. After being serviced the watchdog timer continues counting
up from the value (<WDTREL> ⌠ 28). Instruction SRVWDT has been encoded in such a
way that the chance of unintentionally servicing the watchdog timer (e.g. by fetching and
executing a bit pattern from a wrong location) is minimized. When instruction SRVWDT
does not match the format for protected instructions, the Protection Fault Trap will be
entered, rather than the instruction being executed.
The time period for an overflow of the watchdog timer is programmable in two ways:
• The input frequency of the watchdog timer can be selected via bit WDTIN in register
WDTCON
to be either fCPU/2 or fCPU/128.
• The reload value WDTREL for the high byte of WDT can be programmed in register
WDTCON.
The period PWDT between servicing the watchdog timer and the next overflow can
therefore be determined by the following formula:
Table 6-1 marks the possible ranges for the watchdog time which can be achieved using
a certain CPU clock. Some numbers are rounded to 3 significant digits.
Note: For safety reasons, the user is advised to rewrite WDTCON each time before the
watchdog timer is serviced.
Here is the description of the Watchdog timer SFRs.
6 - 21 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WDTREL(7 .. 0) - - - LHW SHW SW WDT WDT
R R R R IN
rw r r r r rw
Bit Function
WDTIN Watchdog Timer Input Frequency Selection
0: Input frequency is fCPU/2
1: Input frequency is fCPU/128
WDTR Watchdog Timer Reset Indication Flag
Cleared by a hardware reset or by the SRVWDT instruction.
SWR Software Reset Indication Flag
SHWR Short Hardware Reset Indication Flag
LHWR Long Hardware Reset Indication Flag
WDTREL Watchdog Timer Reload Value
(7 … 0) (for the high byte of WDT)
Note: The reset value depends on the reset source (see description below).
The execution of EINIT clears the reset indication flags.
Note: When the reset output is enabled pin RSTOUT will be pulled low for the duration
of the internal reset sequence upon a watchdog timer reset.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WDT(15 .. 0)
Note: This register in a read-only register. Write access can be performed to this
register, during test mode only.
6 - 22 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Note: *) When the reset output is enabled, the indicated flags are also set in the
respective reset case. The WDTCON reset value will then be different from the
table value.
Note: The listed reset values for WDTCON assume the reserved bits as ‘0’.
Long Hardware Reset is indicated when the RSTIN input is still sampled low (active) at
the end of a hardware triggered internal reset sequence.
Short Hardware Reset is indicated when the RSTIN input is sampled high (inactive) at
the end of a hardware triggered internal reset sequence.
Software Reset is indicated after a reset triggered by the execution of instruction SRST.
Watchdog Timer Reset is indicated after a reset triggered by an overflow of the
watchdog timer.
Note: When reset output is enabled the RSTOUT pin is pulled low for the duration of the
internal reset sequence upon any sort of reset.
Therefore a long hardware reset (LHWR) will be recognized in any case.
6 - 23 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
RSTIN
P4.0
1)
2) 4)
RxD0
3)
TxD0
CSP:IP
32 bytes
Int. Boot ROM BSL-routine
User Software
1)
BSL initialization time, > 1.5 µ s @ fCPU = 33 MHz
2)
Zero byte (1 start bit, eight ’0’ data bits, 1 stop bit), sent by host
3)
Identification byte (D5H ) sent by M2
4)
32 bytes of code/data, sent by host
UET11134
6 - 24 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
6 - 25 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
MANUF DEPT
r r
6 - 26 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Bit Function
MANUF Manufacturer
This is the JEDEC normalized manufacturer code.
0C1H:Infineon Technologies
020 H: SGS-Thomson
DEPT Department
Indicates the department within Micronas and Infineon Technologies.
00 H: HL MC
01 H: HL CAD Macrocells
02 H: HL IT
r r
Bit Function
Revision Device Revision Code
Identifies the device step where the first release is marked ‘01H’.
CHIPID Device Identification
Identifies the device name. Please refer to the association table.
Type Size
r r
Type Size
r r
Note: IDMEM2 describes the second block of (program) memory. E.g. a device may
contain Flash and EEPROM or DRAM sections. Static RAM modules are not
described with ID registers.
6 - 27 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Bit Function
Size Size of On-chip Program Memory
The size of the implemented program memory in terms of 4 K blocks, i.e.
Memory-size = <Size> ⌠ 4 KByte.
Type Type of On-chip Program Memory
Identifies the memory type on this silicon.
0H: ROMless 1H: Mask ROM
2H: EPROM 3H: Flash
4H: OTP 5H: EEPROM
6H: DRAM/SRAM
PROGVPP PROGVDD
r r
Bit Function
PROGVDD Programming VDD Voltage1)
The voltage of the standard power supply pins required when
programming or erasing (if applicable) the on-chip program memory.
Formula: VDD = 20 ⌠ <PROGVDD>/256 [V]
PROGVPP Programming VPP Voltage1)
The voltage of the special programming power supply (if existent)
required to program or erase (if applicable) the on-chip program
memory. Formula: VPP = 20 ⌠ <PROGVPP>/256 [V]
1)
Note: Devices that incorporate memories which cannot be programmed outside the
factory will indicate ‘00H’ in both bit fields.
IDRT Reset Value: XXXXH
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LC RA - - - - - - - - - - - RIX
r r - - - - - - - - - - - r
Note: The Redesign Tracing register IDRT is not commonly specified. It is protected
against standard read accesses via the function testmode (Testmode A).
6 - 28 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Bit Function
RIX Redesign Index
0: This device is the original “Revision”.
else: This device has experienced minor changes that are not reflected
to the customer by the “Revision” bit field.
RA Redundancy Activation
0: This device is as it was manufactured.
1: Redundant memory structures have been activated.
LC Laser Correction
0: This device is as it was manufactured.
1: This device has been laser corrected.
- - - - - - - - - - - r
Bit Function
CBC Rev. CBC Revision number
currently 011B
Core ID Core Identification number
for the C166 CBC the value is 00001B
The SCU provides a specific read-only identification register for its own module type and
revision identification.
IDSCU Reset Value: 0000H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r r
6 - 29 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Data Input/ Output Direction Control Open Drain Control Special Control
Registers Registers Registers Registers
P2 DP2
P3 DP3 ODP3
P4
P5 P5BEN
P6 DP6 ODP6 ALTSELOP6
UEA11135
Port 0
Port 0 does not exist due to the dedicated memory bus structure of M2.
Port 1
Port 1 does not exist due to the dedicated memory bus structure of M2.
Port 2
Port 2 is an 8-bit bidirectional I/O port which can also serve as fast external interrupt input
(sample rate is 30 ns).
6 - 30 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
P2.15 P2.14 P2.13 P2.12 P2.11 P2.10 P2.9 P2.8 - - - - - - - -
rw rw rw rw rw rw rw rw
Bit Function
P2.y Port data register P2 bit y.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DP2. DP2. DP2. DP2. DP2. DP2. DP2. DP2. - - - - - - - -
15 14 13 12 11 10 9 8
rw rw rw rw rw rw rw rw
Bit Function
DP2.y Port direction register DP2 bit y
DP2.y = 0: Port line P2.y is an input (high-impedance).
DP2.y = 1: Port line P2.y is an output.
6 - 31 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Port 3
If this 15-bit port is used for general purpose I/O, the direction of each line can be
configured via the corresponding direction register DP3. All port lines can be switched
into push/pull or open drain mode via the open drain control register ODP3. Due to pin
limitations register bit P3.14 is not connected to any pin.
P3 Reset Value: 0000H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
P3.15 - P3.13 P3.12 P3.11 P3.10 P3.9 P3.8 P3.7 P3.6 P3.5 P3.4 P3.3 P3.2 P3.1 P3.0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
Bit Function
P3.y Port data register P3 bit y.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DP3. - DP3. DP3. DP3. DP3. DP3. DP3. DP3. DP3. DP3. DP3. DP3. DP3. DP3. DP3.
15 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw - rw rw rw rw rw rw rw rw rw rw rw rw rw rw
Bit Function
DP3.y Port direction register DP3 bit y
DP3.y = 0: Port line P3.y is an input (high-impedance).
DP3.y = 1: Port line P3.y is an output.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ODP3. - ODP3. ODP3. ODP3. ODP3. ODP3. ODP3. ODP3. ODP3. ODP3. ODP3. ODP3. ODP3. ODP3. ODP3.
15 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw - rw rw rw rw rw rw rw rw rw rw rw rw rw rw
6 - 32 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Bit Function
ODP3.y Port 3 Open Drain control register bit y
ODP3.y = 0: Port line P3.y output driver in push/pull mode.
ODP3.y = 1: Port line P3.y output driver in open drain mode.
Port 4
Port 4 is a 6-bit output port. Because of its high frequency requirements in the alternate
function mode, it has different electrical characteristics than the other ports.
During reset, the user specific portion of the system start-up configuration is input via
Port 4. The complete configuration (user specific as well as hardwired settings) can be
read at runtime from register RP0H. For a detailed description refer to Chapter 6.1.
6 - 33 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - - - - - P4L.5 P4L.4 P4L.3 P4L.2 P4L.1 P4L.0
r r r r r r
Bit Function
P4L.0 BSLENA (Boot Strap Load Enable)
P4L.0 = 1: Boot strap loader enabled
P4L.0 = 0: Boot strap loader disabled
P4L.1 CSENA (Chip Select Enable)
P4L.1 = 1: P4.5 configured as general purpose pin
P4L.1 = 0: P4.5 configured as CS3
P4L.2 Reserved
P4L.(5 … 3) SALSEL(2 … 0) (Select Number of Address Lines)
see explanation below
rw rw rw rw rw rw
Bit Function
P4.y Port data register P4 bit.y
6 - 34 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
The number of segment address lines is selected via P4 during reset. The selected value
can be read from bit field SALSEL and CSENA of register RP0H e.g. in order to check
the configuration during run time.
Port 5
Port 5 is a 6-bit input port.
P5 Reset Value: 0000H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
P5.15 P5.14 - - - - - - - - - - P5.3 P5.2 P5.1 P5.0
r r r r r r
Bit Function
P5.y Port data register P5 bit y (read only).
6 - 35 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
Bit Function
P5BEN.y Input Functionality Control Bit
P5BEN.y = 0: Analog Input Functionality.
P5BEN.y = 1: Digital Input Functionality.
Port 6
If this 7-bit port is used for general purpose I/O, the direction of each line can be
configured via the corresponding direction register DP6. The port lines can be switched
into push/pull or open drain mode via the open drain control register ODP6.
P6 Reset Value: 0000H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - - - - P6.6 P6.5 P6.4 P6.3 P6.2 P6.1 P6.0
rw rw rw rw rw rw rw
Bit Function
P6.y Port data register P6 bit y.
6 - 36 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
rw rw rw rw rw rw rw
Bit Function
DP6.y Port direction register DP6 bit y.
DP6.y = 0: Port line P6.y is an input (high-impedance).
DP6.y = 1: Port line P6.y is an output.
rw rw rw rw rw rw rw
Bit Function
ODP6.y Port 6 Open Drain control register bit y
ODP6.y = 0: Port line P6.y output driver in push/pull mode
ODP6.y = 1: Port line P6.y output driver in open drain mode
6 - 37 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
rw rw rw rw rw rw rw
Bit Function
SELP6.y Alternate Function Control Bit
SELP6.y = 0: General Purpose Port Functionality enabled for Line P6.y.
SELP6.y = 1: Alternate Function enabled for Line P6.y.
6 - 38 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
System Control & Configuration
6 - 40 Micronas
Peripherals
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 Peripherals
All of the peripherals described in the following paragraphs are clocked with the same
clock as the CPU (fhw_clk). Depending on the mode (normal or Idle), this frequency is
33.33 MHz or 3 MHz.
7-3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Timer Block 1:
• fhw_clk/4 maximum resolution
• 3 independent timers/counters
• Timers/counters can be concatenated
• 4 operating modes (timer, gated timer, counter, incremental)
• Separate interrupt nodes
Timer Block 2:
• fhw_clk/2 maximum resolution
• 2 independent timers/counters
• Timers/counters can be concatenated
• 3 operating modes (timer, gated timer, counter)
• Extended capture/reload functions via 16-bit Capture/Reload register CAPREL
• Separate interrupt nodes
7-4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
as capture or reload registers for the core timer. Concatenation of T3 with other timers
is provided through line T3OTL.
The current contents of each timer can be read or modified by the CPU by accessing the
corresponding timer registers T2, T3, or T4, which are located in the non-bitaddressable
SFR space. When any of the timer registers are written to by the CPU in the state
immediately before a timer increment, decrement, reload, or capture is to be performed,
the CPU write operation has priority in order to guarantee correct results.
T2EUD U/D
Interrupt
f hw_clk 2n : 1 T2 GPT1 Timer T2 Request
Mode
T2IN Control
Reload
Capture
T3OTL
f hw_clk 2n : 1
T3
T3IN Mode GPT1 Timer T3 Interrupt
Control Request
U/D
T3EUD
T3OTL Capture
Reload
T4IN T4
Mode
f hw_clk 2n : 1 Control GPT1 Timer T4 Interrupt
Request
T4EUD U/D
UEB11195
Run Control
The timer can be started or stopped by software through bit T3R (Timer T3 Run Bit).
Setting bit T3R will start the timer, clearing T3R stops the timer.
7-5 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
In gated timer mode, the timer will only run if T3R is set and the gate is active (high or
low, as programmed).
Note: When bit T2RC/T4RC in timer control register T2CON/T4CON is set, T3R will also
control (start and stop) auxiliary timer T2/T4.
Note: The direction control works in the same way for core timer T3 and for auxiliary
timers T2 and T4. Therefore the lines and bits are named Tx …
7-6 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
In addition, T3OTL can be used in conjunction with the timer over/underflows as an input
for the counter function or as a trigger source for the reload function of the auxiliary
timers T2 and T4. For this purpose, the state of T3OTL does not have to be available at
any port pin, because an internal connection is provided for this option.
Table 7-2
fMOD = Timer Input Selection T2I / T3I / T4I
33.33 MHz
000 B 000B 001 B 010B 011B 100B 101 B 110B 111B
FM = 1 0 0 0 0 0 0 0 0
Prescaler factor 4 8 16 32 64 128 256 512 1024
Input Frequency 2.08 4.16 2.08 1.04 521.83 260.41 130.20 65.10 32.55
MHz MHz MHz MHz kHz kHz kHz kHz kHz
Resolution 120 240 480 960 1.92 3.84 7.68 15.36 30.72
ns ns ns ns ←s ←s ←s ←s ←s
Period 7.86 15.72 31.45 62.91 125.82 251.6 503 1 2.01
ms ms ms ms ms ms ms s s
This formula also applies to the Gated Timer Mode of T3 and to the auxiliary timers T2
and T4 in timer and gated timer mode.
7-7 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
BPS1 TxI
MUX
EXOR 1
TxEUD x=3
TxUDE UEB11196
BPS1 TxI
f hw_clk 2n : 1
TxUDE UEB11197
7-8 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
If T3M = ‘010B’, the timer is enabled when T3IN shows a low level. A high level at this
line stops the timer. If T3M = ‘011 B’, line T3IN must have a high level in order to enable
the timer. In addition, the timer can be turned on or off by software using bit T3R. The
timer will only run, if T3R is set and the gate is active. It will stop, if either T3R is cleared
or the gate is inactive.
Note: A transition of the gate signal at line T3IN does not cause an interrupt request.
Edge
Select
TxOFL
TxI
TxUD
0
Interrupt
MUX
Request
XOR 1
TxEUD x=3
TxUDE
UEB11198
7-9 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
For counter operation, a port pin associated to line T3IN must be configured as input.
The maximum input frequency which is allowed in counter mode is fhw_clk/8 (BPS1 = ‘01’).
To ensure that a transition of the count input signal which is applied to T3IN is correctly
recognized, its level should be held high or low for at least 4 fhw_clk cycles (BPS1 = ‘01’)
before it changes.
T3IN Edge
Timer T3 T3OTL T3OUT
Select
Up/
T3I T3R Down T3OE
Interrupt
T3 T3 Request
Edge RDIR
Edge
Interrupt
T3M
Change T3 Rotation
Detection CHDIR Interrupt
T3UD
T3M
0
MUX
Phase XOR 1
T3EUD Detect
T3UDE UEB11199
7 - 10 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
generated each time a count action for timer T3 occurs. Count direction, changes in the
count direction and count requests are monitored through the status bits T3RDIR,
T3CHDIR and T3EDGE in register T3CON. T3 is modified automatically according to the
speed and the direction of the incremental encoder. Therefore, the contents of the T3
timer always represents the encoder’s current position.
Table 7-4 Core Timer T3 (Incremental Interface Mode) Input Edge Selection
T3I Triggering Edge for Counter Increment/Decrement
000 None. Counter T3 stops.
001 Any transition (rising or falling edge) on T3IN.
010 Any transition (rising or falling edge) on T3EUD.
011 Any transition (rising or falling edge) on any T3 input (T3IN or T3EUD).
1XX Reserved. Do not use this combination.
A + A
T3 Input
A -
External B + B
T3 Input Microcontroller
Encoder B -
T0 + T0
Interrupt
T0 -
Signal Conditioning
UED11136
7 - 11 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
The maximum input frequency which is allowed in incremental interface mode is fhw_clk/
8 (BPS = 01). To ensure that a transition of any input signal is correctly recognized, its
level should be held high or low for at least 4 fhw_clk cycles (BPS = 01) before it changes.
In Incremental Interface Mode the count direction is automatically derived from the
sequence in which the input signals change, which corresponds to the rotation direction
of the connected sensor. Table 7-5 summarizes the possible combinations.
The figures below give examples of T3’s operation, visualizing count signal generation
and direction control. It also shows how input jitter is compensated, which might occur if
the sensor rests near to one of its switching points.
T3EUD
Contents
of T3 Up Down Up
Note: This example shows the timer behavior assuming that T3 counts upon any transition on
any input, i.e. T3I = ’011B’.
UET11137
7 - 12 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
T3EUD
Contents
of T3 Up Down Up
Note: This example shows the timer behavior assuming that T3 counts upon any transition on
input T3IN, i.e. T3I = ’001B’.
UET11138
7 - 13 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Edge
Select
Interrupt
TxIN Auxiliary Timer Tx
Request
Up/
TxR Down
TxI
TxUD
0
MUX
XOR 1
TxEUD x = 2, 4
TxUDE
UEB11200
7 - 14 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Note: Only state transitions of T3OTL which are caused by the overflows/underflows of
T3 will trigger the counter function of T2/T4. Modifications of T3OTL via software
will NOT trigger the counter function of T2/T4.
For counter operation, an external pin associated to line TxIN must be configured as
input. The maximum input frequency which is allowed in counter mode is fhw_clk/8 (BPS1
= ‘01’). To ensure that a transition of the count input signal which is applied to TxIN is
correctly recognized, its level should be held for at least 4 fhw_clk cycles (BPS1 = ‘01’)
before it changes.
7 - 15 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
BPS1 TyI
Interrupt
*) Request
Edge
Select
Interrupt
Auxiliary Timer Tx TxIR
Request
TxR x = 2, 4 y = 3
TxI UES11201
Note: Line ‘*’ is only affected by over/underflows of T3, but NOT by software
modifications of T3OTL.
Figure 7-10 Concatenation of Core Timer T3 and an Auxiliary Timer
7 - 16 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Source/Edge x = 2, 4
Select
Reload Register Tx
Interrupt
TxIN
Request
TxI
Input Interrupt
*) Clock
Core Timer T3
Request
T3OE UES11202
Note: Line ‘*’ is only affected by over/underflows of T3, but NOT by software
modifications of T3OTL.
7 - 17 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Figure 7-12 shows an example of the generation of a PWM signal using the alternate
reload mechanism. T2 defines the high time of the PWM signal (reloaded on positive
transitions) and T4 defines the low time of the PWM signal (reloaded on negative
transitions). The PWM signal can be output on line T3OUT if the control bit T3OE is set.
With this method the high and low time of the PWM signal can be varied in a wide range.
Note: The output toggle latch T3OTL is accessible via software and may be changed, if
required, to modify the PWM signal. However, this will NOT trigger the reloading
of T3.
Note: An associated port pin linked to line T3OUT should be configured as output.
Reload Register T2
Interrupt
Request
*) T2I
Input
Core Timer T3 T3OTL T3OUT
Clock
Up/Down T3OE
Interrupt
*) Request
Interrupt
Request
Reload Register T4
T4I UES11203
Note: Lines ‘*’ are only affected by over/underflows of T3, but NOT by software
modifications of T3OTL.
7 - 18 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Edge x = 2, 4
Select
Capture Register Tx
Interrupt
TxIN
Request
TxI
Input Interrupt
Core Timer T3
Clock Request
T3OE UES11204
7 - 19 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
f hw_clk 2n : 1 T5
Mode
Control U/D
Clear
Capture
CAPIN Interrupt
Request
MUX
T3IN/
GPT2 CAPREL
T3EUD
CT3 Interrupt
Request
Clear
T6 U/D
f hw_clk n Mode
2 :1
Control
UES11205
7 - 20 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Note: The direction control works the same for core timer T6 and for auxiliary timer T5.
Therefore the lines and bits are named Tx …
7 - 21 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
BPS2 T6I
T6OFL
UEB11206
7 - 22 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
BPS2 TyI
TyR Up/Down
Interrupt
*) Request
Edge
Select
TyOFL
Interrupt
Auxiliary Timer Tx TxIR
Request
TxI UES11207
Note: Line ‘*’ is only affected by over/underflows of T6, but NOT by software
modifications of T6OTL.
Figure 7-16 Concatenation of Core Timer T6 and Auxiliary Timer T5
7 - 23 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
T3EUD or both inputs T3IN and T3EUD. The active edge is controlled by bit field CI in
register T5CON.
The maximum input frequency for the capture trigger signal at CAPIN is fhw_clk/2
(BPS2 = ‘01’). To ensure that a transition of the capture trigger signal is correctly
recognized, its level should be held for at least 2 fhw_clk cycles (BPS2 = ‘01’) before it
changes.
When the timer T3 capture trigger is enabled (CT3 is set), register CAPREL captures the
contents of T5 when transitions of the selected input(s) occur. These values can be used
to measure T3’s input signals. This is useful e.g. when T3 operates in incremental
interface mode, in order to derive dynamic information (speed acceleration) from the
input signals.
When a selected transition at the external input line CAPIN is detected, the contents of
the auxiliary timer T5 are latched into register CAPREL, and interrupt request flag CRIR
is set. At the same time, timer T5 can be cleared to 0000H. This option is controlled by
bit T5CLR in register T5CON. If T5CLR = ‘0’, the contents of timer T5 are not affected
by a capture. If T5CLR = ‘1’, timer T5 is cleared after the current timer value has been
latched into register CAPREL.
Note: Bit T5SC only controls whether a capture is performed or not. If T5SC = ‘0’, the
input line CAPIN can still be used to clear timer T5 or as an external interrupt input.
This interrupt is controlled by the CAPREL interrupt control register CRIC.
Up/Down
Input Interrupt
Auxiliary Timer T5
Clock Request
Edge
Select
CAPIN T5CLR
MUX T5CC
T3IN/
T3EUD T5SC
Interrupt
CT3 CI Request
CAPREL Register
UEB11208
7 - 24 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
CAPREL Register
T6SR
Input Interrupt
Core Timer T6
Clock Request
T6OFL
Up/Down
UEB11209
7 - 25 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Up/Down
Input Interrupt
Auxiliary Timer T5
Clock Request
Edge
Select
CAPIN T5CLR
MUX T5CC
T3IN/
T3EUD T5SC
Interrupt
CT3 CI Request
CAPREL Register
T6CLR
T6SR
Input Interrupt
Core Timer T6
Clock Request
T6OFL
Up/Down UEB11210
7 - 26 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
bit T6OTL will be toggled. This signal has 8 times more transitions than the signal which
is applied to line CAPIN.
A certain deviation of the output frequency is generated by the fact that timer T5 will
count actual time units (e.g. T5 running at 1 MHz will capture the value 64H/100D for a
10 KHz input signal) while T6OTL will only toggle on an underflow of T6 (i.e. the
transition from 0000H to FFFFH). In the above mentioned example, T6 would count down
from 64 H so the underflow would occur after 101 T6 timing ticks. The actual output
frequency then is 79.2 KHz instead of the expected 80 KHz.
This can be solved by activating the capture correction (T5CC = ‘1’). If the capture
correction is actived the content of T5 is decremented by 1 before being captured. The
deviation described is eliminated (in the example T5 would capture 63 H/99D and the
output frequency would be 80 KHz).
The underflow signal of timer T6 can furthermore be used to clock one or more of the
CAPCOM unit’s timers, which gives the user the possibility to set compare operations
based on a finer resolution than that of the external operations. This connection is
accomplished through the T6OFL signal.
7 - 27 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
T3CON
Timer 3 Control Register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
T3 T3 T3
T3 T3 T3 T3 T3
RDI CH EDG BPS1 OTL OE UDE UD T3R T3M T3I
R DIR E
rh rwh rwh rw rwh rw rw rw rw rw rw
7 - 28 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 29 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Table 7-9 Timer 3 Input Parameter Selection for Timer Mode and Gated Mode
T3I Prescaler for Prescaler for Prescaler for Prescaler for
fhw_clk fhw_clk fhw_clk fhw_clk
(BPS1 = 00) (BPS1 = 01) (BPS1 = 10) (BPS1 = 11)
000 8 4 32 16
001 16 8 64 32
010 32 16 128 64
011 64 32 256 128
100 128 64 512 256
101 256 128 1024 512
110 512 256 2048 1024
111 1024 512 4096 2048
Table 7-11 Timer 3 Input Parameter Selection for Incremental Interface Mode
T3I Triggering Edge for Counter Update
000 None. Counter T3 stops
001 Any transition (raising or falling edge) on T3IN
010 Any transition (raising or falling edge) on T3EUD
011 Any transition (raising or falling edge) on T3IN or T3EUD
1XX Reserved. Do not use this combination!
7 - 30 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
T2CON
T4CON
Timer 2/4 Control Register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Tx Tx Tx
Tx Tx Tx Tx
RDIR CH EDG IR 0 RC UDE UD TxR TxM TxI
DIR E DIS
rh rwh rwh rw r rw rw rw rw rw rw
7 - 31 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 32 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Table 7-12 Timer x Input Parameter Selection for Timer Mode and Gated Mode
T3I Prescaler for Prescaler for Prescaler for Prescaler for
fhw_clk fhw_clk fhw_clk fhw_clk
(BPS1 = 00) (BPS1 = 01) (BPS1 = 10) (BPS1 = 11)
000 8 4 32 16
001 16 8 64 32
010 32 16 128 64
011 64 32 256 128
100 128 64 512 256
101 256 128 1024 512
110 512 256 2048 1024
111 1024 512 4096 2048
Table 7-14 Timer x Input Parameter Selection for Incremental Interface Mode
TxI Triggering Edge for Counter Update
000 None. Counter Tx stops
001 Any transition (raising or falling edge) on TxIN
010 Any transition (raising or falling edge) on TxEUD
011 Any transition (raising or falling edge) on TxIN or TxEUD
1XX Reserved. Do not use this combination!
7 - 33 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
T6CON
Timer 6 Control Register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
T6 T6 T6 T6
0 BPS2 0 0 T6R T6M T6I
SR CLR OTL UD
rw rw r rw rwh rw rw rw rw rw rw
7 - 34 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Table 7-15 Timer 6 Input Parameter Selection for Timer Mode and Gated Mode
T6I Prescaler for Prescaler for Prescaler for Prescaler for
fhw_clk (BPS2 = 00) fhw_clk (BPS2 = 01) fhw_clk (BPS2 = 10) fhw_clk (BPS2 = 11)
000 4 2 16 8
001 8 4 32 16
010 16 8 64 32
011 32 16 128 64
100 64 32 256 128
101 128 64 512 256
110 256 128 1024 512
111 512 256 2048 1024
7 - 35 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
T5CON
Timer 5 Control Register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
T5 T5 T5 T5 T5
CI CT3 0 T5R T5M T5I
SR CLR CC RC UD
rw rw rw rw rw rw rw rw rw rw rw
7 - 36 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Table 7-17 Timer 5 Input Parameter Selection for Timer Mode and Gated Mode
T5I Prescaler for Prescaler for Prescaler for Prescaler for
fhw_clk (BPS2 = 00) fhw_clk (BPS2 = 01) fhw_clk (BPS2 = 10) fhw_clk (BPS2 = 11)
000 4 2 16 8
001 8 4 32 16
010 16 8 64 32
011 32 16 128 64
100 64 32 256 128
101 128 64 512 256
110 256 128 1024 512
111 512 256 2048 1024
7 - 37 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7.1.4 Interrupts
For a detailed description of the various interrupts see description above. An overview is
given with a Table 7-19:
.
7 - 38 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 39 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
RTCCON RTC Control Register RTCH RTC Timer Count Register, High Word
T14REL Timer T14 Reload Register RTCL RTC Timer Count Register, Low Word
T14 Timer T14 Count Register RTCISNC RTC Interrupt Sub Node Control Register
RTCRELH RTC Timer Reload Register, High Word
RTCRELL RTC Timer Reload Register, Low Word
UEA11139
7 - 40 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
3 MHz RTC_INT
RTC_T14INT
RTCR Interrupt Subnode
RTC Control
The operating behavior of the RTC module is controlled by the RTCCON register. The
RTC starts counting by setting the RTCR run bit. After reset, the run bit is set and the
RTC automatically starts operation. Setting bits T14DEC or T14INC allows the T14 timer
to be manually and asynchronously decremented or incremented. These bits are cleared
by hardware after the decrement/increment operation. The RTC is only reset in case of
a hardware reset, so it keeps on running during idle and sleep mode.
7 - 41 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
RTCRELH = FA04H, counter T14 generates one overflow per millisecond, RTCL0 one
per second, RTCL1 one per minute, RTCH2 one per hour and RTCH3 one per day.
Reset Behavior
The RTC registers are only cleared or set by a hardware reset. Bit RTCR is set when the
hardware is reset.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - - - - - - - T14 T14 0 RTC
INC DEC R
rw rw rw
Bit Function
RTCR RTC Run Bit
‘0’: RTC stops
‘1’: RTC runs
T14DEC Decrement T14 Timer Value
Setting this bit to 1 effects a decrement of the T14 timer value. The bit is
cleared by hardware after decrementation.
T14INC Increment T14 Timer Value
Setting this bit to 1 effects an increment of the T14 timer value. The bit is
cleared by hardware after incrementation.
7 - 42 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
rw
Bit Function
TIMER14 16 Bit Timer Register
(15 … 0) Timer T14 generates the input clock for the RTC register and the periodic
interrupt.
rw
Bit Function
TIMERREL14 16 Bit Reload Register for Timer 14
(15 … 0) Represents the 16 bit reload value for T14
rw
Bit Function
RTCL1
(5 … 0) Low Word of 32 Bit Capture Register.
RTCL0
(9 … 0)
7 - 43 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
rw
Bit Function
RTCH3
(9 … 0) High Word of 32 Bit Capture Register.
RTCH2
(5 … 0)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RTCRELL1(5 .. 0) RTCRELL0(9 .. 0)
rw
Bit Function
RTCRELL1
(5 … 0) Low Word of 32 Bit Reload Register.
RTCRELL0
(9 … 0)
rw
Bit Function
RTCRELH2
(5 … 0) High Word of 32 Bit Reload Register.
RTCRELH3
(9 … 0)
7 - 44 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Bit Function
T14IR T14 Overflow Interrupt Request Flag
‘0’: No request pending.
‘1’: This source has raised an interrupt request.
T14IE T14 Overflow Interrupt Enable Control Bit
‘0’: Interrupt request is disabled.
‘1’: Interrupt request is enabled.
RTCxIR RTCx Interrupt Request Flag
‘0’: No request pending.
‘1’: This source has raised an interrupt request.
RTCxIE RTCx Interrupt Enable Control Bit
‘0’: Interrupt request is disabled.
‘1’: Interrupt request is enabled.
7 - 45 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
rw rw rw rw
Bit Function
RTCINTIR RTC Interrupt Request Flag
‘0’: No request pending.
‘1’: RTC has raised an interrupt request.
RTCINTIE RTC Interrupt Enable Control Bit
‘0’: Interrupt request is disabled.
‘1’: Interrupt request is enabled.
INT2IR Interrupt Request Flag of 2nd Source
disconnected in M2.
INT2IE 2nd Source Interrupt Enable Control Bit
‘0’: recommended value.
Note: The interrupt request flags of both RTC interrupt subnodes have to be cleared by
software inside the interrupt service routine.
7 - 46 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 47 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
.
Asynchronous Mode
fDIV
Prescaler/ Baud Rate
33 MHz
Fractional Divider Timer
Autobaud
Detection
Serial Port
Control
Synchronous Mode
÷2
fMOD Baud Rate
or
Timer
÷3
Serial Port
Control
Note: RxDI and RxDO are concatenated in the port logic to pin RxD.
UEB11141
7 - 48 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Ports & Direction Control Data Registers Control Registers Interrupt Control
Alternate Functions
7 - 49 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Data reception is enabled by the receiver enable bit S0REN. After reception of a
character has been completed, the received data and, if provided by the selected
operating mode, the received parity bit can be read from the (read-only) receive buffer
register S0RBUF. Bits in the upper half of S0RBUF which are not valid in the selected
operating mode will be read as zeros.
Data reception is double-buffered, so that reception of a second character may begin
before the previously received character has been read out of the receive buffer register.
In all modes, receive buffer overrun error detection can be selected through bit S0OEN.
When enabled, the overrun error status flag S0OE and the error interrupt request line
S0EIR will be activated if the receive buffer register has not been read when the
reception of a second character is complete. The previously received character in the
receive buffer is overwritten.
The Loop-Back option (selected by bit S0LB) allows the data currently being transmitted
to be received simultaneously in the receive buffer. This may be used to test serial
communication routines at an early stage without having to provide an external network.
In loop-back mode the alternate input/output functions of the Port 3 pins are not
necessary.
Note: Serial data transmission or reception is only possible when the baud rate
generator run bit S0R is set to ‘1’. Otherwise the serial interface is idle.
Do not program the mode control field S0M in register S0CON to one of the
reserved combinations to avoid unpredictable behavior of the serial interface.
7 - 50 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Fractional
Divider
fDIV fBR
33 MHz ÷2 MUX 13-Bit Baud Rate Timer ÷ 16
S0R ÷3
S0BRS
S0M S0PE
S0STR S0FE S0OE
S0RIR
S0REN Shift Clock Receive Int. Request
S0FEN S0TIR
Transmit Int. Request
S0PEN Serial Port Control S0TBIR
S0OEN Transmit Buffer Int. Request
S0EIR
S0LB Shift Clock Error Int. Request
MUX
RxD0 TxD0
Internal Bus
UES11143
7 - 51 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 52 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
UED11145
IrDA Frames
The modulation schemes of IrDA is based on standard asynchronous data transmission
frames. The asynchronous data format in IrDA mode (S0M = 010B) is defined as follows:
• 1 start bit/8 data bits/1 stop bit
The coding/decoding of/to the asynchronous data frames is shown in Figure 7-27. In
general, during the IrDA transmissions, UART frames are encoded into IR frames and
vice versa. A low level on the IR frame indicates a ‘LED off’ state. A high level on the IR
frame indicates a ‘LED on’ state.
For a ‘0’-bit in the UART frame, a high pulse is generated. For a ‘1’-bit in the UART frame,
no pulse is generated. The high pulse starts in the middle of a bit cell and has a fixed
width of 3/16 of the bit time. The ASC0 also allows the length of the IrDA high pulse to
be programmed. Furthermore, the polarity of the received IrDA pulse can be inverted in
IrDA mode. Figure 7-27 shows the non-inverted IrDA pulse scheme.
7 - 53 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
UART Frame
Start 8 Data Bits Stop
Bit Bit
0 1 0 1 0 0 1 1 0 1
IR Frame
Start 8 Data Bits Stop
Bit Bit
0 1 0 1 0 0 1 1 0 1
Bit Time
1/2 BitTime Pulse Width =
3/16 Bit Time
(or variable length)
UED11146
7 - 54 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
IrDA Mode
The duration of the IrDA pulse is normally 3/16 of a bit period. The IrDA standard also
allows the pulse duration to be independent of the baud rate or bit period. In this case
the transmitted pulse always has the width corresponding to the 3/16 pulse width at
115.2 KBaud which is 1.67 ←s. Both bit period dependent or fixed IrDA pulse width
generation can be selected. The IrDA pulse width mode is selected by bit S0IRPW,
which is located in register S0PWM.
In case of a fixed IrDA pulse width generation, the lower 8 bits in register S0PWM are
used to adapt the IrDA pulse width to a fixed value of e.g. 1.67 ←s. The fixed IrDA pulse
width is generated by a programmable timer as shown in Figure 7-28.
7 - 55 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
S0PWM
The name S0PWM in the formulas represents the contents of the reload register
S0PWM (bits S0PW0-7), taken as an unsigned 8-bit integer.
The content of S0PWM further defines the minimum IrDA pulse width (tIPW min) which is
still recognized as a valid IrDA pulse during a receive operation. This function is
independent of the selected IrDA pulse width mode (fixed or variable) which is defined
by bit S0IRPW in register S0PWM. The minimum IrDA pulse width is calculated by a shift
right operation of S0PWM bit 7-0 by one bit divided by the CPU clock (33.33 MHz).
Note: If S0IRPW=0 (fixed IrDA pulse width), SxPWM bit 7-0 must be loaded with a value
which assures that t IPW > t IPW min.
7 - 56 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Autobaud
Detection
ABCON
RXINV TXINV
ABEM
RxDI M
LB
UED11148
7 - 57 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
S0BRS
S0RIR
S0REN Shift Clock Receive Int. Request
S0TIR
S0OEN Transmit Int. Request
TxD0 Serial Port Control S0TBIR
S0LB Transmit Buffer Int. Request
Shift Clock S0EIR
Error Int. Request
RxD0
0
Receive Shift Transmit Shift
MUX Register Register
1
Internal Bus
UES11149
7 - 58 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
data, while transmission of the previous one is still going on. The data bits are
transmitted synchronous to the shift clock. After the bit time for the 8th data bit, both pins
TXD0 and RXD0 will go high, the transmit interrupt request line S0TIR is activated, and
serial data transmission stops.
Pin TXD0 must be configured for alternate data output in order to support the shift clock.
Pin RXD0 must also be configured for output during transmission.
7 - 59 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Receive/Transmit Timing
Shift Clock
Transmit Data Data Bit n Data Bit n+1 Data Bit n+2
Receive Data Valid Data n Valid Data n+1 Valid Data n+2
Shift Clock
Transmit Data D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3
1. Byte 2. Byte
Receive Data D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3
1. Byte 2. Byte
UET11150
7 - 60 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 61 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
S0R ÷3
S0BG = 33 MHz
32 x Baud rate -1
1 33 MHz
Baud rate = 48 x (S0BG+1)
S0BG = 33 MHz
48 x Baud rate -1
S0BG represents the content of the reload register S0BG, taken as an unsigned 13-bit
integer.
The maximum baud rate that can be achieved by the asynchronous modes when using
the two fixed clock dividers and a CPU clock of 33.33 MHz is 1041.66 KBaud. The table
7 - 62 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
below lists various commonly used baud rates, together with the required reload values
and the deviation errors compared to the intended baud rate.
Baud Rate S0BRS = ‘0’, fMOD = 33.33 MHz S0BRS = ‘1’, fMOD = 33.33 MHz
Deviation Error Reload Value Deviation Error Reload Value
1041.66 KBaud – 0000H – –
694.4 KBaud – – – 0000H
19.2 KBaud + 0.4%/– 1.3% 0035H/0036 H + 0.5%/– 2.2% 0023H/0024 H
9600 Baud + 0.4%/– 0.4% 006bH/006CH + 0.5%/– 0.9% 0047H/0048 H
4800 Baud + 0.0%/– 0.4% 00D8H/00D9H + 0.5%/– 0.2% 008FH/0090H
2400 Baud + 0.0%/– 0.2% 01B1H/01B2H + 0.1%/– 0.2% 0120H/0121 H
1200 Baud + 0.0%/– 0.1% 0363H/0364 H + 0.1%/– 0.0% 0241H/0242 H
110 Baud + 0.0%/– 0.0% 24FCH/24FDH + 0.0%/– 0.0% 18A8H/18A9H
Note: S0FDE must be equal to 0 to achieve the baud rates in the table above. The
deviation errors given in the table are rounded. Using a baud rate crystal will
provide correct baud rates without deviation errors.
0 33MHz
Baud rate = 16 x (S0BG+1)
S0BG represents the content of the reload register S0BG, taken as an unsigned 13-bit
integer.
S0FDV represents the content of the fractional divider register taken as an unsigned 9-
bit integer.
7 - 63 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
1 33 MHz 33MHz
Baud rate = 12 x (S0BG+1) S0BG =
12 x Baud rate -1
S0BG represents the content of the reload register, taken as unsigned 13-bit integers.
The maximum baud rate that can be achieved in synchronous mode when using a CPU
clock of 33.33 MHz is 4.166 MBaud.
7 - 64 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Figure 7-34 shows how the autobaud detection unit of the ASC is integrated into its
asynchronous mode configuration. The RXD data line is an input of the autobaud
detection unit. The clock fDIV, which is generated by the fractional divider, is used by the
autobaud detection unit as a time base. After successful recognition of the baud rate and
asynchronous operating mode of the RXD data input signal, bits in the CON register and
the value of the BG register in the baud rate timer are set to the appropriate values, and
the ASC_P3 can start immediately with the reception of serial input data.
Asynchronous Mode
fDIV
fMOD Prescaler/ Baud Rate
Fractional Divider Timer
Autobaud
Detection
Serial Port
Control
7 - 65 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
1 0 0 0 0 1 1 1 1 0 0 1 0 1 1 1 0 1
Start Parity Stop Start Parity Stop
1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 1 1 1
Start Parity Stop Start Parity Stop
8 Bit, No Parity
’a’ = 61H ’t’ = 74 H
1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 1 0 1
Start Stop Start Stop
1 0 0 0 0 1 1 0 1 1 0 0 1 0 1 1 1 0 0 1
Start Parity Stop Start Parity Stop
1 0 0 0 0 1 1 0 0 1 0 0 1 0 1 1 1 0 1 1
Start Parity Stop Start Parity Stop
UED11154
7 - 66 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 1 1 1
Start Parity Stop Start Parity Stop
1 0 0 0 0 0 1 1 1 0 0 1 0 1 0 1 0 1
Start Parity Stop Start Parity Stop
8 Bit, No Parity
’A’ = 41 H ’T’ = 54 H
1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 1 0 1
Start Stop Start Stop
1 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 1 0 1 1
Start Parity Stop Start Parity Stop
1 0 0 0 0 0 1 0 1 1 0 0 1 0 1 0 1 0 0 1
Start Parity Stop Start Parity Stop
UED11155
7 - 67 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Table 7-20 defines the nine standard baud rates (Br0 - Br8) which can be detected for
fDIV = 11.0592 MHz.
7 - 68 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Table 7-20 Autobaud Detection using Standard Baud Rates (fDIV = 11.0592 MHz)
Baud Rate Detectable Standard Divide Factor df BG is Loaded after
Numbering Baud Rate Detection with Value
Br0 230.400 kBaud 48 2 = 002H
Br1 115.200 kBaud 96 5 = 005H
Br2 57.600 kBaud 192 11 = 00BH
Br3 38.400 kBaud 288 17 = 011H
Br4 19.200 kBaud 576 35 = 023H
Br5 9600 Baud 1152 71 = 047H
Br6 4800 Baud 2304 143 = 08FH
Br7 2400 Baud 4608 287 = 11FH
Br8 1200 Baud 9216 575 = 23FH
According to Table 7-20 a baud rate of 9600 Baud is achieved when register BG is
loaded with a value of 047 H, assuming that fDIV has been set to 11.0592 MHz.
Table 7-20 also lists a divide factor d f which is defined with the following formula:
f DIV
baud rate =
df
This divide factor df defines a fixed relationship between the prescaler output frequency
fDIV and the baud rate to be detected during the autobaud detection operation. This
means, that changing fDIV results in a totally different baud rate table in terms of baud
rate values. For the baud rates to be detected, the following relations are always valid:
– Br0 = fDIV/48D, Br1 = fDIV/96D, up to Br8 = fDIV/9216D,
A requirement for detecting standard baud rates up to 230.400 kBaud, is the fDIV
minimum value of 11.0592 MHz. With the value FD_VALUE in register FDV, the
fractional divider fDIV is adapted to the system clock frequency 33 MHz. Table 7-21
defines the deviation of the standard baud rates when using autobaud detection
depending on the system fMOD.
Table 7-21 Standard Baud Rates - Deviations and Errors for Autobaud Detection
fMOD FDV Error in fDIV
33 MHz 172 + 0.24%
Note: If the deviation of the baud rate after autobaud detection is too high, the baud rate
generator (fractional divider FDV and reload register BG) can be reprogrammed if
required to get a more precise baud rate with less error.
7 - 69 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
512 x fDIV
FDV = with fDIV = 9.6 MHz
33 MHz
Using this selection (fDIV = 9.6 MHz), the detectable baud rates start at 200 kBaud (Br0)
down to 1042 Baud (Br8). Table 7-22 shows the baud rate table for this example.
Table 7-22 Autobaud Detection using Non-Standard Baud Rates (fDIV = 9.6 MHz)
Baud Rate Detectable Non- Divide Factor df BG is Loaded after
Numbering Standard Baud Rates Detection with Value
Br0 200.000 kBaud 48 2 = 002H
Br1 100.000 kBaud 96 5 = 005H
Br2 50 kBaud 192 11 = 00BH
Br3 33.333 kBaud 288 17 = 011H
Br4 16.667 kBaud 576 35 = 023H
Br5 8333 Baud 1152 71 = 047H
Br6 4167 Baud 2304 143 = 08FH
Br7 2083 Baud 4608 287 = 11FH
Br8 1047 Baud 9216 575 = 23FH
7 - 70 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Table 7-23 Autobaud Detection Overwrite Values for the CON Register
Detected Parameters CON_M CON_ODD BG_BR_VALUE
Operating Mode 7 bit, even parity 011 0 –
7 bit, odd parity 011 1
8 bit, even parity 111 0
8 bit, odd parity 111 1
8 bit, no parity 001 0
Baud rate Br0 – – 2 = 002H
Br1 5 = 005H
Br2 11 = 00BH
Br3 17 = 011H
Br4 35 = 023H
Br5 71 = 047H
Br6 143 = 08FH
Br7 287 = 11FH
Br8 575 = 23FH
7 - 71 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7.3.6 Interrupts
Six interrupt sources are provided for serial channel ASC0. Line S0TIC indicates a
transmit interrupt, S0TBIC indicates a transmit buffer interrupt, S0RIC indicates a
receive interrupt and S0EIC indicates an error interrupt of the serial channel. The
autobaud detection unit provides two additional interrupts, the ABSTIR start of autobaud
operation interrupt and the ABDETIR autobaud detected interrupt. The interrupt output
lines S0TBIR, S0TIR, S0RIR, and S0EIR are activated (active state) for two periods of
the module clock fMOD (33.33 MHz).
The cause of an error interrupt request (framing, parity, overrun error) can be identified
by the error status flags S0FE, S0PE, and S0OE which are located in control register
S0CON.
Note: In contrary to the error interrupt request line S0EIR, the error status flags S0FE/
S0PE/S0OE are not reset automatically but must be cleared by software.
For normal operation (e.g. besides the error interrupt) the ASC0 provides three interrupt
requests to control data exchange via this serial channel:
• S0TBIR is activated when data is moved from S0TBUF to the transmit shift register.
• S0TIR is activated before the last bit of an asynchronous frame is transmitted, or after
the last bit of a synchronous frame has been transmitted.
• S0RIR is activated when the received frame is moved to S0RBUF.
While the task of the receive interrupt handler is quite clear, the transmitter is serviced
by two interrupt handlers. This has its advantages for the servicing software.
For single transfers it is sufficient to use the transmitter interrupt (S0TIR), which indicates
that the previously loaded data, except for the last bit of an asynchronous frame, has
been transmitted.
For multiple back-to-back transfers it is necessary to wait to load the last piece of data
until the last bit of the previous frame has been transmitted. In asynchronous mode this
leaves just one bit-time for the handler to respond to the transmitter interrupt request, in
synchronous mode it is impossible.
Using the transmit buffer interrupt (S0TBIR) to reload transmitted data gives enough time
to transmit a complete frame for the service routine, as S0TBUF may be reloaded while
the previous data is still being transmitted.
The ABSTIR start of autobaud operation interrupt is generated whenever the autobaud
detection unit is enabled (ABEN, ABDETEN and ABSTEN set), and a start bit has been
detected at RXD. In this case ABSTIR is generated during autobaud detection whenever
a start bit is detected.
The ABDETIR autobaud detected interrupt is always generated after recognition of the
second character of the two-byte frame, after a successful autobaud detection. If
ABCON_FCDETEN is set the ABDETIR autobaud detected interrupt is also generated
after the recognition of the first character of the two-byte frame.
7 - 72 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Asynchronous Mode
S0TIR S0TIR S0TIR
S0TBIR S0TBIR S0TBIR
Start
Start
Start
Stop
Stop
Stop
Idle Idle
Synchronous Mode
S0TIR S0TIR S0TIR
S0TBIR S0TBIR S0TBIR
Idle Idle
UED11156
S0CON
Control Register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PEN
/
R LB BRS ODD FDE OE FE PE OEN FEN REN STP M
RXD
I
7 - 73 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 74 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 75 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
The autobaud control register ABCON is used to control the autobaud detection
operation. It contains its general enable bit, the interrupt enable control bits, and data
path control bits
.
S0ABCON
Autobaud Control Register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FC AB ABS
RX TX AUR AB
0 0 0 0 ABEM 0 0 0 DET DET T
INV INV EN EN
EN EN EN
7 - 76 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
The autobaud status register ABSTAT indicates the status of the autobaud detection
operation.
7 - 77 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
S0ABSTAT
Autobaud Status Register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DET
SCC SCS FCC FCS
0 0 0 0 0 0 0 0 0 0 0 WAI
DET DET DET DET
T
7 - 78 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Note: SCSDET or SCCDET are set when the second character has been recognized.
CON_ABEN is reset, and ABDETIR set, after SCSDET or SCCDET have seen
set.
The baud rate timer reload register BG contains the 13-bit reload value for the baud rate
timer in asynchronous and sychronous mode.
7 - 79 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
S0BG
Baud Rate Timer/Reload Register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 BR_VALUE
The fractional divider register FDV contains the 9-bit divider value for the fractional
divider (asynchronous mode only). It is also used for reference clock generation of the
autobaud detection unit.
S0FDV
Fractional Divider Register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 FD_VALUE
The IrDA pulse mode and width register PMW contains the 8-bit IrDA pulse width value
and the IrDA pulse width mode select bit. This register is only required in the IrDA
operating mode.
7 - 80 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
S0PMW
IrDA Pulse Mode/Width Register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 IRP PW_VALUE
W
The transmitter buffer register TBUF contains the transmit data value in asynchronous
and synchronous modes.
7 - 81 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
S0TBUF
Transmitter Buffer Register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 TD_VALUE
The receiver buffer register RBUF contains the receive data value in asynchronous and
synchronous modes.
S0RBUF
Transmitter Buffer Register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 RD_VALUE
7 - 82 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 83 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Ports & Direction Control Data Registers Control Registers Interrupt Control
Alternate Functions
Figure 7-38 SFRs and Port Pins Associated with the SSC0
The SSC0 supports full-duplex and half-duplex synchronous communication up to
16.5 MBaud (@ 33.33 MHz module clock). The serial clock signal can be generated by
the SSC0 itself (master mode), or received from an external master (slave mode). Data
width, shift direction, clock polarity and phase are programmable. This allows
communication with SPI-compatible devices. Transmission and reception of data is
double-buffered. A 16-bit baud rate generator provides the SSC with a separate serial
clock signal.
The high-speed synchronous serial interface can be configured in a very flexible way, so
it can be used with other synchronous serial interfaces, serve for master/slave or
multimaster interconnections or operate compatible with the popular SPI interface. So it
can be used to communicate with shift registers (I/O expansion), peripherals (e.g.
EEPROMs etc.) or other controllers (networking). The SSC0 supports half-duplex and
full-duplex communication. Data is transmitted or received on pins MTSR0 (Master
Transmit/Slave Receive) and MRST0 (Master Receive/Slave Transmit). The clock signal
is output or input on pin SCLK0. These pins are alternate functions of port pins.
7 - 84 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Status Control
MTSRx
Pin
Control
16-Bit Shift Register MRSTx
Internal Bus
UEB11158
7 - 85 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
transferred, the contents of the shift register are moved to the Receive Buffer SSCRB
and a receive interrupt request line (SSCRIR) will be activated. If no further transfer is to
take place (SSCTB is empty), SSC0BSY will be cleared at the same time. Software
should not modify SSC0BSY, as this flag is hardware controlled.
Note: Only one SSC (etc.) can be master at a given time.
The transfer of serial data bits can be programmed in many respects:
• The data width can be chosen from 2 bits to 16 bits
• A transfer may start with the LSB or the MSB
• The shift clock may be idle low or idle high
• The data bits may be shifted with the leading or trailing edge of the clock signal
• The baud rate may be set from 254 Baud up to 16.66 MBaud (@ 33.33 MHz module
clock)
• The shift clock can be generated (master) or received (slave)
These features allow the adaptation of the SSC0 to a wide range of applications, where
serial data transfer is required.
The Data Width Selection supports the transfer of frames of any data length, from 2-bit
‘characters’ up to 16-bit ‘characters’. Starting with the LSB (SSC0HB = ‘0’) allows
communication e.g. with an SSC device in synchronous mode (C166 family) or 8051 like
serial interfaces. Starting with the MSB (SSC0HB = ‘1’) allows operation compatible with
the SPI interface.
Regardless which data width is selected and whether the MSB or the LSB is transmitted
first, the transfer data is always right aligned in registers SSCTB and SSCRB, with the
LSB of the transfer data in bit 0 of these registers. The data bits are rearranged for
transfer by the internal shift register logic. The unselected bits of SSCTB are ignored, the
unselected bits of SSCRB will not be valid and should be ignored by the receiver service
routine.
The Clock Control allows the transmit and receive behavior of the SSC0 to be adapted
to a variety of serial interfaces. A specific clock edge (rising or falling) is used to shift out
transmit data, while the other clock edge is used to latch in receive data. Bit SSC0PH
selects the leading edge or the trailing edge for each function. Bit SSC0PO selects the
level of the clock line in the idle state. So for an idle-high clock the leading edge is a
falling one, a 1-to-0 transition (see Figure 7-40).
7 - 86 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
SSC0 SSC0
PO PH Shift Clock
SCLK
0 0
0 1
1 0
1 1
Pins
MTSR0/MRST0
Transmit Data
First Bit Last Bit
Latch Data
Shift Data
UED11159
7 - 87 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Device #3 Slave
Shift Register
MTSR
MRST
CLK
Clock
UED11160
7 - 88 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
the slave device from which it expects data either by separate select lines, or by
sending a special command to this slave.
After performing all necessary initializations of the SSC0, the serial interfaces can be
enabled. In a master device, the alternate clock line will now go to its programmed
polarity. The alternate data line will go to either ‘0’ or ‘1’, until the first transfer starts. After
a transfer, the alternate data line will always remain at the logic level of the last
transmitted data bit.
When the serial interfaces are enabled, the master device can initiate the first data
transfer by writing the transmit data into register SSCTB. This value is copied into the
shift register (which is assumed to be empty at this time), and the selected first bit of the
transmit data will be placed onto the MTSR line on the next clock to the baud rate
generator (transmission only starts, if SSC0EN = ‘1’). Depending on the selected clock
phase, a clock pulse will also be generated on the SCLK line. With the opposite clock
edge the master simultaneously latches and shifts in the data detected at its input line
MRST. This ‘exchanges’ the transmit data with the receive data. Since the clock line is
connected to all slaves, their shift registers will be shifted synchronously with the
master’s shift register, shifting out the data contained in the registers, and shifting in the
data detected at the input line. After the pre-programmed number of clock pulses (via the
data width selection) the data transmitted by the master is contained in all slaves’ shift
registers, while the master’s shift register holds the data of the selected slave. In the
master and all the slaves, the content of the shift register is copied into the receive buffer
SSCRB and the receive interrupt line SSC0RIR is activated.
A slave device will immediately output the selected first bit (MSB or LSB of the transfer
data) at pin MRST, when the content of the transmit buffer is copied into the slave’s shift
register. It will not wait for the next clock from the baud rate generator, as the master
does. The reason for this is that, depending on the selected clock phase, the first clock
edge generated by the master may be already used to clock in the first data bit. So the
slave’s first data bit must already be valid at this time.
Note: On the SSC0 a transmission and a reception always takes place at the same time,
regardless whether valid data has been transmitted or received.
The initialization of the SCLK pin on the master requires some attention in order to
avoid undesired clock transitions, which may disturb the other receivers. The state of the
internal alternate output lines is ‘1’ as long as the SSC is disabled. This alternate output
signal is ANDed with the respective port line output latch. Enabling the SSC with an idle-
low clock (SSC0PO = ‘0’) will immediately drive the alternate data output and (via the
AND) the port pin SCLK low. To avoid this, the following sequence should be used:
• select the clock idle level (SSC0PO = ‘x’)
• load the port output latch with the desired clock idle level
• switch the pin to output
• enable the SSC0 (SSC0EN = ‘1’)
• if SSC0PO = ‘0’: enable alternate data output
7 - 89 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
The same mechanism as for selecting a slave for transmission (separate select lines or
special commands) may also be used to move the role of the master to another device
in the network. In this case the previous master and the future master (previous slave)
will have to toggle their operating mode (SSC0MS) and the direction of their port pins.
7 - 90 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
MRST MRST
Common
Transmit/
Receive Device #3 Slave
Line
Shift Register
MTSR
MRST
CLK
Clock
UED11161
7 - 91 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 92 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
The formulas below calculate either the resulting baud rate for a given reload value, or
the required reload value for a given baud rate:
33 MHz 33 MHz
Baud rateSSC0 = <SSCBR> = ( )-1
2 ⌠ (<SSCBR> + 1) 2 ⌠ Baud rateSSC0
<SSCBR> represents the content of the reload register, taken as an unsigned 16-bit
integer while Baud rate SSC is equal to fSCLK as shown in Figure 7-43.
The maximum baud rate that can be achieved when using a module clock of 33.33 MHz
is 16.6 MBaud in master mode (with <SSCBR> = 0000H) and 8.33 MBaud in slave mode
(with <SSCBR> = 0001H) lists some possible baud rates together with the required
reload values and the resulting bit times, assuming a module clock of 33.33 MHz.
7 - 93 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Bit in Register
SSCCON
SSC0TEN
&
Transmit
SSC0TE
Error
SSC0REN
&
Receive
SSC0RE
Error
<_ 1 Error Interrupt
SSCEIR
SSC0PEN
&
Phase
SSC0PE
Error
SSC0BEN
&
Baud Rate
SSC0BE
Error UES11163
7 - 94 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Note: If this error condition occurs and bit SSC0REN = ‘1’, an automatic reset of the
SSC0 will be performed in case of this error. This is done to re-initialize the SSC0,
if too few or too many clock pulses have been detected.
A Transmit Error (Slave mode) is detected, when a transfer is initiated by the master
(shift clock gets active), but the transmit buffer SSCTB of the slave was not updated
since the last transfer. This condition sets the error flag SSC0TE and, when enabled via
SSC0TEN, the error interrupt request line SSC0EIR. If a transfer starts while the transmit
buffer is not updated, the slave will shift out the ‘old’ contents of the shift register, which
is normally the data received during the last transfer. This may lead to the corruption of
the data on the transmit/receive line in half-duplex mode (open drain configuration), if
this slave is not selected for transmission. This mode requires that slaves not selected
for transmission only shift out ones, e.g. their transmit buffers must be loaded with
‘FFFFH’ prior to any transfer.
Note: A slave with push/pull output drivers, which is not selected for transmission, will
normally have its output drivers switched. However, in order to avoid possible
conflicts or misinterpretations, it is recommended to always load the slave's
transmit buffer prior to any transfer.
The cause of an error interrupt request (receive, phase, baud rate, transmit error) can be
identified by the error status flags in control register SSCCON.
Note: In contrary to the error interrupt request line SSCEIR, the error status flags
SSC0TE, SSC0RE, SSC0PE, and SSC0BE, which are located in register
SSCCON, are not reset automatically upon entry into the error interrupt service
routine, but must be cleared by software.
7 - 95 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SSC0 SSC0 - SSC0 SSC0 SSC0 SSC0 SSC0 SSC0 SSC0 SSC0 SSC0 SSC0BM
EN MS AREN BEN PEN REN TEN LB PO PH HB
rw rw rw rw rw rw rw rw rw rw rw rw
Bit Function
SSC0BM SSC0 Data Width Selection
0: Reserved. Do not use this combination.
1 … 15: Transfer Data Width is 2 … 16 bit (<SSC0BM>+1)
SSC0HB SSC0 Heading Control Bit
0: Transmit/Receive LSB First
1: Transmit/Receive MSB First
SSC0PH SSC0 Clock Phase Control Bit
0: Shift transmit data on the leading clock edge, latch on trailing edge
1: Latch receive data on leading clock edge, shift on trailing edge
SSC0PO SSC0 Clock Polarity Control Bit
0: Idle clock line is low, leading clock edge is low-to-high transition
1: Idle clock line is high, leading clock edge is high-to-low transition
SSC0LB SSC0 Loop Back Bit
0: Normal output
1: Receive input is connected with transmit output (half duplex mode)
SSC0TEN SSC0 Transmit Error Enable Bit
0: Ignore transmit errors
1: Check transmit errors
SSC0REN SSC0 Receive Error Enable Bit
0: Ignore receive errors
1: Check receive errors
7 - 96 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Bit Function
SSC0PEN SSC0 Phase Error Enable Bit
0: Ignore phase errors
1: Check phase errors
SSC0BEN SSC0 Baud Rate Error Enable Bit
0: Ignore baud rate errors
1: Check baud rate errors
SSC0AREN SSC0 Automatic Reset Enable Bit
0: No additional action upon a baud rate error
1: The SSC is automatically reset upon a baud rate error
SSC0MS SSC0 Master Select Bit
0: Slave Mode. Operate on shift clock received via SCLK.
1: Master Mode. Generate shift clock and output it via SCLK.
SSC0EN SSC0 Enable Bit = ‘0’
Transmission and reception disabled. Access to control bits.
7 - 97 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SSC0 SSC0 - SSC0 SSC0 SSC0 SSC0 SSC0 - - - - SSC0BC
EN MS BSY BE PE RE TE
rw rw r rw rw rw rw rw
Bit Function
SSC0BC SSC0 Bit Count Field
Shift counter is updated with every shifted bit. Do not write to!!!
SSC0TE SSC0 Transmit Error Flag
1: Transfer starts with the slave’s transmit buffer not being updated
SSC0RE SSC0 Receive Error Flag
1: Reception completed before the receive buffer was read
SSC0PE SSC0 Phase Error Flag
1: Received data changes around sampling clock edge
SSC0BE SSC0 Baud Rate Error Flag
1: More than factor 2 or 0.5 between Slave’s actual and
expected baud rate
SSC0BSY SSC0 Busy Flag
Set while a transfer is in progress. Do not write to!!!
SSC0MS SSC0 Master Select Bit
0: Slave Mode. Operate on shift clock received via SCLK.
1: Master Mode. Generate shift clock and output it via SCLK.
SSC0EN SSC0 Enable Bit = ‘1’
Transmission and reception enabled. Access to status flags and M/S
control.
Note: The target of an access to SSCCON (control bits or flags) is determined by the
state of SSC0EN prior to the access, i.e. writing C057H to SSC0CON in
programming mode (SSC0EN = ‘0’) will initialize the SSC (SSC0EN was ‘0’) and
then switch it on (SSC0EN = ‘1’).
When writing to SSCCON, make sure that zeros are input to reserved locations.
The SSC0 baud rate timer reload register SSCBR contains the 16-bit reload value for the
baud rate timer.
7 - 98 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SSC0RL(15 ..0)
rw
Bit Function
SSC0RL Baud Rate Timer/Reload Register Value
(15 … 0) Reading SSCBR returns the 16-bit content of the baud rate timer. Writing
SSC0BR loads the baud rate timer reload register.
The SSC0 transmitter buffer register SSCTB contains the transmit data value.
SSCTB Reset Value: 0000H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SSC0TD(15..0)
rw
Bit Function
SSC0TD Transmit Data Register Value
(15 … 0) SSCTB contains the data to be transmitted. Unselected bits of SSC0TB
are ignored during transmission.
The SSC0 receiver buffer register SSCRB contains the receive data value.
7 - 99 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SSC0RD(15..0)
Bit Function
SSC0RD Receive Data Register Value
(7 … 0) SSCRB contains the received data bits. Unselected bits of SSC0RB will
be not valid and should be ignored
7 - 100 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Features
• Extended buffer allows up to 4 send/receive data bytes to be stored.
• Support of standard 100 KBaud and extended 400 KBaud data rates.
• Operation in 7-bit or 10-bit addressing mode.
• Flexible control via interrupt service routines or by polling.
7 - 101 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Stop Transfer: A rising edge on SDA ( ) while SCL is high indicates a stop condition.
This stop condition terminates a data transfer. An arbitrary number of
bytes may be transferred between a start condition and a stop condition.
SDAx
Ι 2 C Module
Generic Clock Line
SCL0
SCLx
UES11164
7 - 102 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
This mechanism allows a number of configurations of the physical I2C Bus interface:
Physical Channels
Can be selected, so the I2C module can use electrically separated channels or increase
the addressing range by using more data lines.
Note: Baud rate and physical channels should never be changed (via ICCFG) during a
transfer.
Channel Switching
The I2C module can be connected to a specific pair of pins (e.g. SDA0 and SCL0) which
then forms a separate I2C channel to the external system. The channel can be
dynamically switched by connecting the module to another pair of pins (e.g. SDA1 and
SCL1). This establishes physically separate interface channels.
Broadcasting:
Connecting the module to more than one pair of pins (e.g. SDA0/1 and SCL0/1) allows
the transmission of messages over multiple physical channels at the same time. Please
note that this configuration is critical when the M2 is a slave. In master mode it cannot
be guaranteed that all selected slaves have reached the message.
Register ICCFG selects the bus baud rate as well the activation of SDA and SCL lines.
So an external I2C channel can be established (baud rate and physical lines) with one
single register access.
Note: Respective port pin definition
7 - 103 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
SDA
Ι 2 C-Channel 0
SCL
SDA
Ι 2 C-Channel 1
SCL
UES11165
7 - 104 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 105 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
line active at a time when operating in slave mode. The address by which the slave
module can be selected is written to register ICADR.
The I2C module is selected by another master when it receives (after a start condition),
either its own device address (stored in ICADR) or the general call address (00H). In this
case an interrupt is generated and bit SLA in register ICST is set, indicating the valid
selection. The desired transfer mode is then selected via bit TRX (TRX = ‘0’ for
reception, TRX = ‘1’ for transmission).
For a transmission the respective data byte is placed into the buffer ICRTB0 … 3
(which automatically sets bit TRX) and the acknowledge behavior is selected via bit
ACKDIS.
For a reception the respective data byte is fetched from the buffer ICRTB0 … 3 after
IRQD has been activated.
In both cases the data transfer itself is enabled by clearing bits IRQD, IRQP and IRQE
which releases the SCL line.
When a stop condition is detected, bit SLA is cleared.
The I2C bus configuration register ICCFG selects the bus baud rate (partly) as well as
the activation of SDA and SCL lines. So an external I2C channel can be established
(baud rate and physical lines) with one single register access.
Systems that utilize several I2C channels can prepare a set of control words which
configure the respective channels. By writing one of these control words to ICCFG the
respective channel is selected. Different channels may use different baud rates. Also
different operating modes can be selected, e.g. enabling all physical interfaces for a
broadcast transmission.
Note: Refer also to Chapter 7.5.2.
7 - 106 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7.5.4 Registers
All available module registers are summarized in the overview table below.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
7 - 107 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WM ACK BU
0 0 0 CI STP IGE TRX INT MOD RSC M10
EN DIS M
7 - 108 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 109 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 110 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
7 - 111 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 112 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 113 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
1)
While IRQD, IRQP or IRQE is set and the I2C module is in master mode or has been selected as a slave, the
I2C clock line is held low which prevents further transfers on the I2C bus.
The clock line of the I2C bus is released when IRQD, IRQE and IRQP are cleared. Only in this case can the
next I2C bus action take place.
Interrupt request bits may be set or cleared via software, e.g. to control the I2C bus.
7 - 114 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BRP ICA ICA ICA
MO PREDIV 0 0 0 9/ 8 ICA7..1 0/
D 0 IGE 0
7 - 115 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
implemented. It uses two different modes and an additional pre divider. Low baud rates
may be configured at high precision in mode 0 which is compatible with older versions.
High baud rates may be configured precisely in mode 1.
f
cpu cpu f
B IIC = ----------------------------------
- BRP = ------------------ –1
4 Ε BRP + 1 Φ 4 B IIC
7 - 116 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ICRTB3 ICRTB2
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ICRTB1 ICRTB0
1)
A read respectively a write access (depending on bit TRX) to all bytes (specified in CI) of ICRTB0 … 3 sets
CO to 111 (no byte sent/received).
2)
If bit INT is set to zero and all bytes (specified in CI) of ICRTB0 … 3 are read/written (depending on bit TRX)
IRQD is cleared.
7 - 117 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Interrupts
7 - 118 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Synchronization
In Mastermode, the SCL line is controlled by the I2C Module. Sent and received data is
only valid if SCL is high. With SCL going down, all modules are starting to count down
their low period. During the low period all connected modules are allowed to hold SCL
low. As the physical bus connection is wired-AND, SCL will remain low until the device
with the longest low period enters high state. Then the device with the shortest high
period will pull SCL low again.
Programming
It is strictly recommended not to write to the I2C registers when the I2C is working, except
for interrupt handling. This is indicated by the BUM bit (in master mode) and the interrupt
flags. All registers can be written in initial mode. In master mode the I2C is working as
long as the BUM bit is set, in slave mode the I2C is working from receiving a start
condition until receiving the next stop condition. Change of transmit direction is possible
only after a protocol interrupt (IRQP) or in initialization mode (MOD = 00B).
Initialization
Before data can be sent or received, data buffer size must be set in the count registers
(only necessary if buffer greater than one byte is available). To decide if slave/master or
multimaster mode is required, the MOD bits must be programmed.
Start Condition
To generate a start condition the I2C must be in master mode. If the BUM bit is set, a
start condition is sent and the transmission started. The slave returns the acknowledge
bit, which is indicated by the LRB bit.
Stop Condition
The BUM bit must be set to zero, or the STP bit must be set to one.
7 - 119 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
bit field CO must be read in case the buffer size (defined in CI) is greater than one byte,
to decide which bytes in the receive buffer were received in the last transmission cycle.
7 - 120 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
Ports & Direction Control Data Registers Control Registers Interrupt Control
Alternate Functions
Figure 7-47 SFRs and Port Pins Associated with the A/D Converter
7 - 121 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
of generating an interrupt signal (ADWIC) as soon as the CADC (ANA0) input voltage
falls below a predefined level. Two different levels are available. The first one
corresponds to (fullscale-4 LSB) the second one to (fullscale-16 LSB). The actual level
can be selected by a control bit (ADWULE).
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS AD-
- - - - - - - - - - ADC WUL - - - -
DIFF E
rw rw
Bit Function
FSADCDIFF Selects FSADC input range
Selects input range of the Full Service ADC:
FSADCDIFF = 0: single-ended input
FSDACDIFF = 1: differential input
ADWULE Defines threshold level for wake up
A special wake up unit has been implemented to allow a system wake-
up as soon as the analog input signal on pin ANA0 falls below a
predefined level. ADWULE defines this level.
ADWULE = 0: threshold level corresponds to fullscale-4LSB.
ADWULE = 1: threshold level corresponds to fullscale-16LSB.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ADRES1 ADRES0
rw rw
7 - 122 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ADRES3 ADRES2
rw rw
Bit Function
ADRESi A/D Conversion Result (8-bit) of Channel 0 … 3 (ANA 0 … 3)
(7 … 0) For each A/D channel two successive 7-bit samples (@33.3 MHZ) are
processed, averaged and scaled to 0 - 254.
7 - 123 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Peripherals
7 - 124 Micronas
Clock System
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Clock System
8 Clock System
8-3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Clock System
RTC
÷6
µC
fCPU µC-Periph.
33.33 MHz Ports
3 MHz Sync
ADC
÷2
Slicer
÷2 EBI
XTAL1 fEMI
OSC PLL 200 MHz (÷ 3) DG
XTAL2 6 MHz 100 MHz CLUTs
66.7 MHz
3 MHz
300 MHz Display-FIFO
fPIX
10 MHz
UES11167
8-4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Clock System
One, the 33 MHz system clock (fCPU) supplies the processor, all processor related
peripherals, the sync timing logic, the A/D converters and the slicer.
The second clock system (100/66 MHZ) (fEBI) is used to clock the external bus interface,
the display generator, the CLUTs and the input part of the display FIFO. This clock starts
at 66 MHz after hardware reset. It can be configured to 100 MHz during the initialization
sequence.
The frequency of the latter clock system can be changed via bit CLKCON in register
SYSCON2. The refresh rate of the external SDRAM is always kept constant,
independent of the selected system clock frequency.
The third clock system runs the pixel clock (fPIX), which is programmable in a range of
10 … 50 MHz. It serves the output part of the display FIFO and the D/A converters. The
pixel clock is derived from the high frequency output of the PLL and it is phase shifted
line by line to the positive edge of the horizontal sync signal (normal polarity). Because
the final display clock is derived from a DTO (digital time oscillator) it has no equidistant
clock periods although the average frequency is exact. This pixel clock generation
system has several advantages:
• The frequency of the pixel clock can be programmed independently from the
horizontal line period.
• Since the input of the PLL is already a signal with a high frequency, the resulting pixel
frequency has an extremely low jitter.
• The resulting pixel clock follows the edge of the H-sync impulse without any delay and
always has the same quality as the sync timing of the deflection controller.
8-5 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Clock System
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 - - - - - - CLK - - - - - - - -
CON
r rw
Bit Function
CLKCON Bus Clock Frequency
0: fEBI = 66 MHz
1: fEBI = 100 MHz
Note: Register SYSCON2 cannot be changed after execution of the EINIT instruction.
PFR Reset Value: 0148H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - PF(10..0)
rw
Bit Function
PF (10 … 0) Pixel Frequency Factor
This register defines the relation between the output pixel frequency and
the frequency of the crystal. The pixel frequency does not depend on the
line frequency. It can be calculated by the following formula:
fPIX = PF ⌠ 300 MHz / 8192
The pixel frequency can be adjusted in steps of 36.6 KHz.
After power-on, this register is set to 328D. So, the default pixel
frequency is set to 12.01 MHz.
Note: Register values exceeding 1366 generate pixel frequencies
which are outside of the specified boundaries.
8-6 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Clock System
8-8 Micronas
Sync System
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Sync System
9 Sync System
9-3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Sync System
9-4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Sync System
BVCR
EVCR
V-Sync
Vertical Blacklevel Clamping Delay
(SDV)
Screen Background Area
H-Sync Delay
Horizontal Blacklevel Clamping
(SDH)
Pixel Layer 1
VLR
Variable
Height
Pixel
Layer 2
Variable Width
t H_clmp_b
(BHCR)
t H_clmp_e
(EHCR)
t H_period (HPR)
H-Sync
UET11168
9-5 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Sync System
9-6 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Sync System
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - COR- VSU(3..0) BLAN COR HP VP INT VCS MAST
BL KP P
rw rw rw rw rw rw rw rw rw
Bit Function
MAST Master / Slave Mode
This bit defines the configuration of the sync system (master or slave
mode) and also the direction (input/output) of the V, H pins.
0: Slave mode. H, V pins are configured as inputs.
1: Master mode. H, V pins are configured as outputs.
Note: Switching from slave to master mode resets the internal H, V
counters, so that the phase shift during the switch can be
minimized. In slave mode registers VLR, and HPR are without any
use.
VCS Vertical Composite Sync
VCS defines the sync output at pin V (Master mode only).
0: At pin V the vertical sync appears.
1: At pin V a composite sync signal (including equalizing pulses, H-
Sync and V-Syncs) is generated (VCS). The length of the
equalizing pulses have fixed values as described in the timing
specifications.
Note: Don’t forget to set registers VLR and HPR according to your
requirements.
INT Interlace / Non-interlace
M2 can either generate an interlaced or a non-interlaced timing. (Master
mode only). Interlaced timing can only be created if VLR is an odd
number.
0: Interlaced timing is generated.
1: Non-interlaced timing is generated.
VP V-Pin Polarity
This bit defines the polarity of the V pin (master and slave mode).
0: Normal polarity (active high).
1: Negative polarity.
9-7 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Sync System
Bit Function
HP H-Pin Polarity
This bit defines the polarity of the H pin. (Master and slave mode).
0: Normal polarity (active high).
1: Negative polarity.
CORP COR-Pin Polarity
This bit defines the polarity of the COR pin. (Master and slave mode).
0: Normal polarity (active high).
1: Negative polarity (not allowed for CORBL = 1).
BLANKP BLANK-Pin Polarity
This bit defines the polarity of the BLANK pin. (Master and slave mode).
0: Negative polarity (not allowed for CORBL = 1).
1: Normal polarity (active high).
VSU (3 … 0) Vertical Set Up Time. (Slave mode only)
The vertical sync signal is internally sampled with the next edge of the
horizontal sync edge. The phase relation between V and H differs from
application to application. To guarantee (vertical) jitter free processing of
external sync signals, the vertical sync impulse can be delayed before it
is internally processed. The following formula shows how to delay the
external V-sync before it is internally latched and processed.
9-8 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Sync System
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - VL(9..0)
rw
Bit Function
VLR (9 … 0) Amount of Vertical Lines in a Frame. (Master mode only).
M2 generates vertical sync impulses in sync master mode. If, for
example, a normal PAL timing should be generated, set the register to
‘625d’ and set the interlace bit to ‘0’. The hardware will generate a
vertical impulse periodically after 312.5 lines. If a non-interlaced picture
with 312 lines should be generated, set this register to ‘312’ and set the
interlace bit to ‘1’. The hardware will generate a vertical impulse every
312 lines. Progressive timing can be generated by setting VLR to ‘625’
and interlace to ‘1’.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - HP(11..0)
rw
Bit Function
HPR Horizontal Period factor. (Master mode only)
(11 … 0) This register allows the period of the horizontal sync signal to be
adjusted. The horizontal period is independent of the pixel frequency and
can be adjusted with the following resolution:
tH-period = HP ⌠ 30 ns
9-9 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Sync System
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - SDV(9..0)
rw
Bit Function
SDV (9 … 0) Vertical Sync Delay. (Master and slave mode).
This register defines the delay (in lines) from the vertical sync to the first
line of pixel layer 1 on the screen.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - SDH
rw
Bit Function
SDH Horizontal Sync Delay. (Master and slave mode).
(11 … 0) This register defines the delay (in pixels) from the horizontal sync to the
first pixel of layer 1 on the screen.
9 - 10 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Sync System
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EHCR(7..0) EHCR(7..0)
rw rw
Bit Function
BHCR Beginning of Horizontal Clamp Phase. (Master and slave mode).
(7 … 0) This register defines the delay of the horizontal clamp phase from the
positive edge of the horizontal sync impulse (normal polarity is
assumed). The beginning of the clamp phase can be calculated by the
following formula:
If EHC is smaller than BHC the clamp phase will include the H-sync
phase.
The clamp phase area has higher priority than the screen background area or the pixel
layer area and can be shifted independent from any other register.
9 - 11 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Sync System
Video
H Period - Frame n
H Pulse UED11169
Figure 9-2 Priority of Clamp Phase, Screen Background and Pixel Layer Area
BVCR1 BVCR0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - BVCR(9..0)
rw
Bit Function
BVCR Beginning of Vertical Clamp Phase. (Master and slave mode).
(9 … 0) This register defines the beginning of the vertical clamp phase from the
positive edge of the vertical sync impulse (at normal polarity) in line
count.
9 - 12 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Sync System
EVCR1 EVCR0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - EVCR(9..0)
rw
Bit Function
EVCR End of Vertical Clamp Phase. (Master and slave mode).
(9 … 0) This register defines the end of the vertical clamp phase from the positive
edge of the vertical sync impulse (at normal polarity) in line count.
Note: It must be guaranteed that the value EVCR is always smaller than
the value of SDV.
9 - 13 Micronas
Display Generator
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
10 Display Generator
10 - 3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
10 - 4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
10 - 5 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
To adapt M2 to a wide range of displays in the market the sync-processing can be flexibly
configured.
Layer 2
Area
Variable Width
UED11170
10 - 6 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
t +2
t +1
t
UEA11171
Figure 10-2 Behavior of Blank Pin for Consecutive Frames in ‘Meshed’ Regions
10 - 7 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
Layer 2
Layer 1
Background Color
Video
UEA11172
10 - 8 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
10 - 9 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
*1)
n.a. = not available
*2)
X = don’t care
For transparency in ‘screen background area’ please refer to Chapter 10.3.3.
10 - 10 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
.
Layer 2
Layer 1
Background Color
Video
UEA11173
10 - 11 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
10 - 12 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
10 - 13 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
1)
Note: The 2-bit format is defined as a format for the frame buffer but not supported by
the GA.
10 - 14 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
bit_7 bit_6 bit_5 bit_4 bit_3 bit_2 bit_1 bit_0 bit_7 bit_6 bit_5 bit_4 bit_3 bit_2 bit_1 bit_0
Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel
Memory Addr. = n+2 24 25 26 27 28 29 30 31 16 17 18 19 20 21 22 23
bit_7 bit_6 bit_5 bit_4 bit_3 bit_2 bit_1 bit_0 bit_7 bit_6 bit_5 bit_4 bit_3 bit_2 bit_1 bit_0
Pixel Pixel Pixel/ Pixel/ Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel
Memory Addr. = n+2 12/Bit1 12/Bit0 13/Bit1 13/Bit0 14/Bit1 14/Bit0 15/Bit1 15/Bit0 8/Bit1 8/Bit0 9/Bit1 9/Bit0 10/Bit1 10/Bit0 11/Bit1 11/Bit0
bit_7 bit_6 bit_5 bit_4 bit_3 bit_2 bit_1 bit_0 bit_7 bit_6 bit_5 bit_4 bit_3 bit_2 bit_1 bit_0
Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel
Memory Addr. = n+2 6/Bit3 6/Bit2 6/Bit1 6/Bit0 7/Bit3 7/Bit2 7/Bit1 7/Bit0 4/Bit3 4/Bit2 4/Bit1 4/Bit0 5/Bit3 5/Bit2 5/Bit1 5/Bit0
10 - 15 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
bit_7 bit_6 bit_5 bit_4 bit_3 bit_2 bit_1 bit_0 bit_7 bit_6 bit_5 bit_4 bit_3 bit_2 bit_1 bit_0
Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel Pixel
Memory Addr. = n+2 3/Bit7 3/Bit6 3/Bit5 3/Bit4 3/Bit3 3/Bit2 3/Bit1 3/Bit0 2/Bit7 2/Bit6 2/Bit5 2/Bit4 2/Bit3 2/Bit2 2/Bit1 2/Bit0
DG
GA SRU
FIFO RGB
CLUT2
(256 x 14)
Memory
UED11178
10 - 16 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
The different formats of pixels stored in a frame buffer which are used by the SRU are
described in the following paragraphs:
1 0 1 0 1 0 1 0
Pixel0 Pixel1 Pixel2 Pixel3
7 6 5 4 3 2 1 0
UED11179
Pixel (7...0)
7 6 5 4 3 2 1 0
UED11180
10 - 17 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
M TR(1..0) Pixel(12..0)
1 Hz Flash 1 1
2 Hz Flash, Phase 1 1 0
16-Bit TTX
Format
0 C 2) (2..0) FlashC(4..0) 3) Pixel(4..0) 4)
2 Hz Flash, Phase 2 0 1
2 Hz Flash, Phase 3 0 0
Transparency Level 1 0 0
Transparency Level 2 0 1
16-Bit 4:4:4:2
Format
1 I1) Red(3..0) 5) Green(3..0) 5) Blue(3..0) 5)
Transparency Level 3 1 0
Transparency Level 4 1 1
1)
I - Italic Subpixel
2)
C - CLUT2 Selector in TTX mode
3)
FlashC - CLUT2 Vector for Flash Colour in TTX mode
4)
Pixel - CLUT2 Vector for Pixel in TTX mode
5)
Red Green Blue - Pixel RGB Colour in 4:4:4:2 mode UED11181
Figure 10-12 16-bit Pixel Format (4:4:4:2/TTX) for Use in Frame Buffer
Pixels in 16-bit format which are stored in TTX format contain two 5-bit colour look up
vectors and two flash mode indicator bits. The flash mode indicator bits are used to
choose the flash rate and the flash phase. The meaning of flash is: The colour alternates
between two 5-bit colour vectors (FlashC and Pixel) which are chosen within the format
definition.
• Non Flash: Flash can be disabled if both 5-bit colour vectors point to the same CLUT2
location.
• Inverted Flash: Inverted flash is supported by exchanging the ‘FlashC’ vector with the
‘Pixel’ vector.
10 - 18 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
4 3 2 1 0 5 4 3 2 1 0 4 3 2 1 0
Red Green Green Blue
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
UED11183
Figure 10-14 16-bit Pixel Format (5:6:5) for Use in Frame Buffer
Transparency between layers is not supported if this mode is in use. The 5:6:5 format is
directly transferred to the D/A converter. CLUT2 is out of use in this mode.
10 - 19 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
DG
GA SRU
Pixel CLUT1
Modification (256 x 16)
Memory UED11184
10 - 20 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
10 - 21 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
10 - 22 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
Note: There is no transfer mode defined which uses the 2-bit format as an output format,
because in this case layer 2 is restricted to a width of 64 pixels. If the 2-bit format
is required, the direct byte by byte transfer can be used.
Source Area
There are different settings necessary to define the source area. These settings are
done by using the graphic accelerator instruction set. The table below describes the
necessary settings and corresponding GAIs with the affected bit position inside the GAI:
10 - 23 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
As described before, there are seven different formats on the input side of the transfer:
• 1-bit bitmap
• 2-bit bitmap
• 4-bit bitmap
• 8-bit bitmap
• 8-bit data (used for direct data transfer)
• CLUT1 input (used for drawing of filled parallelograms, rectangles, lines)
• 16-bit (4:4:4:2) RGB
CLUT1 input does not need any more detailed area description. The input value comes
directly from the address ‘0’ of CLUT1 and not from the RAM. This mode can be used
for drawing lines, filling rectangles or parallelograms. For the other input modes a more
detailed description is given below:
From the point of view of the register settings, which are used to define the source area,
the different input formats can be divided in three groups which are handled in different
ways.
Group 1: Group 2: Group3:
1-bit bitmap8-bit data16-bit pixel format (4:4:4:2)
2-bit bitmap8-bit bitmap
4-bit bitmap
Formats of group 1 are formats which define each pixel with less than a byte. Group 2
formats are formats which define each pixel by 8 bits, and group 3 formats are formats
which define each pixel by 16 bits.
Group 1:
In 1-bit bitmap, 2-bit bitmap and 4-bit bitmap input mode it is expected, that the bitmaps
are stored linearly in the memory as described in Chapter 10.4.1. Therefore the settings
of WIDTH_IN as well as S_OFFSET are ignored. Only the 24-bit source address pointer
S_ADDR is used. The amount of pixels which are read from the source and written to
the destination is only defined by the destination settings. The user has to take care that
the destination settings fit with the bitmap inherent alignments.
Group 2:
In this mode WIDTH_IN and S_OFFSET are also taken into account. The amount of
memory which is described by WIDTH_IN and S_OFFSET is described by numbers of
bytes.
Group 3:
In this mode WIDTH_IN and S_OFFSET are also taken into account. The amount of
memory which is described by WIDTH_IN and S_OFFSET is described by numbers of
words.
Note: The number of bytes to be read from the source area is defined by the destination
area (see below) and the transfer mode. This is why no explicit definition of height
is needed for the source.
10 - 24 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
MEMORY
S_ADDR
WIDTH_IN (TSR) S_OFFSET (TOR)
Source Area
UED11185
Destination Area
There are additional settings necessary to define the destination area. The table below
describes the settings and the corresponding GAIs with the affected bit position inside
the GAI:
Next to the destination area itself a clipping area can be defined. The clipping area needs
to be defined within the destination area. During a memory transfer these ‘clipped’
memory areas are excluded from the transfer. The table below describes the settings
and the corresponding GAIs with the affected bit positions inside the GAI:
10 - 25 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
As described before, there are five different formats on the output side of the transfer:
(Also please refer to Chapter 10.4.2)
• 8-bit format CLUT2 vector
• 16-bit format (4:4:4:2) RGB
• 16-bit format (TTX) CLUT2 vector
• 16-bit format (5:6:5) RGB
• Direct data transfer (byte by byte)
From the point of view of the register settings which are used to define the alignment of
the destination area, these formats can be divided in two groups. Each group is handled
in a different way.
Group 1: Group 2:
16-bit format (4:4:4:2) RGB 8-bit format CLUT2 vector
16-bit format (TTX) CLUT2 vector 8-bit data (byte by byte transfer)
16-bit format (5:6:5) RGB
Formats of group 1 are formats which define each pixel by 16 bits. Group 2 formats are
formats which define each pixel by 8 bits.
Note: Bit fields HEIGHT_CLIP, HEIGHT_OUT and WIDTH_CLIP, WIDTH_OUT
describe the height and width of the destination in count of pixels and not in bytes.
So for output formats of group 1 the memory area which is described by a
HEIGHT_OUT value and a WIDTH_OUT value needs the double amount of
memory, than output formats which are described by the same HEIGHT_OUT
value and WIDTH_OUT value for output formats of group 2. Also, the OFFSET
values are pixels and not bytes or words.
C_ADDR and D_ADDR are real byte addresses in memory.
Note: For a rectangle destination area the sum of WIDTH and D_OFFSET of the
destination area must be equal to the width of the frame buffer (WIDTH_L1(2)).
Otherwise the shape of the copied frame will be a parallelogram and not a
rectangle.
Note: For a rectangle clipping area inside the destination area the sum of the clipping
offset and the clipping width must be the same as the sum of the destination area
width and the destination offset. Otherwise the clipping area will be a
parallelogram and not a rectangle.
Note: Source area and destination area should not overlap. Otherwise it may appear
that a pixel is overwritten as a destination pixel, and afterwards used as a source
pixel.
10 - 26 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
If double height (TDH) is set to ‘1’ in the destination output side each pixel in vertical
direction is repeated twice.
For example: If double width is set to ‘1’ and quadruple height is set to ‘1’ each pixel of
the source area needs 8 pixels of the destination area.
Note: Parameters like WIDTH_OUT, WIDTH_CLIP, HEIGHT_OUT and HEIGHT_CLIP
are still pixel related. WIDTH_OUT, HEIGHT_OUT and D_OFFSET have to be
adapted by the software to get a complete character. Clipping is not affected by
TDH and TDW.
The following table is an example of a 1-bit bitmap (30 ⌠ 50) which should be transferred
either in normal size or in double size to an 8 bit output format in a frame buffer with a
size of 100 ⌠ 200 pixels.
Note: In case of double width transfer WIDTH_OUT has to be an even number. In case
of double/quad height transfer HEIGHT_OUT has to be an even/divisable by 4
number.
10 - 27 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
Figure 10-17 gives a graphical overview of how to specify the different areas.
Frame Buffer
FB_ADDR
WIDTH_L1(2) (FSR)
D_ADDR
WIDTH_OUT (TDR) D_OFFSET (TOR)
C_ADDR
Destination Area
WIDTH_CLIP (CBR)
UED11186
Figure 10-17 Use of Register Settings to Specify Destination and Clipping Area
0
0
0
0
0
HEIGHT_OUT 0
0
0
0
0
UED11187
Figure 10-18 Result for a Non-italic Transferred Memory Area in Frame Buffer
10 - 28 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
If this transfer is executed with the same register settings but in italic mode instead of
non italic mode, the subsequent destination area is used inside the frame buffer:
1
0
1
0
1
HEIGHT_OUT 0
1
0
1
0
UED11188
Figure 10-19 Result for a Italic Transferred Memory Area in Frame Buffer
Next to the destination pixel offset from line to line, the italic bit (‘I’) alternates from line
to line. This italic bit is used to control the D/A converter to realize a horizontal line
alternating half pixel shift on RGB output.
UED11189
Figure 10-20 Result for an Italic Transferred Memory Area at D/A Converter Output
Note: Italic can not be used together with double width and double/quad height transfers.
10 - 29 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
rw rw
Bit Function
GCR Defines the amount of GAIs in the instruction list.
(8 … 0) GCR ⌠ 4 is the length of the GAI area in count of bytes.
Note: After the last instruction is executed an interrupt is given to the
controller
GPR Define the MSBs of the 23-bit address pointer to the start of the GAI
(23 … 17) area.
rw
Bit Function
GPR Define the LSBs of the 23-bit address pointer to the start of the GAI
(16 … 1) area.
DGCON is for general control of the DG.
10 - 30 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
Bit Function
EADG Enables access from DG to SDRAM.
0: All requests from DG (SRU and GA) to the memory are disabled.
1: The DG has normal access to the memory.
Note: The running memory access is finalized before this bit becomes
active.
EODG Enables output of DG.
0: All outputs of the DG are disabled (RGB outputs are switched to
black level, COR = 0 and BLANK = 1) (‘Normal’ pin polarity
assumed. Please refer also to register SCR).
1: The outputs have the function according to the specifications
described in the following paragraphs.
Note: The SRU registers FBR and DBR have to be programmed with a
valid memory address before enabling display output.
STGA Starts processing of the instruction list by the GA
0: STGA has to be reset by SW before the GA can be started again.
1: The GA starts the execution of the instruction list at address GPR.
It ends after the specified number of instructions (see bit field
GCR) is executed. After that an interrupt (GAFIR) is given to the
controller.
GABSY 0: GA is idle, waiting for GAI sequence.
1: GA is busy, GAI sequence is processed.
10 - 31 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
The register PXDEL controls an individual delay of 0 … 2 clock cycles of the SRU
outputs. Each output (R, G, B, Italic, blank, cor) is contolled by 2 bits in the PXDEL
register.
PXDEL Reset Value: 0000H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
res res res res Tcor Tblank Titalic Tblu Tgreen Tred
Bits
1…0 delay for red
3…2 delay for green
5…4 delay for blue
7…6 delay for italic
9…8 delay for blank
11 … 10 delay for cor
15 … 12 reserved
10 - 32 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
GAI-No. k
Byte Address n+2+k x 4
GAI-No. ...
Byte Address n
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
GAI_BYTE 1 GAI_BYTE 0
GAI_BYTE 3 GAI_BYTE 2
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
UED11190
10 - 33 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
In the following GAI description, ‘–’ means that these bits are reserved for future use and
have to be set to ‘0’. The meaning of an instruction is not given by the physical location
(address) of the instruction but by its opcode which is represented by bits 31 … 28. Bits
27 … 0 are equivalent to an operand.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Opcode Operand(s)
Operand(s)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Global Parameters
The following global instructions are only executed by the GA during the vertical sync
area. If such a GA-instruction is read by the GA outside the V-sync area, it waits until the
next V-sync appears.
Note: The V-sync area is defined for that purpose as the first 4 lines of a field.
• SRU setup
SAR (opcode = 1111) - set screen attributes
• CLUT Setup
CLR (opcode = 1101) - set contents of the CLUT1 or CLUT2
Note: If CLUT2 should be loaded the GA waits until the next V-sync appears.
• No operation
NOP (opcode = 1110) - no operation
10 - 34 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
Transfer Parameters
These instructions are immediately executed by the GA.
• CUR (opcode = 0000) - set clipping coordinates
• CBR (opcode = 0001) - set clipping coordinates
• SDR (opcode = 0010) - set source descriptor for data transfer
• DDR (opcode = 0011) - set destination descriptor for data transfer
• TSR (opcode = 0100) - set definitions for source memory area
• TDR (opcode = 0101) - set definitions for destination memory area
• TOR (opcode = 0110) - set offset definitions for transferred area
• TAR (opcode = 0111) - set attributes for transfer
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
SBTL Screen Background Transparency under Layer Area
Defines whether the screen background area is transparent under a
layer 1 (2) area or not.
0: The screen background within a layer area is not transparent.
Under transparent layer pixels the background colour can be seen.
1: The screen background within a layer area is transparent. Under
transparent layer pixels the video can be seen.
Note: Transparency definitions for the screen background outside a
layer area are made with bits STR. Also please refer to
Chapter 10.3.3.
DMODE Display Mode Bits
(3 … 0) Defines the possible combinations of both layers with the available pixel
formats. Please see table ‘Display Modes’ below.
10 - 35 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
Bit Function
DDW Double Width Display
0: Normal width
1: Double width. The contents of the screen are stretched in
horizontal direction. The SRU repeats the same pixel information
twice in horizontal direction.
Note: DDW = ‘1’ the frame buffer width (WIDTH_L1(L2) has to be
divided by two to get the same area displayed on the screen.
DDH Double Height Display
0: Normal height
1: Double height. The contents of the screen are stretched in vertical
direction. The SRU repeats the same pixel information twice in
vertical direction.
Note: DDH = ‘1’ the frame buffer height (HEIGHT_L1(L2) has to be
divided by two to get the same area displayed on the screen.
STR Screen Background Transparency Level
(1 … 0) Define the transparency of the screen background area outside the layer
area. Please refer to Chapter 10.3.3.
RED Screen Background Red Colour
(3 … 0) 4-bit red component
GREEN Screen Background Green Colour
(3 … 0) 4-bit green component
BLUE Screen Background Blue Colour
(3 … 0) 4-bit blue component
10 - 36 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
10 - 37 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
1 0 0 0 - - - - FB_ADDR(23..16)
FB_ADDR(15..0)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
FB_ADDR Startaddress of frame buffer 1
(23 … 0) Bit 23 … 0 of a byte address.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
1 0 0 1 - - HEIGHT_L1(9..0)
- - - - - WIDTH_L1(10..0)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
HEIGHT_L1 Height of Frame Buffer 1
(9 … 0) The height of the frame buffer can vary between 0 (HEIGHT_L1 = ‘0’d)
and 1023 pixels (HEIGHT_L1 = ‘1023’d).
WIDTH_L1 Width of Frame Buffer 1
(10 … 0) The width of the frame buffer can vary between 0 (WIDTH_L1 = ‘0’d) and
2046 pixels (WIDTH_L1 = ‘2046’d).
10 - 38 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
1 0 1 0 - - - - DB_ADDR(23..16)
DB_ADDR(15..0)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
DB_ADDR Startaddress of Frame Buffer 2
(23 … 0) Bit 23 … 0 of a byte address.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
1 0 1 1 - - HEIGHT_L2
- - - - - WIDTH_L2
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
HEIGHT_L2 Height of Layer 2
(9 … 0) The height of layer 2 can vary between 0 (HEIGHT_L2 = ‘0’d) and 1023
pixels (HEIGHT_L2 = ‘1023’d).
WIDTH_L2 Width of Layer 2
(10 … 0) The width of the layer 2 can vary between 0 (WIDTH_L2 = ‘0’d) and
2046 pixels (WIDTH_L2 = ‘2046’d).
Note: Width_L2 is ignored, if layer 2 is displayed in 2-bit CLUT2 vector
format. In this case width_L2 is set to 64.
10 - 39 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
1 1 0 0 - ULY(10..0)
- - - - ULX(11..0)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
ULY Upper left corner Y-coordinate
(10 … 0) in one’s complement representation:
‘11111111111’ = ‘– 1023 D’
…
‘10000000000’ = ‘– 0 D’
‘00000000000’ = ‘+ 0D’
…
‘01111111111’ = ‘+ 1023D’
ULX Upper left corner X-coordinate
(11 … 0) in one’s complement representation:
‘111111111111’ = ‘– 2046D’
…
‘100000000000’ = ‘– 0D’
‘000000000000’ = ‘+ 0 D’
…
‘011111111111’ = ‘+ 2046D’
10 - 40 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
1 1 0 1 - - - CLUT_ADDR(8..0)
CLUT_CONTENT(15..0)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
CLUT_ CLUT address
ADDR Bits 7 … 0 are CLUT vectors of either CLUT1 or CLUT2. Bit 8 selects the
(8 … 0) CLUT:
0: CLUT1 (256 ⌠ 16 bit)
1: CLUT2 (256 ⌠ 14 bit)
CLUT_ Contents to be written
CONTENT to one of the look up tables addressed by the CLUT vector defined
(15 … 0) above. For CLUT1 all the 16 bits are used, for CLUT2 only bits 13 … 0
are used.
10 - 41 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
CUR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 0 0 0 C_OFFSET(3..0) CLIPPING_ADDR(23..16)
CLIPPING_ADDR(15..0)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
C_OFFSET Clipping Offset (Bit3 … 0)
(3 … 0) The MSBs of C_OFFSET are defined by instruction CBR
CLIPPING Beginning of the clipping area
_ADDR Bit 23 … 0 of a byte address.
(23 … 0)
CBR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C_OFFSET
0 0 0 1 HEIGHT_CLIP(9..0)
(10..9)
C_OFFSET(8..4) WIDTH_CLIP(10..0)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
HEIGHT_ Height of the clipping area
CLIP The height of the clipping area can vary between 0 (HEIGHT_CLIP = ‘0d’)
(9 … 0) and 1023 pixels (HEIGHT_CLIP = ‘1023d’).
C_OFFSET Clipping Offset (Bit 10 … 4)
(10 … 4) The LSBs of C_OFFSET are defined by instruction CUR.
WIDTH_ Width of the clipping area
CLIP The width of the clipping area can vary between 0 (WIDTH_CLIP = ‘0 d’)
(10 … 0) and 2046 pixels (WIDTH_CLIP = ‘2046d’).
10 - 42 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 0 1 0 GO - - - S_ADDR(23..16)
S_ADDR(15..0)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
GO Must be set to ‘1’ if GA is to start memory transfer after executing this
GA-instruction. Otherwise this bit must be set to ‘0’.
S_ADDR Start address of memory area to be transferred.
(23 … 0) Bit 23 … 0 of a byte address.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 0 1 1 GO - - - D_ADDR(23..16)
D_ADDR(15..0)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
GO Must be set to ‘1’ if GA is to start memory transfer after executing this
GA-instruction. Otherwise this bit must be set to ‘0’.
D_ADDR Beginning of the destination memory area
(23 … 0) Bit 23 … 0 of a byte address.
10 - 43 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 1 0 0 GO - - - - - - - - - - -
- - - - - WIDTH_IN(10..0)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
GO Must be set to ‘1’ if GA is to start memory transfer after executing this
GA-instruction. Otherwise this bit must be set to ‘0’.
WIDTH_IN Width of the transferred area in count of pixels.
(10 … 0) WIDTH_IN = ‘0’: No transfer will be executed.
10 - 44 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 1 0 1 GO - HEIGHT_OUT(9..0)
- - - - - WIDTH_OUT(10..0)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
GO Must be set to ‘1’ if GA is to start memory transfer after executing this
GA-instruction. Otherwise this bit must be set to ‘0’.
HEIGHT_ Height of the transferred area in count of pixels
OUT HEIGHT_OUT = ‘0’: No transfer will be executed.
(9 … 0)
WIDTH_ Width of the transferred area in count of pixels
OUT WIDTH_OUT = ‘0’: No transfer will be executed.
(10 … 0)
10 - 45 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 1 1 0 GO D_OFFSET(10..0)
- - - - - S_OFFSET(10..0)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit Function
GO Must be set to ‘1’ if GA is to start memory transfer after executing this
GA-instruction. Otherwise this bit must be set to ‘0’.
S_OFFSET Source offset value for non linear transfer
(10 … 0) For more information about S_OFFSET refer to Chapter 10.5.2.
D_OFFSET Destination offset value for non linear transfer
(10 … 0) For more information about D_OFFSET refer to Chapter 10.5.2.
10 - 46 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 1 1 1 GO - - - - - - - - - - -
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Table 10-7
Bit Function
GO Must be set to ‘1’ if GA is to start memory transfer after executing this
GA-instruction. Otherwise this bit must be set to ‘0’.
TQH Quadruple Height during Transfer
‘0’: Normal height is selected.
‘1’ The memory transfer is stretched in vertical direction on the output
side.
UN Underline on/off
0: Underline is switched off.
1: The last line (independent from ‘TDH’) in the destination area is
filled with a constant CLUT1 input (vector 0 of CLUT1) instead of
the source bitmap input.
CL Clipping on/off
(1 … 0) 00: Clipping is switched off.
01: Reserved.
10: Clipping is switched on. Pixels within the clipping area will be
affected.
11: Clipping is switched on. Pixels outside the clipping area will be
affected.
TRM Transparency Mode for Transfer
‘0’: The complete area defined by instruction SDR and TDR is written
to the destination.
‘1’: Only these (4:4:4:2) pixels are written to the destination area, for
which Bit TR1 = ‘0’.
Note: This bit is only relevant for 16-bit (4:4:4:2) RGB output formats
Please also refer to Chapter 10.5.1.
10 - 47 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
10 - 48 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Display Generator
10 - 50 Micronas
D/A Converter
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
D/A Converter
11 D/A Converter
M2 uses a 3 ⌠ 6-bit voltage D/A converter to generate analog RGB output signals with a
nominal amplitude of 0.7 V (also available: 0.5 V, 1.0 V and 1.2 V) peak to peak. Two
different modes are available in order to allow the reduction of power consumption for
applications which require a lower RGB bandwidth.
11 - 3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
D/A Converter
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - - - - - - - - BWC RGBGAIN
(1..0)
rw rw
Bit Function
RGBGAIN Gain Adjustment of RGB Converter.
(1 … 0) The user can change the output gain of the DAC.
00: 0.5 V
01: 0.7 V
10: 1.0 V
11: 1.2 V
BWC Bandwidth Control
0: The effective bandwidth of the DAC is set to 50 MHz
1: The effective bandwidth of the DAC is set to 32 MHz. This reduces
the current consumption of analog supply.
11 - 4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
D/A Converter
11 - 6 Micronas
Slicer and Acquisition
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
12 - 3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
12 - 4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
12 - 5 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
Slicer 2 Sync 2
(WSS only Slicer)
H/V HS2_IR
Sync
Sep. H-PLL VS2_IR
CVBS2 Data +
D-PLL
Separation Timing
Slicer 1 Sync 1
(Full Service Slicer) HS1_IR
H/V VS1_IR
Sync
Sep. H-PLL
+ L23_IR
Timing
CC_IR
Data
Separation
Acquisition Interface
FC-Check To/from
Noise & Address Memory
CVBS1 Attenua. S/P Generation
D-PLL Converter
Group-D.
Compen.
Noise Parameter
Attenua. Buffer
Group-D.
Measur.
UEB11191
12 - 6 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
Noise
The noise measurement unit incorporates two different algorithms. Both algorithm are
using the value between two equalizing pulses which corresponds to the black level. As
the black level is known to the system a window is placed between two equalizing pulses
of line four. The first algorithm compares successive samples inside a window placed in
line 4. The difference between this samples is measured and a flag is set as soon as this
difference over several TV lines is greater than a specified value. This algorithm is able
to detect higher frequency noise (e.g. with noise). The second algorithm measures the
difference between the black value and the actual sampled value inside this window. As
soon as this difference over several TV lines is greater than a specified value a second
flag is set. This algorithm is sensitive against low frequency noise as it is known from co-
channel distortion. Both flags can be used to optimize the correcting circuit characteristic
in order to achieve best reception performance.
Frequency Attenuation
During signal transmission the CVBS can be attenuated severely. This attenuation
normally is frequency depending. That means that the higher the frequency the stronger
the attenuation. As the clock-run-in (from now on CRI) for teletext represents the highest
possible frequency (3.5 MHz) it can be used to measure the attenuation. As only strong
negative attenuation causes problems during data slicing a flag is needed to notify highly
negative attenuation. If this flag is set a special peaking filter is switched on in the data-
path.
Group Delay
Quite often the data stream is corrupted because of group delay distortion introduced by
the transmission channel. The teletext framing code (E4H) is used as a reference for
measurement. The delay of the edges inside this code can be used to measure the group
delay distortion. The measurement is done every teletext line and filtered over several
lines. It can be detected whether the signal has positive, negative or no group delay
distortions. Two flags are set accordingly. By means of these two flags an allpass
contained in the correcting circuit is configured to compensate the positive or negative
group delays. All of the above filters ca be individually disabled, forced or set to an
automatic mode via control registers.
Note: Slicer 2 does not have any compensation circuits.
12 - 7 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
12 - 8 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
12.3 H/V-Synchronization
Slicer and acquisition interface need many signals synchronized to the incoming CVBS
(e.g. line number, field or line start). Therefore a sync slicing level is calculated and the
sync signal is sliced from the filtered digital CVBS signal. Using digital integration vertical
and horizontal sync pulses are separated. The horizontal pulses are fed into a digital H-
PLL which has flywheel functionality. The H-PLL includes a counter which is used to
generate all the necessary horizontal control signals. The vertical sync is used to
synchronize the line counter from which the vertical control signals are derived.
The synchronization block includes a watchdog which keeps control of the actual lock
condition of the H-PLL.The watchdog can produce an interrupt (CC_IR) if
synchronization has been lost. It could therefore be an indication for a channel change
or missing input signal.
Note: This H/V synchronization for the slicer 2 uses the same algorithms as described
above.
12 - 9 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
12.4.1 FC-Check
There are four FC’s which are compared to the incoming signal. The first one is 8-bit wide
and is loaded down with the field parameters. The second one is 16-bit wide and fixed
to the FC of VPS. The third one is also 16-bit wide, but can be loaded with the field
parameters. If the third one is used, the user can specify not only the FC but also a don’t-
care mask. The fourth FC is reserved for WSS. The actual FC can be changed line by
line.
FC1
This FC should be used for all services with 8-bit framing codes (e.g. for TTX). The actual
framing code is loaded down each field. The check can be done without any error
tolerance or with a one bit error tolerance.
Note: If FC1 = E4H this pattern is used as a reference for group delay measurement.
FCVPS
This FC is fixed to that of VPS. Only an error free signal will enable the reception of the
VPS data line.
Note: If VPS should be sliced in field 1 and TTX in field 2 the appropriate line parameters
for line 16 have to be dynamically changed from field to field.
FC3
This 16-bit framing code is loaded with the field parameters as well as a don’t care mask.
The incoming signal is compared to both, framing code and don’t care mask. Further
reception is enabled if all bits, which are not don’t care, match the incoming data stream.
12 - 10 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
FCWSS
This FC is fixed to that of WSS. A special algorithm makes sure that the WSS-FC is
detected even if the CVBS signal is coming from a video tape.
No FC-check
If FC-check is disabled, the data recording is triggered by the data start recognition. In
this case the software needs to do the byte synchronization.
FC-Check Select
There is a two bit line parameter called FCSEL. With this parameter the user will be able
to select which FC-Check is used for the actual line. If NORM is set to WSS the WSS
FCcheck is used independently of FCSEL.
12.4.2 Interrupts
Some events which occur inside the slicer, the sync separation or the acquisition
interface can be used to trigger an interrupt. They are summarized in register ACQISN.
The hardware sets the associated interrupt flag which must be manually reset by SW
before the next interrupt can be accepted. All ACQ interrupts are bundled into one
interrupt which is fed to the ACQ-interrupt node (ACQIC) of the controller.
12 - 11 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
register STRVBI) of the VBI buffer should only be changed if the acquisition is switched
off.
15 Byte 1 8 7 Byte 0 0
STRVBI ACQFP0 Field Parameters
Send to slicer ACQFP1 Field Parameters
after V-Sync ACQFP2 Field Parameters
Empty Empty
ACQFP3 Sliced WSS Data (Slicer 2)
ACQFP4 Sliced WSS Data (Slicer 2)
ACQFP5 Sliced WSS Data (Slicer 2)
Write to memory ACQFP6 Sliced WSS Data (Slicer 2)
after V-Sync ACQFP7 Sliced WSS Data (Slicer 2)
ACQFP8 Sliced WSS Data (Slicer 2)
ACQFP9 Field Status Information from both Slicers
VBI ACQFP10 Field Status Information from both Slicers
Start Line 6 ACQLP0 Line Parameters for Slicer 1
Send to slicer ACQLP1 Line Parameters for Slicer 1
after V-Sync ACQLP2 Line Parameters for Slicer 1
ACQLP3 Line Parameters for Slicer 1
Send to memory ACQLP4 Line Status 1 (of Line 6)
after detecting a FC Data byte 1 Data byte 0
(if no FC has been 32
detected after Data byte 3 Data byte 2 16 Bit
FCwin went inactive) Data byte 5 Data byte 4 Words
12 - 12 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ACQ 0 VBIADR(23..10)
ON
Bit Function
ACQON Enable Acquisition
0: The ACQ interface does not access memory (immediately
inactive)
1: The ACQ interface is active and writes data to memory (switching
on is synchronous to V)
VBIADR Define the 14 MSB’s of the start address of the VBI buffer.
(23 … 10) The VBI buffer location can be aligned with any 1 KByte memory
segment.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 CC_IE CC_IR L23_ L23_ HS2_ HS2_ VS2_ VS2_ HS1_ HS1_ VS1_ VS1_
IE IR IE IR IE IR IE IR IE IR
rw rw rw rw rw rw rw rw rw rw rw rw
12 - 13 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
Bit Function
VS1_IR VS interrupt. The vertical sync impulse can be used to have field
synchronization for the software. (VS of slicer 1 is used).
0: No request pending.
1: This source has raised an interrupt request.
VS1_IE Interrupt Enable Bit
0: Disables the interrupt.
1: Enables the interrupt.
HS1_IR HS interrupt. The horizontal sync impulse can be used to implement a
software line counter. (HS of slicer 1 is used).
0: No request pending.
1: This source has raised an interrupt request.
HS1_IE Interrupt Enable Bit
0: Disables the interrupt.
1: Enables the interrupt.
VS2_IR VS interrupt. The vertical sync impulse can be used to have field
synchronization for the software. (VS of slicer 2 is used).
0: No request pending.
1: This source has raised an interrupt request.
VS2_IE Interrupt Enable Bit
0: Disables the interrupt.
1: Enables the interrupt.
HS2_IR HS interrupt. The horizontal sync impulse can be used to implement a
software line counter. (HS of slicer 2 is used).
0: No request pending.
1: This source has raised an interrupt request.
HS2_IE Interrupt Enable Bit
0: Disables the interrupt.
1: Enables the interrupt.
L23_IR Line 23 Interrupt.Tells the controller that line 23 of the VBI is sliced
(Slicer 1 is used).
0: No request pending.
1: This source has raised an interrupt request.
L23_IE Interrupt Enable Bit
0: Disables the interrupt.
1: Enables the interrupt.
12 - 14 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
Bit Function
CC_IR Channel Change Indicator
The H-PLL has lost the synchronization. (Slicer 1 is used).
0: No request pending.
1: This source has raised an interrupt request.
Note: Also refer to status bits STAB1 or VDOK1
CC_IE Interrupt Enable Bit
0: Disables the interrupt.
1: Enables the interrupt.
Note: The interrupt request flags of the ACQ interrupt subnode have to be cleared by
software within the interrupt service routine.
Field Parameters
All field parameters are updated once in a field. This means that the status information
written from the acquisition interface to the memory at that time only represents a
snapshot of the status. Hardware ensures that field parameters are updated even if only
one of the two CVBS signals has a valid sync timing. So it is assured that even if CVBS1
is not available data of CVBS2 still can be sliced.
ACQFP0 Reset Value: XXXXH
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FC3(15..0)
Bit Function
FC3 Framing code 3
(15 … 0) Bit 15: First received bit of FC.
Bit 0: Last received bit of FC.
12 - 15 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FC3MASK(15..0)
Bit Function
FC3MASK Mask for Framing code 3
(15 … 0) Bit 15:Mask for first received bit of FC.
Bit 0: Mask for last received bit of FC.
12 - 16 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FC1(7..0) AGD AFR ANO 0 0 0 0 FULL
ON ON OM
Bit Function
FC1 Framing code 1
(7 … 0) Bit 7: First received bit of FC
Bit 0: Last received bit of FC
AGDON Automatic group delay compensation
0: Automatic compensation Off
1: Automatic compensation On
(Automatic: Measurement Depending Compensation)
AFRON Automatic frequency depending attenuation compensation
0: Automatic compensation Off
1: Automatic compensation On
(Automatic: measurement depending compensation)
ANOON Automatic noise compensation
0: Automatic compensation Off
1: Automatic compensation On
(Automatic: measurement depending compensation)
FULL 0: Full channel mode off
1: Full channel mode on
Note: Don’t forget to reserve enough memory for the VBI buffer and to
initialized the appropriate line parameters.
12 - 17 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WSS2 WSS2 0 0 0 0 0 0 0 0 0 0 WSS2_DATA(83..80)
OK _ACK
Bit Function
WSS2OK 0: No new WSS data from slicer 2 is available
1: New WSS data from slicer 2 is available
(written to memory by ACQ-interface)
WSS2_ACK 0: WSS data from slicer 2 are the same as in last slicer 1 field
1: New WSS data from slicer 2 received
WSS2_ 4 bits of sliced data of slicer 2 (WWS2_DATA(83) = first received bit)
DATA (written to memory by ACQ-interface)
(83 … 80) Note: See also ACQFP4 t0 ACQFP8
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WSS2_DATA(79..64)
Bit Function
WSS2_ 16 bits of sliced data of slicer 2
DATA (written to memory by ACQ-interface).
(79 … 64) Note: See also ACQFP3 and ACQFP5 to ACQFP8
12 - 18 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WSS2_DATA(63..48)
Bit Function
WSS2_ 16 bits of sliced data of slicer 2
DATA (written to memory by ACQ-interface).
(63 … 48) Note: See also ACQFP3, ACQFP4, ACQFP6 to ACQFP8
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WSS2_DATA(47..32)
Bit Function
WSS2_ 16 bits of sliced data of slicer 2
DATA (written to memory by ACQ-interface).
(47 … 32) Note: See also ACQFP3 to ACQFP5 and ACQFP7 to ACQFP8
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WSS2_DATA(31..16)
Bit Function
WSS2_ 16 bits of sliced data of slicer 2
DATA (written to memory by ACQ-interface).
(31 … 16) Note: See also ACQFP3 to ACQFP6 and ACQFP8
12 - 19 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WSS2_DATA(15..0)
Bit Function
WSS2_ 16 bits of sliced data of slicer 2 (WWS2_DATA(0) = last received bit)
DATA (written to memory by ACQ-interface).
(15 … 0) Note: See also ACQFP3 to ACQFP7
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 STAB VOK FIELD FREA NOIS NOIS GRD GRD STAB VOK FIELD
1 1 1 TTF E(1) E(0) ON SIGN 2 2 2
Bit Function
STAB1 0: H-PLL of slicer 1 not locked
(status bit) 1: H-PLL of slicer 1 locked
(Written to memory by ACQ-interface)
VOK1 Vertical sync watchdog of slicer 1
(status bit) 0: V-sync of slicer 1 not stable
1: V-sync of slicer 1 stable
(Written to memory by ACQ-interface)
FIELD1 0: Actual field of slicer 1 is field 1
(status bit) 1: Actual field of slicer 1 is field 2
(Written to memory by ACQ-interface)
FREATTF Frequency depending attenuation measurement (Field indicator)
(status bit) High frequency CVBS1components (around 3.5 MHz) are strongly
damped (6 to 9 dB) compared to lower frequency CVBS1 components
0: no frequency depending attenuation has been detected during the
last field
1: for at least one text line during the last field frequency depending
attenuation has been detected.
(Written to memory by ACQ-interface)
12 - 20 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
Bit Function
NOISE Noise and co-channel detector of slicer 1
(1 … 0) 00: No noise and no co-channel-distortion has been detected.
(status bit) 01: No noise but co-channel-distortion has been detected.
10: Noise but no co-channel-distortion has been detected.
11: Strong noise has been detected.
(Written to memory by ACQ-interface)
GRDON Group delay detector of slicer 1
(status bit) 0: No group delay distortion detected
1: Group delay distortion detected
(Written to memory by ACQ-interface)
GRDSIGN 0: If group delay distortion has been detected it was positive
(status bit) 1: If group delay distortion has been detected it was negative
(Written to memory by ACQ-interface, CVBS input of slicer 1 is used)
STAB2 0: H-PLL of slicer 2 not locked
(status bit) 1: H-PLL of slicer 2 locked
(Written to memory by ACQ-interface)
VOK2 Vertical sync watchdog of slicer 2
(status bit) 0: V-sync of slicer 2 not stable
1: V-sync of slicer 2 stable
(Written to memory by ACQ-interface)
FIELD2 0: Actual field of slicer 2 is field 1
(status bit) 1: Actual field of slicer 2 is field 2
(Written to memory by ACQ-interface)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 LEOFL(11.0)
Bit Function
LEOFLI This value is the output of the filter of the H-PLL of slicer 1 and
(11 … 0) represents the actual horizontal period of CVBS1 in 33.33 MHz clock
cycles. This information can be used to measure the actual line
frequency of the CVBS signal.
12 - 21 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
Line Parameters
Note: Line parameters only work on slicer 1 and have no influence on slicer 2.
ACQLP0 Reset Value: XXXXH
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DINCR(15..0)
Bit Function
DINCR Specifies the frequency of the D-PLL of slicer 1. This parameter is used
(15 … 0) to configure the D-PLL output frequency according to the service used.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 ACCU PLLT LOWP PFIL GDPO GDNO FRE NOI
ON ON ON ON N N ON ON
12 - 22 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
Bit Function
ACCUON Accumulator on
Improves slicing level calculation under noisy conditions.
If noise has been detected during automatic mode or if the bit NOION
has been set the internal slicing level calculation can be improved by
setting this bit.
0: Standard slicing level calculation
1: Improved slicing level calculation (improvement depends also on
parameter ALENGTH)
PLLLON PLL tune on
If noise has been detected during automatic mode or if the bit NOION
has been set the data clock recovery PLL can be tuned throughout the
line by setting this bit.
0: PLL is frozen after clock run in
1: PLL is tuned throughout the line
LOWPON Low Pass On
If noise has been detected during automatic mode or if the bit NOION
has been set a special low pass can be switched into the signal pass by
setting this bit (useful if mainly high frequency noise above 3.5 MHz is
present).
0: Low pass is not used
1: Low pass is used
PFILLON Pre Filter On
If noise has been detected during automatic mode or if the bit NOION
has been set a second filter can be switched into the signal pass by
setting this bit (also useful if mainly high frequency noise above 3.5 MHz
is present).
0: Low pass is not used.
1: Low pass is used.
GDPON 0: Group delay compensation depends on AGDON
1: Positive group delay compensation is always on
GDNON 0: Group delay compensation depends on AGDON
1: Negative group delay compensation is always on
FREON 0: Frequency depending attenuation compensation depends on
AFRON
1: Frequency depending attenuation compensation is always on
NOION 0: Noise compensation depends on ANOON
1: Noise compensation is always on
12 - 23 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FC1 MLENGTH(2..0) ALENGTH CLKDIV(2..0) NORM(2..0) FCSEL(1..0) VCR 0
ER (1..0)
Bit Function
FC1ER Error tolerance of FC1 check
0: No error allowed
1: One error allowed
MLENGTH For noise suppression reasons a median filter has been introduced after
(2 … 0) the actual data separation because of oversampling successive samples
could be averaged. Therefore an odd number of sliced successive
samples is taken and if the majority are ‘1’ a ‘1’ is sliced otherwise a ‘0’.
MLENGTH specifies how many samples are taken.
MLENGTH Number of samples
000 1
001 3
010 5
011 7
100 9
101 11
110 13
111 15
ALENGTH If noise has been detected or if NOISEON = 1, the output of the slicing
(1 … 0) level filter is further averaged by means of an accumulation (arithmetic
averaging). ALENGTH specifies the number of slicing level filter output
values used for averaging. The accumulation clock depends on CLKDIV.
ALENGTH Number of Slicing Level Output Values
used for Averaging
00 2
01 4
10 8
11 16
12 - 24 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
Bit Function
CLKDIV The slicing level filter needs to find the DC value of the CVBS during CRI.
In order to do this it should suppress at least the CRI frequency. As
different services use different data frequencies the CRI frequency will
be different as well. Therefore the filter characteristic needs to be shifted.
This can be done by using different clocks for the filter. The filter itself
shows sufficient suppression for frequencies between 0.0757 ⌠ SLCLK
and 0.13 ⌠ SLCLK (SLCLK is the actual filter clock and corresponds to
slicer 1)
CLKDIV SLCLK
000 1 ⌠ fs
001 1/2 ⌠ fs
010 1/3 ⌠ fs
011 1/4 ⌠ fs
100 1/5 ⌠ fs
101 1/6 ⌠ fs
110 1/7 ⌠ fs
111 1/8 ⌠ fs
Note: fs = 33.33 MHz
NORM Most timing signals are closely related to the actual data service used.
Therefore 3 bits specify the service received in the actual line.
NORM Service
000 TXT
001 NABTS
010 VPS
011 WSS
100 CC
101 G+
110 reserved
111 no data service
12 - 25 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
Bit Function
FCSEL There are three different framing codes which can be used for each field.
The framing code used for the actual line is selected with FCSEL
(corresponds to slicer 1).
FCSEL FC
00 FC1
01 FC2
10 FC3
11 No FC-check (all data are dumped to the VBI buffer)
VCR This bit is used to change the behavior of the D-PLL and H-PLL.
0: D-PLL tuning is stopped after CRI; H-PLL -> slow time constant
1: D-PLL is tuned throughout the line; H-PLL -> fast time constant
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SLSS SSL(6..0)
Bit Function
SLSS Slicing Level Source Selector
The slicer allows the use of an internal calculated slicing level or an
external set slicing level.
0: Internal calculated slicing level is used.
1: External set slicing level is used.
SSL(6 … 0) Set Slicing Level
If the bit SLSS is set the slicer is using the value of SSL as slicing level
instead of the internal calculated slicing level. The slicing level output in
parameter MSL is never the less the internal calculated value.
12 - 26 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FREA MSL(6..0) PERRP(5..0) TLDE FCOK
TTL
Bit Function
FREATTL Frequency Depending Attenuation Measurement (Line indicator)
High frequency-CVBS1-components (around 3.5 MHz) are strongly
damped (6 to 9 dB) compared to lower frequency-CVBS1-components
0: no frequency depending attenuation has been detected for the
following line
1: strong frequency depending attenuation has been detected for the
following line
(Written to memory by ACQ-interface)
MSL(6 … 0) Measured Slicing Level
The value represents the slicing level which has been measured for the
current data line. The value can be used to calculate a better slicing level
especially for noisy signals by means of software averaging algorithms.
The improved slicing level can be set for the following fields by writing to
parameter SSL.
PERRP Phase Error Watch Dog Preliminary
(5 … 0) (detection of test line CCIR331a or b)
The value shows how often in a line the internal PLL found strong phase
deviations between PLL and sliced data. The value can be used to detect
test line CCIR331a or b. This value is only preliminary as an exact result
is only available at the end of each line. For the exact value see PERR
at ACQLP5.
PERRP < 32? No test line.
PERRP > 31? Test line CCIR331a or b detected
TLDE Test Line Detected (CCIR17 or CCIR18 or CCIR330)
0: No test line of the above mentioned test lines has been detected
1: The following data has most likely be sliced from a test line and
should therefor be ignored.
FCOK Framing Code Received
0: No framing code has been detected (no new data has been written
to memory)
1: The selected framing code has been detected (new data has been
written to memory
12 - 27 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 PERR(5..0)
Bit Function
PERR Phase Error Watch Dog
(5 … 0) (detection of test line CCIR331a or b)
This is the exact phase error watch dog output for the current line. The
value shows how often in a line the internal PLL found strong phase
deviations between PLL and sliced data. The value can be used to detect
test line CCIR331a or b.
PERR < 32? No test line.
PERR > 31? Test line CCIR331a or b detected
12 - 28 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Slicer and Acquisition
12 - 29 Micronas
Register Overview
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
13 Register Overview
This section summarizes all SFR and ESFR registers, which are implemented in M2 and
explains the description format which is used in the previous chapters to describe the
functionality of the SFRs. Display generators and slicers are mainly programmed via
RAM registers which are not mentioned in this chapter, due to their variable position in
the RAM. RAM registers are principally undefined after reset.
For easy reference the registers are ordered according to two different keys:
• Ordered by their functional context
• Ordered by register address, to find the location of a specific register.
13 - 3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- - - - - - - - - write read std hw bitfield(2:0)
only only bit bit
w r rw rw rw
Bit Function
bit(field) Explanation of bit(field)name
name Description of the functions controlled by this bit(field).
13 - 4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
The first 8 GPRs (R7 … R0) may also be accessed via the byte. Other than with SFRs,
writing to a GPR byte does not affect the other byte of the respective GPR.
The respective half of the byte-accessible registers receive special names:
13 - 5 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
13 - 6 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
Table 13-1
Name Description Physical 8-Bit Reset
Address Address Value
SSC Registers
SSCCON Control Register FFB2 H D9H 0000H
SSCBR Baud Rate Timer Reload Register F0B4H 5AH 0000H
SSCTB Transmit Buffer Register F0B0H 58H 0000H
SSCRB Receive Buffer Register F0B2H 59H 0000H
ASC Registers
S0CON Control Register FFB0 H D8H 0000H
S0ABSTAT Autobaud Status Register F0B8H 5CH 0000H
S0ABCON Autobaud Control Register F1B8H DCH 0000H
S0BG Baud Rate Timer Reload Register FEB4 H 5AH 0000H
S0FDV Fractional Divider Register FEB6H 5BH 0000H
S0PMW IrDA Pulse Mode and Width Register FEAAH 55H 0000H
S0TBUF Transmit Buffer Register FEB0 H 58H 0000H
S0RBUF Receive Buffer Register FEB2 H 59H 0000H
I2C Registers
ICCFG2) I2C Configuration Register E810H -/- 0000H
ICCON2) I2C Control Register E812H -/- 0000H
ICST2) I2C Status Register E814H -/- 0000H
ICADR2) I2C Address Register E816H -/- 0000H
ICRTBL2) I2C Receive/Transmit Buffer (Low Word) E818H -/- 0000H
ICRTBH2) I2C Receive/Transmit Buffer (High Word) E81AH -/- 0000H
IICPISEL 2) I2C Port Input Selection Register E804H -/- 0000H
Watchdog Timer Registers
WDTCON Control Register FFAEH D7H 000XH
WDT Timer Register FEAEH 57H 0000H
Realtime Clock Registers
13 - 7 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
13 - 8 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
13 - 9 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
13 - 10 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
13 - 11 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
13 - 12 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
13 - 13 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
13 - 14 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
13 - 15 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
13 - 16 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
10H - - - - - - - -
18H - - - - - - - -
28H - - - - - - - -
30H - - - - - - - -
38H - - - - - - - -
40H - - - - - - - -
48H - - - - - - - -
70H - - - - - - - -
90H - - - - - - - -
98H - - - - - - - -
A8H - - - - - - - -
E8H - - - - - - - -
F0H R0 R1 R2 R3 R4 R5 R6 R7
13 - 17 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
10H - - XPERCON - - - - -
28H - - - - - - - -
40H - - - - - - - -
48H - - - - - - - -
50H - - - - - - - -
80H - - - - RP0H - - -
90H - - - - - - ALTSEL0P6 -
98H - - - - - - - -
A0H - - - - - - - -
A8H - - - - - - - -
B0H - - - - - - - -
F0H R0 R1 R2 R3 R4 R5 R6 R7
13 - 18 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Register Overview
13 - 20 Micronas
Elelctrical Characteristics
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Electrical Characteristics
14 Electrical Characteristics
14 - 3 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Electrical Characteristics
14 - 4 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Electrical Characteristics
Note: In the operating range, the functions given in the circuit description are fulfilled.
14 - 5 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Electrical Characteristics
14.3 DC Characteristics
14 - 6 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Electrical Characteristics
14 - 7 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Electrical Characteristics
14 - 8 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Electrical Characteristics
14 - 9 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Electrical Characteristics
14 - 10 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Electrical Characteristics
14 - 11 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Electrical Characteristics
14.4 Timings
VSYNC
t OPWV
t OPWH
HSYNC Line i Line i+1 Line i+2
UET11193
VCS
Horizontal Pulses
VCS
t HPVCS t EP t HPVCS
t DEP
t FSP
t HPR t HPR t HPR
UET11194
14 - 12 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Electrical Characteristics
P-MQFP-128-2
(Plastic Metric Quad Flat Package)
GPM09233
Sorts of Packing
Package outlines for tubes, trays etc. are contained in our
Data Book “Package Information”.
SMD = Surface Mounted Device Dimensions in mm
14 - 13 Micronas
SDA 6000 PRELIMINARY DATA SHEET
Version 2.1
Electrical Characteristics
14 - 14 Micronas
SDA 6000
Micronas GmbH All information and data contained in this data sheet are without any
Hans-Bunte-Strasse 19 commitment, are not to be considered as an offer for conclusion of a
D-79108 Freiburg (Germany) contract, nor shall they be construed as to create any liability. Any new
issue of this data sheet invalidates previous issues. Product availability
P.O. Box 840 and delivery are exclusively subject to our respective order confirmation
D-79008 Freiburg (Germany) form; the same applies to orders based on development samples deliv-
Tel. +49-761-517-0 ered. By this publication, Micronas GmbH does not assume responsibil-
Fax +49-761-517-2174 ity for patent infringements or other rights of third parties which may
E-mail: docservice@micronas.com result from its use.
Internet: www.micronas.com Further, Micronas GmbH reserves the right to revise this publication and
to make changes to its content, at any time, without obligation to notify
any person or entity of such revisions or changes.
Printed in Germany No part of this publication may be reproduced, photocopied, stored on a
Order No. 6251-557-1PD retrieval system, or transmitted without the express written consent of
Micronas GmbH.
46 Micronas