![](http://datasheet.mmic.net.cn/300000/SCG9800_datasheet_16210030/SCG9800_6.png)
SCG9800
8-BIT MICROCONTROLLER
Score Concept Semiconductor Ltd.
6
Sept 2000
Interrupts
The MICROCONTROLLER has 2 timer interrupts, one real time interrupt, one external event
interrupt and one software interrupt. When interrupt occurs, the content of PC, iPAGE and
PS are pushed onto the stack in sequence. And then, the corresponding interrupt vector is
loaded into iPAGE:PC. Upon executing a RTI instruction, the registers are popped out of the
stack in the reversed order.
The preference of interrupt priority is Timer 0 / RTC interrupt, Timer 1 interrupt and then
external interrupt.
I/O Ports
The microcontroller has one 2-bit output port and one software-controllable 8-bit I/O port.
For I/O port 0, there is a pull-low resistor when it is configured in input mode, and this resistor
is disabled when it is in output mode.
For Port 5, it is a 2-bit output port only.
Remark:
memory access via setting bit6 of the internal register TCONG.
Port 4 bit3 can be an output if the chip is not configured as 8M bits external
Timers
The microcontroller has two programmable 8-bit timers (T0 and T1) for system timing. It has
also a real time timer and a watch dog timer when subsystem clock is employed. All the
timers can be enabled or disabled by configuring an internal register, TCONG. At CPU resets,
all of them are disabled.
T0 and T1 are up-counters and can be configured as either two 8-bit pre-scalar auto reload
timer or as a 16-bit pre-scalar auto reload timer. The timer overflow flag will be set if the timer
overflows. Then an interrupt will be generated if the corresponding interrupt enable bit is set
to 1.
The real time timer provides 0.5 sec interrupt for RTC functions. Watch dog timer will overflow
in ~1 sec and then will reset the CPU.