© 2000 Scenix Semiconductor, Inc. All rights reserved.
31
SX Users Manual Rev. 3.1
www.scenix.com
Chapter 2 Architecture
2.4.1
W (Working Register)
The W register is the main working register used by many instructions as the source or destination of
the operation. It is often used as a temporary storage area for intermediate operations. For example, to
add the contents of two file registers, you must first move the contents of one file register to W and
then execute an add instruction to perform an addition between W and the other file register.
For SX18/20/28AC and SX18/20/28AC75 devices, in the default device configuration, W is not
memory-mapped and can only be accessed by instructions that work specifically with W as the source
or destination. However, you can optionally make the W available as a memory-mapped register at
address 01h. To do this, first program the OPTIONX bit to 0 in the FUSEX word in the program
memory. Then have your program clear the RTW bit in the OPTION register. If you do this, the RTCC
register normally at address 01h becomes unavailable.
2.4.2
INDF (Indirect through FSR)
The INDF register location (address 00h) is used for indirect addressing. Whenever this address is
specified as the source or destination of an operation, the device uses the register pointed to by the FSR
register (address 04h). There is no actual register or data stored at address 00h.
For more information on indirect addressing, see Section 2.3.
2.4.3
RTCC (Real-Time Clock/Counter)
The RTCC register (address 01h) is an 8-bit Real-Time Clock/Counter used to keep track of elapsed
time or to keep a count of transitions on the RTCC input pin. The timer operating configuration is
determined by control bits in the OPTION register.
To keep track of time, you configure the timer register to be incremented once per instruction cycle or
once per multiple of the instruction cycle. To count external events, you configure the timer register to
be incremented once per rising edge or falling edge on the RTCC input pin.
The program can read or write the register at any time. A rollover from FFh to 00h generates an
interrupt to the CPU if that condition is enabled as an interrupt.
For more information on the operation of the timer, see Section 6.2.
In the Sx18/20/28AC and Sx18/20/28AC75 devices, if you do not need to use the RTCC register, you
can optionally make the working register (W) available as a memory-mapped register at address 01h.
For details, see the description of the W register.
2.4.4
PC (Program Counter)
The PC register (address 02h) contains the lower eight bits of the 11-bit or 12-bit program counter. The
program counter is a pointer register that points to the current instruction being executed in the 2,048-
word or 4,096-word program memory. During regular program execution, the program counter is
incremented automatically once per instruction cycle. This regular sequence is altered in order to
perform skips, jumps, and subroutine calls in the application program.