NY6 User Manual
Ver 1.3 2019/03/28
24
Data Register
High carrier
Low carrier
Output Pin
2.9 Interrupt Generator
There is one hardware interrupt entrance in NY6 for multiple interrupt sources. The interrupt events are
derived from system base timer (BT), Timer Counter(TM), PH counter (PHC), SPI status, and comparator
status. Each one is enabled by SFR $INT0/INT1. The interrupt flag won’t be reset automatically, but write 0 to
its flag register, SFR $INTF0/INTF1. NY6 provides 4 kinds of fixed intervals from the system base timer for
interrupt source: 0.256ms, 0.512ms, 1.024ms and 16.384ms.
In Slow mode, those intervals will be multiplied
by a fixed value, typically 14. Unless interrupt of BT is enabled by $INT0, the flag will keep initial state(low).
However, the time interval from BT is enabled to first occurrence of interrupt may be not as accurate as
specified due to NY6 characteristic.
As regards other interrupt sources, their function appliances should be turned on by $ONOFF, otherwise its
block is disabled. Also, users have to enable entrances of interrupt of those appliances by $INT1. There is a
difference from BT, those interrupt flags will be able to read back even if entrance is turned off. In other words,
the flag is launched while the event is triggered and the procedure won’t jump into interrupt subroutine.
For Timer Counter interrupt, timer value ($RTML/RTMH) and timer clock source($TMCS) have to be set first,
then launch interrupt flag when timer counts to 0xFF and repeat from original timer value.
For PH counter interrupt, NY6 offers the PH of channel-1 to be a 12-bit counter and launch flag while PH
value is over 0xFFF. Note that, PH counter has to be disabled before entering Halt mode
For SPI interrupt, there are two modes to launch the flag when frame data shifted out. For User mode, the flag
goes high when the 8-bit data shifted out as common SPI protocol. For Play mode, the flag will be high when
the 80-bit (PCM audio data) or 88-bit (ADPCM encoded data) frame data shifted out.
For comparator interrupt, the flag goes high from low while the level of VIP(PA0) higher than VIN(PA1) and
keeps high until write 0 to clear flag through register $INTF1. Note that, the comparator flag will not be
launched again even if VIP keeps higher than VIN. The level of VIP has to be lower than VIN for a while and
turn high again to launch interrupt.