![](http://datasheet.mmic.net.cn/300000/SCG9800_datasheet_16210030/SCG9800_5.png)
SCG9800
8-BIT MICROCONTROLLER
Score Concept Semiconductor Ltd.
5
Sept 2000
Interrupt Mask Flag (I)
The flag will be set to 1 when entering an interrupt service routine. By that
time, all other interrupt events will be pending.
After exiting from the interrupt service routine, this interrupt mask flag will be
cleared to 0. Then interrupt handling will be resumed.
Memory
By connecting PAD_EXT_ADDR to HIGH, external memory access of 512K bytes is allowed.
In addition, setting bit5 of the internal register TCONG will expand memory access to another
512K bytes. This extra external memory block can be RAM or ROM. For this ROM-less chip,
memory is arranged in 16K-byte page size each. Therefore, there can have 32 pages for
512K bytes of memory space. Regarding the instruction pointer, it is organized as iPAGE:PC
for instruction fetch.
Change of program flow between pages is by modifying the PAGE register and then followed
by executing a JMP or CALL instruction. These two instructions will load the PAGE register to
iPAGE and change the content in PC for long JMP or CALL instruction. It does not need to
change the PAGE register if it is a short JMP/CALL (i.e. JMP/CALL within page) because the
PAGE register is normally the same as the iPAGE register. To exit a subroutine, long or short
return type must be specified for long or short CALL respectively.
The microcontroller has 240 bytes internal RAM data storage of address $10-$FF. This area
includes stack frame and data memory. The stack frame is usually initialized at the highest
RAM address location, i.e. $FF.
Oscillation Circuits
Main system and subsystem oscillation circuitry generates the internal clock signal for the
CPU and other hardware timings. The main system clock uses the RC oscillation source. The
operating frequency is up to 4 MHz. This clock is for the CPU and the two timers.
The subsystem clock is for the real time signals. It uses a 32.768 kHz crystal. It has to be tied
to a voltage level, either HIGH or LOW, if the real time timer and the watch dog timer are not
used.
Power Down
The microcontroller supports power down mode for saving power.
Executing a STOP instruction will stop both main system and subsystem clock to the core to
save most of the microcontroller power. To enter sleep mode, execute a SLEEP instruction
will stop the system clock only.
Only an external interrupt will release the microcontroller from STOP mode if external
interrupt enable bit is set to 1. For SLEEP mode, the microcontroller will be awoken every 0.5
sec or by the external interrupt if corresponding enable bit is set to 1.