
W529XX Application Note
- 15 -
EN
A "1" means "enabled", while a "0" means "disabled" for that edge of the particular TG pin. For example, the
command "LD EN, 0x0F" enables all the falling edge triggers of TG1 - TG4, while disabling the rising edge
triggers of TG1 - TG4. Users may modify the EN register during operation of the W529XX to achieve various
kinds of trigger functions, like retriggerable or not, one shot or level hold play modes, etc.
In other words the user may change the contents of the EN register during synthesis to determine which TG is
to be enabled/disabled and triggered on its falling/rising edge.
ACC
This is the register that is called the accumulator. For
ALU
operations (e.g., ADD, AND, OR, and XOR), the
ACC is modified implicitly with the same result of the destination register. For example, assume R6 equals
5(Dec), the command "ADD R6, 12" when executed gives R6 and
ACC
the same result of 17(Dec) at the end of
command processing.
OUTPUT
The OUTPUT register is used to control the status of the IO1-IO8 pins. These can be configured to be STOP
outputs by setting the proper bits in the MODE1/MODE2 registers. For example, if the IO2 pin is selected as a
STOP output, the corresponding bit, that is bit 1 of the OUTPUT register is set to drive the output buffer, an
inverted stage, to show its logic status.
This register is also used as a shift register for LED circular/random effects. See also LED Operation for more
details.
R0 - R7
These eight registers function as general purpose registers. They can be used to hold group numbers, values
for number counting, event flags, etc.
IPORT
The IPORT is not a physical register in the W529XX, but rather a register-mapped input port that shares the 8-
bit bus with other registers to facilitate reading of the port status. Pins IO1 - IO8 can be selected to act as an
input port, provided the proper settings are made to the MODE1 and MODE2 registers. Unselected bits of the
IPORT register are masked as zeros. Only one command " MV Rn, IPORT" (n: 0 - 7) can be used in
programming.
7. PORT READING
At most, 8 bits can be acquired on the data bus if the IO pins are all configured as INPUTs. The command "MV
reg, IPORT" will put the status of the port into the register "reg" for further processing. The user has to first
configure the MODE1 and MODE2 registers for the required IO selections before the proper port status can be
acquired. The following example (for reference only) shows how the port status can be manipulated.
W52905
LED1