Page 1:Addition of 72T774 (32KOTP).
Addition of 60K/48K ROM for ST72754
Deletion of table “ device summary”, replaced with cross reference to table 36 on page 147.
page 13 - addition of section 1.4. external connections
Version 4.1 July 2001
Initial format reapplied, text and related figures in the same page.
Table “Device summary” reinserted in cover page and updated.
Update of table 36: ordering information (p143)
Version 4.2 July 2001
Cover - addition of feature about system protection added,
table for device summary: addition of stack values
page 9 - figure 3: replaced 1KByte with 512 Bytes + notes about opcode fetch and HALT
mode
page 10 - table: CR replaced by WDGCR
TIM replaced with Timer and WDG replaced with Watchdog
page 115 - EDF register: addition of “read from RAM”, EDE: few changes
page 135 - Note 1 replaced, note 2 added SUSpend mode limitation..
Whole document: all mentions of HALT mode either deleted or rewritten.
Version 4.3 October 2001
p140, chapter 8, section 8.1code for unused bytes ( FFh) replaced with
page 141- update of table 36 “Ordering information”
page 142 - list of available devices updated
page 114 - DDC DCR register: bit 5 = 1, text “or read from RAM” deleted
Version 4.3November 2001
page 10, one adddress corrected in the figure 3 “memory map”: 0400h
page 14: addition of mandatory 1K resistor (text and figure)
ST72774/ST727754/ST72734
9Dh (opcode for NOP)
5/144
3
ST72774/ST727754/ST72734
1 GENERAL DESCRIPTION
1.1 INTRODUCTION
The ST72774, ST72754 and ST72734 are
HCMOS microcontroller units (MCU) from the
ST727x4 family with dedicated peripherals for
Monitor applications.
They are based around an industry standard 8-bit
core and offer an enhanced instruction set. The
processor runs with an external clock at 12 or 24
MHz with a 5V supply. Due to the fully static design
of this device, operation do wn to DC is possible.
Under software control the ST727x4 can be placed
in WAIT mode thus reducing p ower consumpt ion.
The HALT mode is no longer available.
The enhanced instruction set and addressing
modes afford real programming potential. Illegal
opcodes are patched and lead to a reset.
Figure 1. ST727x4 Block Diagram
Up to 60K Bytes
ROM/OTP/EPROM
Up to 1K Bytes
RAM
In addition to standard 8-bit data management the
ST7 features true bit manipulation, 8x8 unsigned
multiplication and indirect addressing modes.
The device includes an on-chip oscillator, CPU,
System protection aga inst illeg al add re ss j umps,
Sync Processor for video timing & Vfback analysis,
up to 60K Program Mem ory, up to 1K RAM, US B/
DMA, a Timing Measurement Unit, I/O, a timer with
2 input captures and 2 output compares, a 4channel Analog to Digital Converter, DDC, I
Single Master, W atchdog Reset, and ei ght 10-bit
PWM/BRM outputs for analog DC control of
external functions.
Bidirectional. This active low signal forces
the initialization of the MCU. This event is the top
priority non maskable interrupt. This pin is
switched low when the Watchdog has triggered or
V
These pins connect a pa rallel-resonant crystal, or
an external sou rc e to the on -c h ip o s cilla t o r.
TEST/V
: Input. EPROM programming voltage.
PP
This pin must be held low during normal operating
modes.
V
: Power supply voltage (4.0V-5.5V)
DD
V
: Digital Ground.
SS
Alter nate Funct ions: several pins of the I/O ports
assume software programmable alternate
functions as shown in the pin description
Table 1. ST727x4 Pin Description
Pin No.
Pin Name
SDIP42
TQFP44
391PC0/HSYNCDIVI/OPort C0 or HSYNCDIV output (HSYNCO divided by 2)
402PC1/AVI/OPort C1 or “Active Video” input
413PC2/PWM3I/OPort C2 or 10-bit PWM/BRM output 3
424PC3/PWM4I/OPort C3 or 10-bit PWM/BRM output 4
435PC4/PWM5I/OPort C4 or 10-bit PWM/BRM output5
446PC5/PWM6I/OPort C5 or 10-bit PWM/BRM output 6
17PC6/PWM7I/OPort C6 or 10-bit PWM/BRM output 7
28PC7/PWM8I/OPort C7 or 10-bit PWM/BRM output 8
39PB7/AIN3/PWM2I/O
410PB6/AIN2/PWM1I/O
511PB5/AIN1I/OPort B5 or ADC analog input 1
612PB4/AIN0I/OPort B4 or ADC analog input 0
813V
914USBVCCSUSB power supply (output 3.3V +/- 10%)
1015USBDMI/OUSB bidirectional dataMust be tied to ground
1116USBDPI/OUSB bidirectional data
1217V
1318HSYNCIISYNC horizontal synchronisation input
1419VSYNCIISYN C vertical synch ronis ation input
1520PD0/VSYNCOI/OPort D0 or SYNC vertical synchronisation output
1621PD1/HSYNCOI/OPort D1 or SYNC horizontal synchronisation output
1722PD2/CSYNCII/OPort D2 or SYNC composite synchronisation input
DD
SS
Type
Port B7 or ADC analog input 3 or 10-bit PWM/BRM
output 2
Port B6 or ADC analog input 2 or 10-bit PWM/BRM
output 1
SSupply (4.0V - 5.5V)
SGround 0V
DescriptionRemarks
For analog controls,
after external filtering
for devices without
USB peripheral
TTL levels
Refer to Figure 16
TTL levels with pull-up
(SYNC input)
8/144
3
Pin No.
ST72774/ST727754/ST72734
Pin Name
SDIP42
TQFP44
1823PD3/VFBACK/ITAI/O
1924PD4/ITBI/OPort D4 or Interrupt falling edge detector input B
2025PD5/HFBACKI/OPort D5 or SYNC horizontal flyback input
2126PD6/CLAMPOUTI/OPort D6 or SYNC clamping/ MOIRE output
2227PB0/SCLDI/OPort B0 or DDC serial clock
2428PB1/SDADI/OPort B1 or DDC serial data
2529PB2/SCLII/OPort B2 or I2C serial clock
2630PB3/SDAII/OPort B3 or I2C serial data
2731PA7/BLANKOUTI/OPort A7 or SYNC blanking output
2832OSCOUTOOscillator output
2933OSCINIOscillator input
3034PA6I/OPort A6
3135PA5I/OPort A5
3236PA4I/OPort A4
3337PA3I/OPort A3
3438PA2/VSYNCI2I/OPort A2 or SYNC vertical synchronisation input 2DDC1 only
3539PA1I/OPort A1
3640RESET
3741TEST/V
3842PA0/OCMP1I/OPort A0 or TIMER output compare 1
PP
Type
Port D3 or SYNC Vertical flyback input or interrupt falling edge detector input A
I/OReset pin Active low
Test mode pin or EPROM programming voltage. This
S
pin should be tied low in user mode.
DescriptionRemarks
Refer to Figure 16 and
Table 11 Port D Description
Refer to Table 11 Port
D Description
TTL levels with pull-up
(SYNC input)
9/144
ST72774/ST727754/ST72734
1.3 MEMORY MA P
Figure 3. Me m ory Map
0000h
005Fh
0060h
03FFh
0400h
0FFFh
1000h
4000h
8000h
FFDFh
FFE0h
FFFFh
HW Registers
(see Table 2)
512 Bytes RAM
1 Kbyte RAM
Reserved
60 Kbytes
ROM/EPROM
48 Kbytes
32 Kbytes
Interrupt & Reset Vectors *
(see Table 3)
0060h
0100h
01FFh
0060h
0100h
01FFh
0200h
03FFh
Short Addressing
RAM (zero page)
256 Bytes Stack/
16-bit Addressing RAM
Short Addressing
RAM (zero page)
256 Bytes Stack/
16-bit Addressing RAM
16-bit Addressing
RAM
512 Bytes
any opcode fetch in those areas is considered as illegal and generates a reset
(*) this block only contains addresses of interrupts and reset routines, no opcode is run from this block
10/144
MEMORY MAP (Cont’d)
Table 2. Hardware Register Mem ory Map
ST72774/ST727754/ST72734
AddressBlock Register LabelRegister Name
0000h
0001h
0002h
0003h
0004h
0005h
0006h
0007h
0008hWatchdogWDGCRWatchdog Control Register7FhR/W
0009hMISCRMiscellaneous Register10hR/W
000Ah
USB PID Register
USB DMA address Register
USB Interrupt/DMA Register
USB Interrupt Status Register
USB Interrupt Mask Register
USB Control Register
USB Device Address Register
USB Endpoint 0 Register A
USB Endpoint 0 Register B
USB Endpoint 1 Register A
USB Endpoint 1 Register B
USB Endpoint 2 Register A
USB Endpoint2 Register B
DDC/CI Control Register
DDC/CI Status Register 1
DDC/CI Status Register 2
Reserved
DDC/CI (7 Bits) Slave address Register
Reserved
DDC/CI Data Register
Reserved Area (2 bytes)
I2C Data Register
Reserved
Reserved
2
C Clock Control Register
I
2
C Status Register 2
I
2
C Status Register 1
I
2
C Control Register
I
Reset
Status
00h
00h
00h
00h
00h
00h
00h
00h
00h
00h
Table 3. Interrupt Vector Map
Vector AddressDescriptionRemarks
FFE0-FFE1h
FFE2-FFE3h
FFE4-FFE5h
FFE6-FFE7h
FFE8-FFE9h
FFEA-FFEBh
FFEC-FFEDh
FFEE-FFEFh
FFF0-FFF1h
FFF2-FFF3h
FFF4-FFF5h
FFF6-FFF7h
FFF8-FFF9h
FFFA-FFFBh
FFFC-FFFDh
FFFE-FFFFh
Timer Overflow interrupt vector
Timer Output Compare interrupt vector
Timer Input Capture interrupt vector
ITA falling edge interrupt vector
ITB falling edge interrupt vector
DDC1/2B interrupt vector
USB End Suspend interrupt vector
TRAP (software) interrupt vector
Not used
Not used
Not used
USB interrupt vector
Not used
I2C interrupt vector
DDC/CI interrupt vector
RESET vector
Internal Interrupts
External Interrupts
Internal Interrupt
CPU Interrupt
Remarks
R/W
Read only
Read only
R/W
R/W
R/W
R/W
Read only
Read only
R/W
13/144
ST72774/ST727754/ST72734
1.4 External connections
The following figure shows the recom mended external connections for the device.
The V
pin is only used for programming OTP
PP
and EPROM devices and must be tied to ground in
user mode.
The 10 nF and 0. 1 µF decoupling capacitors on
the power supply lines are a suggested EMC performance/cost tradeoff.
Figure 4. Recommended Extern al Connec tions
V
DD
EXTERNAL RESET CIRCUIT
10nF
V
DD
0.1µF
0.1µF
+
4.7K
The external reset network (including the mandatory 1K serial resistor) is inten ded to protect the
device against parasitic resets, espec ially in noisy
environments.
Unused I/Os shoul d be t ied hi gh to av oid any unnecessary power consumption on floating lines.
An alternative solution is to program the unused
ports as inputs with pull-up.
V
PP
V
0.1µF
1K
DD
V
SS
RESET
14/144
See
Clocks
Section
Or configure unused I/O ports
by software as input with pull-up
V
10K
DD
OSCIN
OSCOUT
Unused I/O
2 CENTRAL PRO CESSING UNIT
ST72774/ST727754/ST72734
2.1 INTRODUCTION
This CPU has a full 8-bit architecture and contains
six internal registers allowing efficient 8-bit data
manipulation.
2.2 MAIN FEATURES
■ 63 basic instructions
■ Fast 8-bit by 8-bit multiply
■ 17 main addressing modes
■ Two 8-bit index registers
■ 16-bit stack pointer
■ Low power modes
■ Maskable hardware interrupts
■ Non-maskable software interrupt
2.3 CPU REGISTERS
The 6 CPU registers shown in Figure 5 are not
present in the memory mapping and are accessed
by specific instructions.
Accumulator (A)
Figure 5. CPU Registers
70
RESET VALUE = XXh
70
RESET VALUE = XXh
70
RESET VALUE = XXh
The Accumulator is an 8-bit general purpose
register used to hold operands and the results of
the arithmetic and logic calculations and to
manipulate data.
Index Registers (X and Y)
In indexed addressing modes, these 8-bit registers
are used to create either effective addresses or
temporary storage areas for data manipulation.
(The Cross-Assembler generates a precede
instruction (PRE) to indicate that the following
instruction refers to the Y register.)
The Y register is not affected by the interrupt
automatic procedures (not pushed to and pop ped
from the stack).
Program Cou nt er (P C )
The program counter is a 16-bit register containing
the address of the next instruction to be executed
by the CPU. It is made of two 8-bit registers PCL
(Program Counter Low which is the LSB) and PCH
(Program Counter High which is the MSB).
ACCUMULATOR
X INDEX REGISTER
Y INDEX REGISTER
158
RESET VALUE = RESET VECTOR @ FFFEh-FFFFh
15
RESET VALUE = STACK HIGHER ADDRESS
PCH
RESET VALUE =
7
70
1C11HI NZ
1X11X1XX
70
8
PCL
0
PROGRAM COUNTER
CONDITION CODE REGISTER
STACK POINTER
X = Undefined Value
15/144
ST72774/ST727754/ST72734
CPU REGISTERS (Cont’d)
CONDITION CODE REGISTER (CC)
Read/Write
Reset Value: 111x1xxx
70
enter it and reset by the IRET instruction at the end
of the interrupt routine. If the I bit is cleared by
software in the interrupt routine, pending interrupts
are serviced regardless of the pri ority level of the
current interrupt routine.
111HINZC
The 8-bit Condition Code register contains the
interrupt mask and four flags representative of the
result of the instruction just executed. This register
can also be handled by the PUSH and POP
instructions.
These bits can be individually tested and/or
controlled by specific instructions.
Bit 4 = H
Half carry
.
This bit is set by hardware when a carry occurs
between bits 3 and 4 of the ALU during an ADD or
ADC instruction. It is reset by hardware during the
same instructions.
0: No half carry has occurred.
1: A half carry has occurred.
This bit is tested using the JRH or JRNH
instruction. The H bit is useful in B CD arithmetic
subroutines.
Bit 2 = N
Negative
.
This bit is set and cleared by hardware. It is
representative of the result sign of the last
arithmetic, logical or data manipulation. It is a copy
of the 7
th
bit of the result.
0: The result of the last operation is positive or null.
1: The result of the last operation is negative
(i.e. the most significant bit is a logic 1).
This bit is accessed by the JRMI and JRPL
instructions.
Bit 1 = Z
Zero
.
This bit is set and cleared by hardware. This bit
indicates that the result of the last arithmetic,
logical or data manipulation is zero.
0: The result of the last operation is different from
zero.
1: The result of the last operation is zero.
This bit is accessed by the JREQ and JRNE test
instructions.
Bit 3 = I
Interrupt mask
.
This bit is set by hardware when entering in
interrupt or by software to disable all interrupts
except the TRAP software interrupt. This bit is
cleared by software.
0: Interrupts are enabled.
1: Interrupts are disabled.
This bit is controlled by the RIM, SIM and IRET
instructions and is tested by the JRM and JRNM
instructions.
Note: Interrupts requested while I is set are
latched and can be processed whe n I is cleared.
By default an interrupt routine is not in terruptable
because the I bit is set by hardware when you
16/144
Bit 0 = C
Carry/borrow.
This bit is set and cleared by hardware and
software. It indicates an overflow or an underflow
has occurred during the last arithmetic operation.
0: No overflow or underflow has occurred.
1: An overflow or underflow has occurred.
This bit is driven by th e SCF and RCF instructions
and tested by the JRC and JRNC instructions. It is
also affected by the “bit test and branch”, shift and
rotate instructions.
ST72774/ST727754/ST72734
CPU REGISTERS (Cont’d)
Stack Pointer (SP)
Read/Write
Reset Value: 01 FFh
158
00000001
70
The least significant byte of the Stack Pointer
(called S) can be directly accessed by a LD
instruction.
Note: When the lower limit is exceeded, the Stack
Pointer wraps around to the stack upper limit,
without indicating the stack overflow. The
previously stored information is then overwritten
and therefore lost. The stack also wraps in case of
an underflow.
SP7SP6SP5SP4SP3SP2SP1SP0
The Stack Pointer is a 16-bit register which is
always pointing to the next free location in the
stack. It is then decremented after data has been
pushed onto the stack and incremented before
data is popped from the stack (see Figure 6).
Since the stack is 256 bytes deep, the most
significant byte is forced by ha rd ware. Fol lowing
an MCU Reset, or after a Reset Stack Pointer
instruction (RSP), the Stack Pointer contains its
reset value (the SP7 to SP0 bits are set) which is
the stack higher address.
Figure 6. Stack Manipulation Example
@ 0100h
SP
@ 01FFh
CALL
Subroutine
PCH
PCL
Interrupt
event
SP
SP
CC
A
X
PCH
PCL
PCH
PCL
PUSH YPOP YIRET
Y
CC
A
X
PCH
PCL
PCH
PCL
The stack is used to save the return address
during a subroutine call and the CPU context
during an interrupt. The user may also directly
manipulate the stack b y means of the PU SH and
POP instructions. In the case of an in terrupt, the
PCL is stored at the first location pointed to by the
SP. Then the other registers are stored in the next
locations as shown in Figure 6.
– When an interrupt is received, the SP is decre-
mented and the context is pushed on the stack.
– On return from interrupt, the SP is incremented
and the context is popped from the stack.
A subroutine call occupies two locations and an
interrupt five locations in the stack area.
The MCU accepts either a cry stal or an external
clock signal to drive the internal oscillator. The
internal clock (CPU CLK running at f
CPU
) is
derived from the external oscillator frequency
), which is divided by 3. Depending on the
(f
OSC
external quartz or clock frequency, a division factor
of 2 is optionally added to generate the 12 MHz
clock for the Sync Processor (clamp function) as
Figure 7. Clock divider chain
OSC
12 MHz
or
%2
FAST
24MHz
shown in Figure 7 and a second divider by 2 for the
6MHz USB clock.
The CPU clock is used also as clock for the
ST727x4 peripherals.
Note: In the Sync processor, an additional divider
by two is added in fast mode (same external timing
for this peripheral).
f
: 4 or 8 MHz
%3
CPU
(CPU and peripherals)
12 MHz
(Sync processor Clampout signal)
%2
6 MHz
(USB)
FAST=1 for 24 M H Z os c illatorFAST=0 for 12 MHz osc il lat o r
18/144
12 MHz
or
24MHz
(TMU)
4
CLOCK SYSTEM (Cont’d)
3.1.2 Crystal Resonator
The internal oscillat or is designed to operate with
an AT-cut parallel resonant quartz crystal
resonator in the frequency range specified for f
osc
The circuit shown in Figure 8 is recommended
when using a crystal, and Table 4, “.
Recommended Crystal Values,” on page 19 lists
the recommended capacitance and feedback
resistance values. The crystal and associated
components should be mounted as close as
possible to the input pins in order to minimize
output distortion and start-up stabilization time.
Figure 8. Crystal/Ceramic Resonator
CRYSTAL CLOCK
OSCINOSCOUT
C
L1
C
L2
ST72774/ST727754/ST72734
Table 4
.
Legend:
C
OSCIN and OSCOUT (the value includes the
external capacitance tied to the pin plus the
parasitic capacitance of the board and of the
device).
R
the quartz allowed.
Note: The tables are relative t o the quart z crystal
only (not ceramic resonator).
3.1.3 External Clock
An external clock should be appli ed to t he O SCIN
input with the OSCOUT pin not connected as
shown in Figure 9. The Crystal clock specifications
do not apply when using an external clock input.
The equivalent spe cification of the external clock
source should be used.
. Recomm en de d Crystal Values
24 MhzUnit
R
SMAX
C
L1
C
L2
, CL2 = Maximum total capacitance on pins
L1
= Maximum series parasitic resistance of
SMAX
702520Ohms
224756pf
224756pf
*Recommended for oscillator stability
1M*
Figure 9. External Clock Source Connections
OSCIN
EXTERNAL
CLOCK
OSCOUT
NC
19/144
ST72774/ST727754/ST72734
3.2 RESET
The Reset procedure is used to provide an orderly
software start-up or to quit low powe r modes.
Five conditions generate a reset:
■ LVD,
■ watchdog,
■ external pulse at the RESET pin,
■ illegal address,
■ illegal opcode.
A reset causes the reset vector to be fetched from
addresses FFFEh and FFFFh in order to be loaded
into the PC and with program execution starting
from this point.
An internal circuitry provides a 4096 CPU clock
cycle delay from the time that the oscillator
becomes active.
3.2.1 LVD and Watchdog Reset
The Low Voltage Detector (LVD) generates a reset
when V
when
is active only when V
is below V
DD
is falling (refer to Figure 11). This circuitry
VDD
when VDD is ri sing or V
TRH
is above V
DD
TRM.
TRL
During LVD Reset, the RESET pin is held low, thus
permitting the MCU to reset other devices.
When a watchdog reset occurs, the RESET
pin is
pulled low permitting the MCU to reset other
devices as when Power on/off (Figure 10).
3.2.2 External Reset
The external reset is an active low input signal
applied to the RESET pin of the MCU.
As shown in Figure 12, the RESET
signal must
remain low for 1000ns.
An internal Schmitt trigger at the RESET
pin is
provided to improve noise immunity.
3.2.3 Illegal Address Detection
An opcode fetch from an illegal address (refer to
Figure 3) generates an illegal address reset.
Program execution at those addresses is
forbidden (especially to protect page 0 registers
against spurious accesses).
3.2.4 Illegal Opcode Detection
Illegal instructions corresponding to no valid
opcode generate a reset. Refer to ST7
Programming Manual.
Table 5. List of sections affected by RESET and WAIT (Refer to 3.6 for Wait Mo de)
SectionRESETWAIT
Fast bit of the miscellaneous register set to one (24 MHz as external clock)X
Timer Prescaler reset to zeroX
Timer Counter set to FFFChX
All Timer enable bits set to 0 (disabled)X
Data Direction Registers set to 0 (as Inputs)X
Set Stack Pointer to 01FFhX
Force Internal Address Bus to restart vector FFFEh, FFFFhX
Set Interrupt Mask Bit (I-Bit, CC) to 1 (Interrupt disable)X
Set Interrupt Mask Bit (I-Bit, CC) to 0 (Interrupt enable)X
Reset WAIT latchX
Disable Oscillator (for 4096 cycles)X
Set Timer Clock to 0X
Watchdog counter resetX
Watchdog register resetX
Port data registers resetX
Other on-chip peripherals: registers resetX
20/144
RESET (Cont’d)
ST72774/ST727754/ST72734
Figure 10. Low Voltage Detector Functional Diagram
V
DD
LVD
RESET
FROM
WATCHDOG
RESET
RESPOF
INTERNAL
RESET
Figure 11. LVD Reset Signal Output
Note: See electrical characteristics section for
values of V
Figure 12. Reset Timing Diagram
t
DDR
V
DD
OSCIN
t
OXOV
V
V
DD
RESET
TRM
V
TRH
TRH, VTRL
and V
TRM
V
TRL
V
TRM
f
CPU
PC
t
RL
RESET
WATCHDOG RESET
Note: Refer to Electrical Characteristics for values of t
4096 CPU
CLOCK
CYCLES
DELAY
, t
OXOV and
DDR
FFFE
t
FFFF
RL
21/144
ST72774/ST727754/ST72734
3.3 INTERRUPTS
The ST727x4 may be interrupted by one of two
different methods: maskable hardware interrupts
as listed in T able 6 and a non-maskab le software
interrupt (TRAP). The Interrupt processing
flowchart is shown in Figure 13.
The maskable interrupts must be enabled in order
to be serviced. However, disabled interrupts can
be latched and processed when they are enabled.
When an interrupt has to be serviced, the PC, X, A
and CC registers are saved onto the stack and the
interrupt mask (I bit of the Condition Code
Register) is set to prevent additional interrupts.
The Y register is not automatically saved.
The PC is then load ed with the interrupt vector of
the interrupt to service and the interrupt service
routine runs (refer to Table 6, “Interrupt Mapping,”
on page 24 for vector addresses). The interrupt
service routine should finish with the IRET
instruction which causes the contents of the
registers to be recovered from the stack and
normal processing to resume. Note that the I bit is
then cleared if and only if the corresponding bit
stored in the stack is zero.
Though many interrupts can be simultaneously
pending, a priority order is defined (see Table 6,
“Interrupt Mapping,” on page 24). The RESET
pin
has the highest priority.
If the I bit is set, only the TRAP interrupt is enabled.
All interrupts allow the processor to leave the
WAIT low power mode.
Software Interrupt. The software interrupt is the
executable instruction TRAP. The interrupt is
recognized when the TRAP instruction is
executed, regardless of the state of the I bit. When
the interrupt is recognized, it is serviced according
to the flowchart on Figure 13.
ITA, ITB interrupts. The ITA (PD3), ITB (PD4),
pins can generate an interrupt when a falling edge
occurs on these pins, if these interrupts are
enabled with the ITAITE, ITBITE bits respectively
in the miscellaneous register and the I bit of the CC
register is reset. When an enabled interrupt
occurs, normal processing is suspended at the
end of the current instruct ion execution. It is then
serviced according to the flowchart on Figure 13.
Software in the ITA or ITB service routine must
reset the cause of this interrupt by clearing the
ITALAT, ITBLAT or ITAITE, ITBITE bits in the
miscellaneous register.
Peripheral Interrupts. Different peripheral
interrupt flags are able to cause an interrupt when
they are active if both the I bit of the CC register is
reset and if the corresponding enable bit is set. If
either of these conditions is false , the interrupt is
latched and thus remains pending.
The interrupt flags are located in the status
register. The Enable bits are in the control register.
When an enabled interrupt occurs, normal
processing is suspended at the end of the current
instruction execution. It is then serviced according
to the flowchart on Figure 13.
The general sequence for clearing an interrupt is
an access to the status register while the flag is set
followed by a read or write of an associated
register. Note that the clearing sequence resets
the internal latch. A pending interrupt (i.e. waiting
for being ena b led ) w ill therefore be los t if the clea r
sequence is executed.
22/144
INTERRUPTS (Cont’d)
Figure 13. I nt errupt Processin g Fl owchart
FROM RESET
ST72774/ST727754/ST72734
EXECUTE INSTRUCTION
TRAP?
N
N
I BIT SET?
Y
FETCH NEXT INSTRUCTION
N
IRET?
Y
N
INTERRUPT?
Y
STACK PC, X, A, CC
SET I BIT
LOAD PC FROM INTERRUPT VECTOR
** Many flags can cause an interrupt, see peripheral interrupt status register description.
24/144
3.4 POWER SAVI NG MO DE S
ST72774/ST727754/ST72734
3.4.1 WAIT Mode
This mode is a low power consumption mode. The
WFI instruction places the MCU in WAIT mode:
The internal clock remains active but all CPU
processing is stopped; however, all other
peripherals are still running.
Note: In WAIT mode, DMA accesses (DDC, USB)
are possible.
During WAIT mode, the I bit in the condition code
register is cleared to enable all interrupts, whi ch
causes the MCU to exit WAIT mode, causes the
corresponding interrupt vector to be fetched, th e
interrupt routine to be executed and normal
processing to resume. A reset causes the program
counter to fetch the reset vector and processing
starts as for a normal reset.
Table 5 gives a list of the different sections
affected by the low power modes. For detailed
information on a particular device, please refer to
the corresponding part.
Figure 14. WAIT Flow Chart
WFI INSTRUCTION
OSCILLATOR
PERIPH. CLOCK
CPU CLOCK
I-BIT
N
N
INTERRUPT
Y
OSCILLATOR
PERIPH. CLOCK
CPU CLOCK
I-BIT
ON
ON
OFF
CLEARED
RESET
Y
ON
ON
ON
SET
3.4.2 HALT Mode
The HALT mode is the MCU lowest power
consumption mode. Meanwhile, the HALT mode
also stops the oscillator stage comple tely which is
the most critical condition in CRT monitors.
For this reason, the HALT mode has been disabled
and its associated HALT instruction is now
considered as illegal and will generate a reset.
IF RESET
4096 CPU CLOCK
CYCLES DELAY
FETCH RESET VECTOR
OR SERVICE INTERRUPT
Note: Before servicing an interrupt, the CC register is
pushed on the sta ck. T he I-Bit is s et d uring the inte rrupt routine and cleared when the CC register is
popped.
25/144
ST72774/ST727754/ST72734
3.5 MISCELLANEOUS REGISTER
MISCELLANEOUS REGISTER (MISCR)
Address: 0009h— R ea d/W rite
Reset Value: 0001 0000 (10h)
70
VSYNC
FLY_SYNHSYNC
SEL
FAST ITBLAT ITALAT ITBITE ITAITE
DIVEN
Bit 4= FAST
Fast Mode.
This bit is set and cleared by software. It is used to
select the external cloc k frequ ency . If th e exte rnal
clock frequency is 12 M Hz, this bit must be at 0,
else if the external frequency is 24 MHz, this bit
must be at 1.
Bit 7= VSYNCSEL
DDC1 VSYNC Selection.
This bit is set and cleared by software. It is used to
choose the VSYNC signal in DDC1 mode.
0: VSYNCI selected
1: VSYNCI2 selected
Note: VSYNCI 2 is only available for the DDC cell,
not for the SYNC processor cell.
Bit 6= FL Y _SY N
Flyback or Synchro Switch.
This bit is set and cleared by software. It is used to
choose the signals the Timing Measureme nt Unit
(TMU) will analyse.
0: horizontal and vertical synchro outputs analysis
1: horizontal and vertical Flyback inputs analysis
Bit 5= HS YNCDIVEN
HSYNCDIV Enable.
This bit is set and cleared by software. It is used to
enable the output of the HSYNCO output on PC0.
0: HSYNCDIV disabled
1:HSYNCDIV enabled
Bit 3= ITBLAT
Falling Edge Detector Latch.
This bit is set by hardware when a falling edge
occurs on pin ITB/PD4 in Port D. An interrupt is
generated if ITBITE=1and the I bit in the CC
register = 0. It is cleared by software.
0: No falling edge detected on ITB
1: Falling edge detected on ITB
Bit 2= ITALAT
Falling Edge Detector Latch.
This bit is set by hardware when a falling edge
occurs on pin ITA/PD3 in Port D. An interrupt is
generated if ITAITE=1and the I bit in the CC
register = 0. It is cleared by software.
0: No falling edge detected on ITA
1: Falling edge detected on ITA
Bit 1= ITBITE
ITB Interrupt Enable
.
This bit is set and cleared by software.
0: ITB interrupt disabled
1: ITB interrupt enabled
Bit 0= ITAITE
ITA Interrupt Enable
.
This bit is set and cleared by software.
26/144
0: ITA interrupt disabled
1: ITA interrupt enabled
4 ON-CHIP PERIPHERALS
4.1 I/O PORTS
ST72774/ST727754/ST72734
4.1.1 Introd uct i on
The I/O ports allow the transfer of data through
digital inputs and outputs, and, for specific pins,
the input of analog s ignals or the Input/Output of
alternate signals for on-chip peripherals (DDC,
TIMER...).
Figure 15. I/O Pin Typical Cir cuit
Alternate enable
Alternate
1
output
0
DR
latch
Data Bus
DDR
latch
Each pin can be programmed independently as
digital input or digital output. E ach pin can be an
analog input when an analog switch is connected
to the Analog to Digital Converter (ADC).
V
DD
P-BUFFER
(if required)
PULL-UP (if required)
Alternate enable
PAD
Analog Enable
(ADC)
Common Analog Rail
DDR SEL
Analog
Switch (if required)
N-BUFFER
DR SEL
1
Alternate Enable
0
Digital Enable
V
SS
Alternate Input
Note: This is the typical I/O pin configuration. For cost optimization, each port is customized with a specific configuration.
27/144
5
ST72774/ST727754/ST72734
I/O PORTS (Cont’d)
Table 7. I/O Pin Functions
DDRMODE
0Input
1Output
4.1.2 Common Functional Description
Each port pin of the I/O Ports can be individual ly
configured under software control as either i nput
or output.
Each bit of a Data Direction Register (DDR)
corresponds to an I/O pin of the associated p ort.
This corresponding bit must be set to configure its
associated pin as output and must be cleared to
configure its associated pin as input (Table 7, “. I/O
Pin Functions,” on page 28). The Data Direction
Registers can be read and written.
The typical I/O circuit is shown on Figure 15. Any
write to an I/O port updates the port data register
even if it is configured as input. Any read of an I/O
port returns either the data latched in the port data
register (pins configured as output) or the value of
the I/O pins (pins configured as input).
Remark: when an I/O pin does not exist inside an
I/O port, the returned value is a logic one (pin
configured as input).
At reset, all DDR registers are cleared, which
configures all port’s I/Os as inputs with or without
pull-ups (see Table 8 to Table 12 I/O Ports
Register Map). The Data Registers (DR) are also
initialized at reset.
4.1.2.1 Input mode
When DDR=0, the corresponding I/O is configured
in Input mode.
In this case, the output buffer is switched off, the
state of the I/O is readable through the Data
Register address, but the I/O state comes directly
from the CMOS Schmitt Trigger output and not
from the Data Register output.
4.1.2.2 Output mode
When DDR=1, the corresponding I/O is configured
in Output mode.
In this case, the output buffer is activated
according to the Data Register’s content.
A read operation is directly performed from the
Data Register output.
4.1.2.3 Analog input
Each I/O can be used as analog input by adding an
analog switch driven by the ADC.
The I/O must be configured in Input before using it
as analog input.
The CMOS Schmitt trigger is OFF and the analog
value directly input through an analog switch to the
Analog to Digital Converter, when the analog
channel is selected by the ADC.
4.1.2.4 Alternate mode
A signal coming from a on-chip peripheral can be
output on the I/O.
In this case, the I/O is automaticall y configured in
output mode.
This must be controlled directly by the peripheral
with a signal coming from the peripheral which
enables the alternate signal to be output.
A signal coming from an I/O can be inpu t in a onchip peripheral.
Before using an I/O as Alternate Input, it must be
configured in Input mode (DDR=0). So both
Alternate Input configuration and I/O Input
configuration are the same (with or without pullup). The signal to be input in the peripheral is taken
after the CMOS Schmitt trigger or TTL Schmitt
trigger for SYNC.
The I/O state is readable as in Input mode by
addressing the corresponding I/O Data Register.
28/144
ST72774/ST727754/ST72734
Figure 16. Input Structure for SYNC signals
TTL trigger
Pin
HSYNCI Input
VSYNCI Input
(no pull-up)
I/O logic (if existing)
V
DD
TTL trigg erpull-up
CSYNCI Input
Pin
HFBACK Input
VFBACK Input
I/O logic (if existing)
4.1.3 Port A
PA7 and PA[2:0] can be defined as Input lines
(with pull-up) or as Push-pull Outputs.
PA [6:3] can be defined as Input lines (without pullup) or as Output Open drain lines.
PA7 and PA[2:0] can be defined as Input lines
(with pull-up) or as Push-pull Outputs.
PA [6:3] can be defined as Input lines (without pullup) or as Output Open drain lines.