; The format of the input file:
; each device definition begins with a line like this:
;
;       .devicename
;
;  after it go the port definitions in this format:
;
;       portname        address
;
;  the bit definitions (optional) are represented like this:
;
;       portname.bitname  bitnumber
;
; lines beginning with a space are ignored.
; comment lines should be started with ';' character.
;
; the default device is specified at the start of the file
;
;       .default device_name
;
; all lines non conforming to the format are passed to the callback function
;
; NEC 78K0S SPECIFIC LINES
;------------------------
;
; the processor definition may include the memory configuration.
; the line format is:

;       area CLASS AREA-NAME START:END
;
; where CLASS is anything, but please use one of CODE, DATA, BSS
;       START and END are addresses, the end address is not included

; Interrupt vectors are declared in the following way:

; entry NAME ADDRESS COMMENT

.default UPD78F9046
 


.UPD789022
; U11919EJ3V0UMJ1.pdf, U11715EJ2V0DSJ1.pdf


; MEMORY MAP
area DATA ROM_      0x0000:0x1000   Internal ROM
area BSS RESERVED   0x1000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF74   Special Function Register
area BSS RESERVED   0xFF74:0xFFE0   RESERVED
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR_INTCSI0
interrupt INTST_            0x000E   INTST
interrupt INTTM0_           0x0010   INTTM0
interrupt INTTM2_           0x0014   INTTM2
interrupt INTKR_            0x002A   INTKR


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
P4               0xFF04   Port 4
P5               0xFF05   Port 5
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
SIO00            0xFF10   Transmit shift / Receive buffer register 00
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 Pin Input/Output Mode Selection
PM0.PM06          6   P06 Pin Input/Output Mode Selection
PM0.PM05          5   P05 Pin Input/Output Mode Selection
PM0.PM04          4   P04 Pin Input/Output Mode Selection
PM0.PM03          3   P03 Pin Input/Output Mode Selection
PM0.PM02          2   P02 Pin Input/Output Mode Selection
PM0.PM01          1   P01 Pin Input/Output Mode Selection
PM0.PM00          0   P00 Pin Input/Output Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM17          7   P17 Pin Input/Output Mode Selection
PM1.PM16          6   P16 Pin Input/Output Mode Selection
PM1.PM15          5   P15 Pin Input/Output Mode Selection
PM1.PM14          4   P14 Pin Input/Output Mode Selection
PM1.PM13          3   P13 Pin Input/Output Mode Selection
PM1.PM12          2   P12 Pin Input/Output Mode Selection
PM1.PM11          1   P11 Pin Input/Output Mode Selection
PM1.PM10          0   P10 Pin Input/Output Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM22          2   P22 Pin Input/Output Mode Selection
PM2.PM21          1   P21 Pin Input/Output Mode Selection
PM2.PM20          0   P20 Pin Input/Output Mode Selection
PM3              0xFF23   Port mode register 3
PM3.PM32          2   P32 Pin Input/Output Mode Selection
PM3.PM31          1   P31 Pin Input/Output Mode Selection
PM3.PM30          0   P30 Pin Input/Output Mode Selection
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 Pin Input/Output Mode Selection
PM4.PM46          6   P46 Pin Input/Output Mode Selection
PM4.PM45          5   P45 Pin Input/Output Mode Selection
PM4.PM44          4   P44 Pin Input/Output Mode Selection
PM4.PM43          3   P43 Pin Input/Output Mode Selection
PM4.PM42          2   P42 Pin Input/Output Mode Selection
PM4.PM41          1   P41 Pin Input/Output Mode Selection
PM4.PM40          0   P40 Pin Input/Output Mode Selection
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 Pin Input/Output Mode Selection
PM5.PM52          2   P52 Pin Input/Output Mode Selection
PM5.PM51          1   P51 Pin Input/Output Mode Selection
PM5.PM50          0   P50 Pin Input/Output Mode Selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock select register 2
TCL2.TCL22        2   Watchdog Timer Count Clock Selection bit 2
TCL2.TCL21        1   Watchdog Timer Count Clock Selection bit 1
TCL2.TCL20        0   Watchdog Timer Count Clock Selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer counter 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   8-Bit Timer Counter 00 Operation Control
TMC00.TCL001      2   8-Bit Timer Counter 00 Count Clock Selection bit 1
TMC00.TCL000      1   8-Bit Timer Counter 00 Count Clock Selection bit 0
TMC00.TOE00       0   8-Bit Timer/Event Counter 00 Output Control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
TMC20            0xFF5B   16-bit timer mode control register 20
TMC20.TOD20       7   Timer Output Data
TMC20.TOF20       6   Overflow Flag Set
TMC20.CPT201      5   Capture Edge Selection bit 1
TMC20.CPT200      4   Capture Edge Selection bit 0
TMC20.TOC20       3   Timer Output Data Inverse Control
TMC20.TCL201      2   16-bit Timer Counter 20 Count Clock Selection bit 1
TMC20.TCL200      1   16-bit Timer Counter 20 Count Clock Selection bit 0
TMC20.TOE20       0   16-bit Timer 20 Output Control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7   Transmit Operation Control
ASIM00.RXE00      6   Receive Operation Control
ASIM00.PS001      5   Parity Bit Specification bit 1
ASIM00.PS000      4   Parity Bit Specification bit 0
ASIM00.CL00       3   Character Length Specification
ASIM00.SL00       2   Transmit Data Stop Bit Length Specification
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2    Parity Error Flag
ASIS00.FE00       1    Flaming Error Flag
ASIS00.OVE00      0    Overrun Error Flag
CSIM00           0xFF72   Serial operation mode register 00
CSIM00.CSIE00     7    Operation Control in 3-Wire Serial I/O Mode
CSIM00.DIR00      2    Start bit specification                  
CSIM00.CSCK00     1    Clock selection in 3-wire serial I/O mode
BRGC00           0xFF73   Baud rate generator control register 00
BRGC00.TPS003     7   3-Bit Counter Source Clock Selection bit 3
BRGC00.TPS002     6   3-Bit Counter Source Clock Selection bit 2
BRGC00.TPS001     5   3-Bit Counter Source Clock Selection bit 1
BRGC00.TPS000     4   3-Bit Counter Source Clock Selection bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF00        6   TMIF00 - Interrupt Request Flag
IF0.STIF00        5   STIF00 - Interrupt Request Flag
IF0.SRIF00        4   SRIF00 - Interrupt Request Flag
IF0.PIF2          3   PIF2 - Interrupt Request Flag
IF0.PIF1          2   PIF1 - Interrupt Request Flag
IF0.PIF0          1   PIF0 - Interrupt Request Flag
IF0.TMIF4         0   TMIF4 - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.TMIF20        7   TMIF20 - Interrupt Request Flag
IF1.KRIF00        0   KRIF00 - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK00        6   TMMK00 - Interrupt Servicing Control
MK0.STMK00        5   STMK00 - Interrupt Servicing Control
MK0.SRMK00        4   SRMK00 - Interrupt Servicing Control
MK0.PMK2          3   PMK2 - Interrupt Servicing Control
MK0.PMK1          2   PMK1 - Interrupt Servicing Control
MK0.PMK0          1   PMK0 - Interrupt Servicing Control
MK0.TMMK4         0   TMMK4 - Interrupt Servicing Control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.TMMK20        7   TMMK20 - Interrupt Servicing Control
MK1.KRMK00        0   KRMK00 - Interrupt Servicing Control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 Valid Edge Selection bit 1
INTM0.ES20        6   INTP2 Valid Edge Selection bit 0
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP0 Valid Edge Selection bit 1
INTM0.ES00        2   INTP0 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM007      7   Key Return Signal Detection Selection bit 7
KRM00.KRM006      6   Key Return Signal Detection Selection bit 6
KRM00.KRM005      5   Key Return Signal Detection Selection bit 5
KRM00.KRM004      4   Key Return Signal Detection Selection bit 4
KRM00.KRM000      0   Key Return Signal Detection Selection bit 0
RESERVEDFFF6     0xFFF6   RESERVED
PUO              0xFFF7   Pull-up resistor option register
PUO.PUO5          5   Port 5 On-Chip Pull-Up Resistor Selection
PUO.PUO4          4   Port 4 On-Chip Pull-Up Resistor Selection
PUO.PUO3          3   Port 3 On-Chip Pull-Up Resistor Selection
PUO.PUO2          2   Port 2 On-Chip Pull-Up Resistor Selection
PUO.PUO1          1   Port 1 On-Chip Pull-Up Resistor Selection
PUO.PUO0          0   Port 0 On-Chip Pull-Up Resistor Selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects Operation of Watchdog Timer
WDTM.WDTM4        4   Selects Operation Mode of Watchdog Timer bit 4
WDTM.WDTM3        3   Selects Operation Mode of Watchdog Timer bit 3
OSTS             0xFFFA   Oscillation settling time select register
OSTS.OSTS2        2   Oscillation Settling Time Selection bit 2
OSTS.OSTS1        1   Oscillation Settling Time Selection bit 1
OSTS.OSTS0        0   Oscillation Settling Time Selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789024
; U11919EJ3V0UMJ1.pdf, U11715EJ2V0DSJ1.pdf


; MEMORY MAP
area DATA ROM_      0x0000:0x2000   Internal ROM
area BSS RESERVED   0x2000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF74   Special Function Register
area BSS RESERVED   0xFF74:0xFFE0   RESERVED
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR_INTCSI0
interrupt INTST_            0x000E   INTST
interrupt INTTM0_           0x0010   INTTM0
interrupt INTTM2_           0x0014   INTTM2
interrupt INTKR_            0x002A   INTKR


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
P4               0xFF04   Port 4
P5               0xFF05   Port 5
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
SIO00            0xFF10   Transmit shift / Receive buffer register 00
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 Pin Input/Output Mode Selection
PM0.PM06          6   P06 Pin Input/Output Mode Selection
PM0.PM05          5   P05 Pin Input/Output Mode Selection
PM0.PM04          4   P04 Pin Input/Output Mode Selection
PM0.PM03          3   P03 Pin Input/Output Mode Selection
PM0.PM02          2   P02 Pin Input/Output Mode Selection
PM0.PM01          1   P01 Pin Input/Output Mode Selection
PM0.PM00          0   P00 Pin Input/Output Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM17          7   P17 Pin Input/Output Mode Selection
PM1.PM16          6   P16 Pin Input/Output Mode Selection
PM1.PM15          5   P15 Pin Input/Output Mode Selection
PM1.PM14          4   P14 Pin Input/Output Mode Selection
PM1.PM13          3   P13 Pin Input/Output Mode Selection
PM1.PM12          2   P12 Pin Input/Output Mode Selection
PM1.PM11          1   P11 Pin Input/Output Mode Selection
PM1.PM10          0   P10 Pin Input/Output Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM22          2   P22 Pin Input/Output Mode Selection
PM2.PM21          1   P21 Pin Input/Output Mode Selection
PM2.PM20          0   P20 Pin Input/Output Mode Selection
PM3              0xFF23   Port mode register 3
PM3.PM32          2   P32 Pin Input/Output Mode Selection
PM3.PM31          1   P31 Pin Input/Output Mode Selection
PM3.PM30          0   P30 Pin Input/Output Mode Selection
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 Pin Input/Output Mode Selection
PM4.PM46          6   P46 Pin Input/Output Mode Selection
PM4.PM45          5   P45 Pin Input/Output Mode Selection
PM4.PM44          4   P44 Pin Input/Output Mode Selection
PM4.PM43          3   P43 Pin Input/Output Mode Selection
PM4.PM42          2   P42 Pin Input/Output Mode Selection
PM4.PM41          1   P41 Pin Input/Output Mode Selection
PM4.PM40          0   P40 Pin Input/Output Mode Selection
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 Pin Input/Output Mode Selection
PM5.PM52          2   P52 Pin Input/Output Mode Selection
PM5.PM51          1   P51 Pin Input/Output Mode Selection
PM5.PM50          0   P50 Pin Input/Output Mode Selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock select register 2
TCL2.TCL22        2   Watchdog Timer Count Clock Selection bit 2
TCL2.TCL21        1   Watchdog Timer Count Clock Selection bit 1
TCL2.TCL20        0   Watchdog Timer Count Clock Selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer counter 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   8-Bit Timer Counter 00 Operation Control
TMC00.TCL001      2   8-Bit Timer Counter 00 Count Clock Selection bit 1
TMC00.TCL000      1   8-Bit Timer Counter 00 Count Clock Selection bit 0
TMC00.TOE00       0   8-Bit Timer/Event Counter 00 Output Control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
TMC20            0xFF5B   16-bit timer mode control register 20
TMC20.TOD20       7   Timer Output Data
TMC20.TOF20       6   Overflow Flag Set
TMC20.CPT201      5   Capture Edge Selection bit 1
TMC20.CPT200      4   Capture Edge Selection bit 0
TMC20.TOC20       3   Timer Output Data Inverse Control
TMC20.TCL201      2   16-bit Timer Counter 20 Count Clock Selection bit 1
TMC20.TCL200      1   16-bit Timer Counter 20 Count Clock Selection bit 0
TMC20.TOE20       0   16-bit Timer 20 Output Control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7   Transmit Operation Control
ASIM00.RXE00      6   Receive Operation Control
ASIM00.PS001      5   Parity Bit Specification bit 1
ASIM00.PS000      4   Parity Bit Specification bit 0
ASIM00.CL00       3   Character Length Specification
ASIM00.SL00       2   Transmit Data Stop Bit Length Specification
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2    Parity Error Flag
ASIS00.FE00       1    Flaming Error Flag
ASIS00.OVE00      0    Overrun Error Flag
CSIM00           0xFF72   Serial operation mode register 00
CSIM00.CSIE00     7    Operation Control in 3-Wire Serial I/O Mode
CSIM00.DIR00      2    Start bit specification                  
CSIM00.CSCK00     1    Clock selection in 3-wire serial I/O mode
BRGC00           0xFF73   Baud rate generator control register 00
BRGC00.TPS003     7   3-Bit Counter Source Clock Selection bit 3
BRGC00.TPS002     6   3-Bit Counter Source Clock Selection bit 2
BRGC00.TPS001     5   3-Bit Counter Source Clock Selection bit 1
BRGC00.TPS000     4   3-Bit Counter Source Clock Selection bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF00        6   TMIF00 - Interrupt Request Flag
IF0.STIF00        5   STIF00 - Interrupt Request Flag
IF0.SRIF00        4   SRIF00 - Interrupt Request Flag
IF0.PIF2          3   PIF2 - Interrupt Request Flag
IF0.PIF1          2   PIF1 - Interrupt Request Flag
IF0.PIF0          1   PIF0 - Interrupt Request Flag
IF0.TMIF4         0   TMIF4 - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.TMIF20        7   TMIF20 - Interrupt Request Flag
IF1.KRIF00        0   KRIF00 - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK00        6   TMMK00 - Interrupt Servicing Control
MK0.STMK00        5   STMK00 - Interrupt Servicing Control
MK0.SRMK00        4   SRMK00 - Interrupt Servicing Control
MK0.PMK2          3   PMK2 - Interrupt Servicing Control
MK0.PMK1          2   PMK1 - Interrupt Servicing Control
MK0.PMK0          1   PMK0 - Interrupt Servicing Control
MK0.TMMK4         0   TMMK4 - Interrupt Servicing Control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.TMMK20        7   TMMK20 - Interrupt Servicing Control
MK1.KRMK00        0   KRMK00 - Interrupt Servicing Control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 Valid Edge Selection bit 1
INTM0.ES20        6   INTP2 Valid Edge Selection bit 0
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP0 Valid Edge Selection bit 1
INTM0.ES00        2   INTP0 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM007      7   Key Return Signal Detection Selection bit 7
KRM00.KRM006      6   Key Return Signal Detection Selection bit 6
KRM00.KRM005      5   Key Return Signal Detection Selection bit 5
KRM00.KRM004      4   Key Return Signal Detection Selection bit 4
KRM00.KRM000      0   Key Return Signal Detection Selection bit 0
RESERVEDFFF6     0xFFF6   RESERVED
PUO              0xFFF7   Pull-up resistor option register
PUO.PUO5          5   Port 5 On-Chip Pull-Up Resistor Selection
PUO.PUO4          4   Port 4 On-Chip Pull-Up Resistor Selection
PUO.PUO3          3   Port 3 On-Chip Pull-Up Resistor Selection
PUO.PUO2          2   Port 2 On-Chip Pull-Up Resistor Selection
PUO.PUO1          1   Port 1 On-Chip Pull-Up Resistor Selection
PUO.PUO0          0   Port 0 On-Chip Pull-Up Resistor Selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects Operation of Watchdog Timer
WDTM.WDTM4        4   Selects Operation Mode of Watchdog Timer bit 4
WDTM.WDTM3        3   Selects Operation Mode of Watchdog Timer bit 3
OSTS             0xFFFA   Oscillation settling time select register
OSTS.OSTS2        2   Oscillation Settling Time Selection bit 2
OSTS.OSTS1        1   Oscillation Settling Time Selection bit 1
OSTS.OSTS0        0   Oscillation Settling Time Selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789025
; U11919EJ3V0UMJ1.pdf, U11715EJ2V0DSJ1.pdf


; MEMORY MAP
area DATA ROM_      0x0000:0x3000   Internal ROM
area BSS RESERVED   0x3000:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF74   Special Function Register
area BSS RESERVED   0xFF74:0xFFE0   RESERVED
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR_INTCSI0
interrupt INTST_            0x000E   INTST
interrupt INTTM0_           0x0010   INTTM0
interrupt INTTM2_           0x0014   INTTM2
interrupt INTKR_            0x002A   INTKR


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
P4               0xFF04   Port 4
P5               0xFF05   Port 5
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
SIO00            0xFF10   Transmit shift / Receive buffer register 00
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 Pin Input/Output Mode Selection
PM0.PM06          6   P06 Pin Input/Output Mode Selection
PM0.PM05          5   P05 Pin Input/Output Mode Selection
PM0.PM04          4   P04 Pin Input/Output Mode Selection
PM0.PM03          3   P03 Pin Input/Output Mode Selection
PM0.PM02          2   P02 Pin Input/Output Mode Selection
PM0.PM01          1   P01 Pin Input/Output Mode Selection
PM0.PM00          0   P00 Pin Input/Output Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM17          7   P17 Pin Input/Output Mode Selection
PM1.PM16          6   P16 Pin Input/Output Mode Selection
PM1.PM15          5   P15 Pin Input/Output Mode Selection
PM1.PM14          4   P14 Pin Input/Output Mode Selection
PM1.PM13          3   P13 Pin Input/Output Mode Selection
PM1.PM12          2   P12 Pin Input/Output Mode Selection
PM1.PM11          1   P11 Pin Input/Output Mode Selection
PM1.PM10          0   P10 Pin Input/Output Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM22          2   P22 Pin Input/Output Mode Selection
PM2.PM21          1   P21 Pin Input/Output Mode Selection
PM2.PM20          0   P20 Pin Input/Output Mode Selection
PM3              0xFF23   Port mode register 3
PM3.PM32          2   P32 Pin Input/Output Mode Selection
PM3.PM31          1   P31 Pin Input/Output Mode Selection
PM3.PM30          0   P30 Pin Input/Output Mode Selection
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 Pin Input/Output Mode Selection
PM4.PM46          6   P46 Pin Input/Output Mode Selection
PM4.PM45          5   P45 Pin Input/Output Mode Selection
PM4.PM44          4   P44 Pin Input/Output Mode Selection
PM4.PM43          3   P43 Pin Input/Output Mode Selection
PM4.PM42          2   P42 Pin Input/Output Mode Selection
PM4.PM41          1   P41 Pin Input/Output Mode Selection
PM4.PM40          0   P40 Pin Input/Output Mode Selection
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 Pin Input/Output Mode Selection
PM5.PM52          2   P52 Pin Input/Output Mode Selection
PM5.PM51          1   P51 Pin Input/Output Mode Selection
PM5.PM50          0   P50 Pin Input/Output Mode Selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock select register 2
TCL2.TCL22        2   Watchdog Timer Count Clock Selection bit 2
TCL2.TCL21        1   Watchdog Timer Count Clock Selection bit 1
TCL2.TCL20        0   Watchdog Timer Count Clock Selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer counter 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   8-Bit Timer Counter 00 Operation Control
TMC00.TCL001      2   8-Bit Timer Counter 00 Count Clock Selection bit 1
TMC00.TCL000      1   8-Bit Timer Counter 00 Count Clock Selection bit 0
TMC00.TOE00       0   8-Bit Timer/Event Counter 00 Output Control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
TMC20            0xFF5B   16-bit timer mode control register 20
TMC20.TOD20       7   Timer Output Data
TMC20.TOF20       6   Overflow Flag Set
TMC20.CPT201      5   Capture Edge Selection bit 1
TMC20.CPT200      4   Capture Edge Selection bit 0
TMC20.TOC20       3   Timer Output Data Inverse Control
TMC20.TCL201      2   16-bit Timer Counter 20 Count Clock Selection bit 1
TMC20.TCL200      1   16-bit Timer Counter 20 Count Clock Selection bit 0
TMC20.TOE20       0   16-bit Timer 20 Output Control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7   Transmit Operation Control
ASIM00.RXE00      6   Receive Operation Control
ASIM00.PS001      5   Parity Bit Specification bit 1
ASIM00.PS000      4   Parity Bit Specification bit 0
ASIM00.CL00       3   Character Length Specification
ASIM00.SL00       2   Transmit Data Stop Bit Length Specification
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2    Parity Error Flag
ASIS00.FE00       1    Flaming Error Flag
ASIS00.OVE00      0    Overrun Error Flag
CSIM00           0xFF72   Serial operation mode register 00
CSIM00.CSIE00     7    Operation Control in 3-Wire Serial I/O Mode
CSIM00.DIR00      2    Start bit specification                  
CSIM00.CSCK00     1    Clock selection in 3-wire serial I/O mode
BRGC00           0xFF73   Baud rate generator control register 00
BRGC00.TPS003     7   3-Bit Counter Source Clock Selection bit 3
BRGC00.TPS002     6   3-Bit Counter Source Clock Selection bit 2
BRGC00.TPS001     5   3-Bit Counter Source Clock Selection bit 1
BRGC00.TPS000     4   3-Bit Counter Source Clock Selection bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF00        6   TMIF00 - Interrupt Request Flag
IF0.STIF00        5   STIF00 - Interrupt Request Flag
IF0.SRIF00        4   SRIF00 - Interrupt Request Flag
IF0.PIF2          3   PIF2 - Interrupt Request Flag
IF0.PIF1          2   PIF1 - Interrupt Request Flag
IF0.PIF0          1   PIF0 - Interrupt Request Flag
IF0.TMIF4         0   TMIF4 - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.TMIF20        7   TMIF20 - Interrupt Request Flag
IF1.KRIF00        0   KRIF00 - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK00        6   TMMK00 - Interrupt Servicing Control
MK0.STMK00        5   STMK00 - Interrupt Servicing Control
MK0.SRMK00        4   SRMK00 - Interrupt Servicing Control
MK0.PMK2          3   PMK2 - Interrupt Servicing Control
MK0.PMK1          2   PMK1 - Interrupt Servicing Control
MK0.PMK0          1   PMK0 - Interrupt Servicing Control
MK0.TMMK4         0   TMMK4 - Interrupt Servicing Control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.TMMK20        7   TMMK20 - Interrupt Servicing Control
MK1.KRMK00        0   KRMK00 - Interrupt Servicing Control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 Valid Edge Selection bit 1
INTM0.ES20        6   INTP2 Valid Edge Selection bit 0
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP0 Valid Edge Selection bit 1
INTM0.ES00        2   INTP0 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM007      7   Key Return Signal Detection Selection bit 7
KRM00.KRM006      6   Key Return Signal Detection Selection bit 6
KRM00.KRM005      5   Key Return Signal Detection Selection bit 5
KRM00.KRM004      4   Key Return Signal Detection Selection bit 4
KRM00.KRM000      0   Key Return Signal Detection Selection bit 0
RESERVEDFFF6     0xFFF6   RESERVED
PUO              0xFFF7   Pull-up resistor option register
PUO.PUO5          5   Port 5 On-Chip Pull-Up Resistor Selection
PUO.PUO4          4   Port 4 On-Chip Pull-Up Resistor Selection
PUO.PUO3          3   Port 3 On-Chip Pull-Up Resistor Selection
PUO.PUO2          2   Port 2 On-Chip Pull-Up Resistor Selection
PUO.PUO1          1   Port 1 On-Chip Pull-Up Resistor Selection
PUO.PUO0          0   Port 0 On-Chip Pull-Up Resistor Selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects Operation of Watchdog Timer
WDTM.WDTM4        4   Selects Operation Mode of Watchdog Timer bit 4
WDTM.WDTM3        3   Selects Operation Mode of Watchdog Timer bit 3
OSTS             0xFFFA   Oscillation settling time select register
OSTS.OSTS2        2   Oscillation Settling Time Selection bit 2
OSTS.OSTS1        1   Oscillation Settling Time Selection bit 1
OSTS.OSTS0        0   Oscillation Settling Time Selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789025_A
; U11919EJ3V0UMJ1.pdf
.UPD789026
; U11919EJ3V0UMJ1.pdf, U11715EJ2V0DSJ1.pdf


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF74   Special Function Register
area BSS RESERVED   0xFF74:0xFFE0   RESERVED
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR_INTCSI0
interrupt INTST_            0x000E   INTST
interrupt INTTM0_           0x0010   INTTM0
interrupt INTTM2_           0x0014   INTTM2
interrupt INTKR_            0x002A   INTKR


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
P4               0xFF04   Port 4
P5               0xFF05   Port 5
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
SIO00            0xFF10   Transmit shift / Receive buffer register 00
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 Pin Input/Output Mode Selection
PM0.PM06          6   P06 Pin Input/Output Mode Selection
PM0.PM05          5   P05 Pin Input/Output Mode Selection
PM0.PM04          4   P04 Pin Input/Output Mode Selection
PM0.PM03          3   P03 Pin Input/Output Mode Selection
PM0.PM02          2   P02 Pin Input/Output Mode Selection
PM0.PM01          1   P01 Pin Input/Output Mode Selection
PM0.PM00          0   P00 Pin Input/Output Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM17          7   P17 Pin Input/Output Mode Selection
PM1.PM16          6   P16 Pin Input/Output Mode Selection
PM1.PM15          5   P15 Pin Input/Output Mode Selection
PM1.PM14          4   P14 Pin Input/Output Mode Selection
PM1.PM13          3   P13 Pin Input/Output Mode Selection
PM1.PM12          2   P12 Pin Input/Output Mode Selection
PM1.PM11          1   P11 Pin Input/Output Mode Selection
PM1.PM10          0   P10 Pin Input/Output Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM22          2   P22 Pin Input/Output Mode Selection
PM2.PM21          1   P21 Pin Input/Output Mode Selection
PM2.PM20          0   P20 Pin Input/Output Mode Selection
PM3              0xFF23   Port mode register 3
PM3.PM32          2   P32 Pin Input/Output Mode Selection
PM3.PM31          1   P31 Pin Input/Output Mode Selection
PM3.PM30          0   P30 Pin Input/Output Mode Selection
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 Pin Input/Output Mode Selection
PM4.PM46          6   P46 Pin Input/Output Mode Selection
PM4.PM45          5   P45 Pin Input/Output Mode Selection
PM4.PM44          4   P44 Pin Input/Output Mode Selection
PM4.PM43          3   P43 Pin Input/Output Mode Selection
PM4.PM42          2   P42 Pin Input/Output Mode Selection
PM4.PM41          1   P41 Pin Input/Output Mode Selection
PM4.PM40          0   P40 Pin Input/Output Mode Selection
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 Pin Input/Output Mode Selection
PM5.PM52          2   P52 Pin Input/Output Mode Selection
PM5.PM51          1   P51 Pin Input/Output Mode Selection
PM5.PM50          0   P50 Pin Input/Output Mode Selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock select register 2
TCL2.TCL22        2   Watchdog Timer Count Clock Selection bit 2
TCL2.TCL21        1   Watchdog Timer Count Clock Selection bit 1
TCL2.TCL20        0   Watchdog Timer Count Clock Selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer counter 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   8-Bit Timer Counter 00 Operation Control
TMC00.TCL001      2   8-Bit Timer Counter 00 Count Clock Selection bit 1
TMC00.TCL000      1   8-Bit Timer Counter 00 Count Clock Selection bit 0
TMC00.TOE00       0   8-Bit Timer/Event Counter 00 Output Control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
TMC20            0xFF5B   16-bit timer mode control register 20
TMC20.TOD20       7   Timer Output Data
TMC20.TOF20       6   Overflow Flag Set
TMC20.CPT201      5   Capture Edge Selection bit 1
TMC20.CPT200      4   Capture Edge Selection bit 0
TMC20.TOC20       3   Timer Output Data Inverse Control
TMC20.TCL201      2   16-bit Timer Counter 20 Count Clock Selection bit 1
TMC20.TCL200      1   16-bit Timer Counter 20 Count Clock Selection bit 0
TMC20.TOE20       0   16-bit Timer 20 Output Control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7   Transmit Operation Control
ASIM00.RXE00      6   Receive Operation Control
ASIM00.PS001      5   Parity Bit Specification bit 1
ASIM00.PS000      4   Parity Bit Specification bit 0
ASIM00.CL00       3   Character Length Specification
ASIM00.SL00       2   Transmit Data Stop Bit Length Specification
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2    Parity Error Flag
ASIS00.FE00       1    Flaming Error Flag
ASIS00.OVE00      0    Overrun Error Flag
CSIM00           0xFF72   Serial operation mode register 00
CSIM00.CSIE00     7    Operation Control in 3-Wire Serial I/O Mode
CSIM00.DIR00      2    Start bit specification                  
CSIM00.CSCK00     1    Clock selection in 3-wire serial I/O mode
BRGC00           0xFF73   Baud rate generator control register 00
BRGC00.TPS003     7   3-Bit Counter Source Clock Selection bit 3
BRGC00.TPS002     6   3-Bit Counter Source Clock Selection bit 2
BRGC00.TPS001     5   3-Bit Counter Source Clock Selection bit 1
BRGC00.TPS000     4   3-Bit Counter Source Clock Selection bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF00        6   TMIF00 - Interrupt Request Flag
IF0.STIF00        5   STIF00 - Interrupt Request Flag
IF0.SRIF00        4   SRIF00 - Interrupt Request Flag
IF0.PIF2          3   PIF2 - Interrupt Request Flag
IF0.PIF1          2   PIF1 - Interrupt Request Flag
IF0.PIF0          1   PIF0 - Interrupt Request Flag
IF0.TMIF4         0   TMIF4 - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.TMIF20        7   TMIF20 - Interrupt Request Flag
IF1.KRIF00        0   KRIF00 - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK00        6   TMMK00 - Interrupt Servicing Control
MK0.STMK00        5   STMK00 - Interrupt Servicing Control
MK0.SRMK00        4   SRMK00 - Interrupt Servicing Control
MK0.PMK2          3   PMK2 - Interrupt Servicing Control
MK0.PMK1          2   PMK1 - Interrupt Servicing Control
MK0.PMK0          1   PMK0 - Interrupt Servicing Control
MK0.TMMK4         0   TMMK4 - Interrupt Servicing Control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.TMMK20        7   TMMK20 - Interrupt Servicing Control
MK1.KRMK00        0   KRMK00 - Interrupt Servicing Control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 Valid Edge Selection bit 1
INTM0.ES20        6   INTP2 Valid Edge Selection bit 0
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP0 Valid Edge Selection bit 1
INTM0.ES00        2   INTP0 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM007      7   Key Return Signal Detection Selection bit 7
KRM00.KRM006      6   Key Return Signal Detection Selection bit 6
KRM00.KRM005      5   Key Return Signal Detection Selection bit 5
KRM00.KRM004      4   Key Return Signal Detection Selection bit 4
KRM00.KRM000      0   Key Return Signal Detection Selection bit 0
RESERVEDFFF6     0xFFF6   RESERVED
PUO              0xFFF7   Pull-up resistor option register
PUO.PUO5          5   Port 5 On-Chip Pull-Up Resistor Selection
PUO.PUO4          4   Port 4 On-Chip Pull-Up Resistor Selection
PUO.PUO3          3   Port 3 On-Chip Pull-Up Resistor Selection
PUO.PUO2          2   Port 2 On-Chip Pull-Up Resistor Selection
PUO.PUO1          1   Port 1 On-Chip Pull-Up Resistor Selection
PUO.PUO0          0   Port 0 On-Chip Pull-Up Resistor Selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects Operation of Watchdog Timer
WDTM.WDTM4        4   Selects Operation Mode of Watchdog Timer bit 4
WDTM.WDTM3        3   Selects Operation Mode of Watchdog Timer bit 3
OSTS             0xFFFA   Oscillation settling time select register
OSTS.OSTS2        2   Oscillation Settling Time Selection bit 2
OSTS.OSTS1        1   Oscillation Settling Time Selection bit 1
OSTS.OSTS0        0   Oscillation Settling Time Selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789026_A
; U11919EJ3V0UMJ1.pdf
.UPD78F9026_A
; U11919EJ3V0UMJ1.pdf, U14356EJ1V0DSJ1.pdf


; MEMORY MAP
area DATA FLASH_    0x0000:0x4000   Internal Flash Memory
area BSS RESERVED   0x4000:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF74   Special Function Register
area BSS RESERVED   0xFF74:0xFFE0   RESERVED
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR_INTCSI0
interrupt INTST_            0x000E   INTST
interrupt INTTM0_           0x0010   INTTM0
interrupt INTTM2_           0x0014   INTTM2
interrupt INTKR_            0x002A   INTKR


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
P4               0xFF04   Port 4
P5               0xFF05   Port 5
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
SIO00            0xFF10   Transmit shift / Receive buffer register 00
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 Pin Input/Output Mode Selection
PM0.PM06          6   P06 Pin Input/Output Mode Selection
PM0.PM05          5   P05 Pin Input/Output Mode Selection
PM0.PM04          4   P04 Pin Input/Output Mode Selection
PM0.PM03          3   P03 Pin Input/Output Mode Selection
PM0.PM02          2   P02 Pin Input/Output Mode Selection
PM0.PM01          1   P01 Pin Input/Output Mode Selection
PM0.PM00          0   P00 Pin Input/Output Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM17          7   P17 Pin Input/Output Mode Selection
PM1.PM16          6   P16 Pin Input/Output Mode Selection
PM1.PM15          5   P15 Pin Input/Output Mode Selection
PM1.PM14          4   P14 Pin Input/Output Mode Selection
PM1.PM13          3   P13 Pin Input/Output Mode Selection
PM1.PM12          2   P12 Pin Input/Output Mode Selection
PM1.PM11          1   P11 Pin Input/Output Mode Selection
PM1.PM10          0   P10 Pin Input/Output Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM22          2   P22 Pin Input/Output Mode Selection
PM2.PM21          1   P21 Pin Input/Output Mode Selection
PM2.PM20          0   P20 Pin Input/Output Mode Selection
PM3              0xFF23   Port mode register 3
PM3.PM32          2   P32 Pin Input/Output Mode Selection
PM3.PM31          1   P31 Pin Input/Output Mode Selection
PM3.PM30          0   P30 Pin Input/Output Mode Selection
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 Pin Input/Output Mode Selection
PM4.PM46          6   P46 Pin Input/Output Mode Selection
PM4.PM45          5   P45 Pin Input/Output Mode Selection
PM4.PM44          4   P44 Pin Input/Output Mode Selection
PM4.PM43          3   P43 Pin Input/Output Mode Selection
PM4.PM42          2   P42 Pin Input/Output Mode Selection
PM4.PM41          1   P41 Pin Input/Output Mode Selection
PM4.PM40          0   P40 Pin Input/Output Mode Selection
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 Pin Input/Output Mode Selection
PM5.PM52          2   P52 Pin Input/Output Mode Selection
PM5.PM51          1   P51 Pin Input/Output Mode Selection
PM5.PM50          0   P50 Pin Input/Output Mode Selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock select register 2
TCL2.TCL22        2   Watchdog Timer Count Clock Selection bit 2
TCL2.TCL21        1   Watchdog Timer Count Clock Selection bit 1
TCL2.TCL20        0   Watchdog Timer Count Clock Selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer counter 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   8-Bit Timer Counter 00 Operation Control
TMC00.TCL001      2   8-Bit Timer Counter 00 Count Clock Selection bit 1
TMC00.TCL000      1   8-Bit Timer Counter 00 Count Clock Selection bit 0
TMC00.TOE00       0   8-Bit Timer/Event Counter 00 Output Control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
TMC20            0xFF5B   16-bit timer mode control register 20
TMC20.TOD20       7   Timer Output Data
TMC20.TOF20       6   Overflow Flag Set
TMC20.CPT201      5   Capture Edge Selection bit 1
TMC20.CPT200      4   Capture Edge Selection bit 0
TMC20.TOC20       3   Timer Output Data Inverse Control
TMC20.TCL201      2   16-bit Timer Counter 20 Count Clock Selection bit 1
TMC20.TCL200      1   16-bit Timer Counter 20 Count Clock Selection bit 0
TMC20.TOE20       0   16-bit Timer 20 Output Control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7   Transmit Operation Control
ASIM00.RXE00      6   Receive Operation Control
ASIM00.PS001      5   Parity Bit Specification bit 1
ASIM00.PS000      4   Parity Bit Specification bit 0
ASIM00.CL00       3   Character Length Specification
ASIM00.SL00       2   Transmit Data Stop Bit Length Specification
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2    Parity Error Flag
ASIS00.FE00       1    Flaming Error Flag
ASIS00.OVE00      0    Overrun Error Flag
CSIM00           0xFF72   Serial operation mode register 00
CSIM00.CSIE00     7    Operation Control in 3-Wire Serial I/O Mode
CSIM00.DIR00      2    Start bit specification
CSIM00.CSCK00     1    Clock selection in 3-wire serial I/O mode
BRGC00           0xFF73   Baud rate generator control register 00
BRGC00.TPS003     7   3-Bit Counter Source Clock Selection bit 3
BRGC00.TPS002     6   3-Bit Counter Source Clock Selection bit 2
BRGC00.TPS001     5   3-Bit Counter Source Clock Selection bit 1
BRGC00.TPS000     4   3-Bit Counter Source Clock Selection bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF00        6   TMIF00 - Interrupt Request Flag
IF0.STIF00        5   STIF00 - Interrupt Request Flag
IF0.SRIF00        4   SRIF00 - Interrupt Request Flag
IF0.PIF2          3   PIF2 - Interrupt Request Flag
IF0.PIF1          2   PIF1 - Interrupt Request Flag
IF0.PIF0          1   PIF0 - Interrupt Request Flag
IF0.TMIF4         0   TMIF4 - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.TMIF20        7   TMIF20 - Interrupt Request Flag
IF1.KRIF00        0   KRIF00 - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK00        6   TMMK00 - Interrupt Servicing Control
MK0.STMK00        5   STMK00 - Interrupt Servicing Control
MK0.SRMK00        4   SRMK00 - Interrupt Servicing Control
MK0.PMK2          3   PMK2 - Interrupt Servicing Control
MK0.PMK1          2   PMK1 - Interrupt Servicing Control
MK0.PMK0          1   PMK0 - Interrupt Servicing Control
MK0.TMMK4         0   TMMK4 - Interrupt Servicing Control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.TMMK20        7   TMMK20 - Interrupt Servicing Control
MK1.KRMK00        0   KRMK00 - Interrupt Servicing Control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 Valid Edge Selection bit 1
INTM0.ES20        6   INTP2 Valid Edge Selection bit 0
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP0 Valid Edge Selection bit 1
INTM0.ES00        2   INTP0 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM007      7   Key Return Signal Detection Selection bit 7
KRM00.KRM006      6   Key Return Signal Detection Selection bit 6
KRM00.KRM005      5   Key Return Signal Detection Selection bit 5
KRM00.KRM004      4   Key Return Signal Detection Selection bit 4
KRM00.KRM000      0   Key Return Signal Detection Selection bit 0
RESERVEDFFF6     0xFFF6   RESERVED
PUO              0xFFF7   Pull-up resistor option register
PUO.PUO5          5   Port 5 On-Chip Pull-Up Resistor Selection
PUO.PUO4          4   Port 4 On-Chip Pull-Up Resistor Selection
PUO.PUO3          3   Port 3 On-Chip Pull-Up Resistor Selection
PUO.PUO2          2   Port 2 On-Chip Pull-Up Resistor Selection
PUO.PUO1          1   Port 1 On-Chip Pull-Up Resistor Selection
PUO.PUO0          0   Port 0 On-Chip Pull-Up Resistor Selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects Operation of Watchdog Timer
WDTM.WDTM4        4   Selects Operation Mode of Watchdog Timer bit 4
WDTM.WDTM3        3   Selects Operation Mode of Watchdog Timer bit 3
OSTS             0xFFFA   Oscillation settling time select register
OSTS.OSTS2        2   Oscillation Settling Time Selection bit 2
OSTS.OSTS1        1   Oscillation Settling Time Selection bit 1
OSTS.OSTS0        0   Oscillation Settling Time Selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789046
; http://www.ic.nec.co.jp/nesdis/image/U13600EJ2V0UMJ1.pdf
; U13600EJ2V0UMJ1.pdf, U13380EJ1V0DS00.pdf


; ROM=16K (0x0000:0x4000)
; RAM=512 (0xFD00:0xFF00)


; MEMORY MAP
area DATA ROM_        0x0000:0x4000   Internal ROM
area BSS RESERVED     0x4000:0xFD00   Unusable
area DATA RAM_        0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1       0xFF00:0xFF76   Special Function Register
area BSS RESERVED     0xFF76:0xFFE0
area DATA FSR_2       0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt __RESET           0x0000   Processor reset
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR20_INTCSI20  0x000C   INTSR20/INTCSI20
interrupt INTST20_          0x000E   INTST20
interrupt INTWT_            0x0010   INTWT
interrupt INTWTI_           0x0012   INTWTI
interrupt INTTM80_          0x0014   INTTM80
interrupt INTTM90_          0x0016   INTTM90
interrupt INTKR00_          0x0018   INTKR00


; INPUT/ OUTPUT PORTS
P0               0xFF00    Port 0
P1               0xFF01    Port 1
P2               0xFF02    Port 2
P3               0xFF03    Port 3
P4               0xFF04    Port 4
RESERVEDFF05     0xFF05    RESERVED
RESERVEDFF06     0xFF06    RESERVED
RESERVEDFF07     0xFF07    RESERVED
RESERVEDFF08     0xFF08    RESERVED
RESERVEDFF09     0xFF09    RESERVED
RESERVEDFF0A     0xFF0A    RESERVED
RESERVEDFF0B     0xFF0B    RESERVED
RESERVEDFF0C     0xFF0C    RESERVED
RESERVEDFF0D     0xFF0D    RESERVED
RESERVEDFF0E     0xFF0E    RESERVED
RESERVEDFF0F     0xFF0F    RESERVED
RESERVEDFF10     0xFF10    RESERVED
RESERVEDFF11     0xFF11    RESERVED
RESERVEDFF12     0xFF12    RESERVED
RESERVEDFF13     0xFF13    RESERVED
RESERVEDFF14     0xFF14    RESERVED
RESERVEDFF15     0xFF15    RESERVED
CR90             0xFF16    16-bit compare register 90
TM90             0xFF18    16-bit timer counter 90
TCP90            0xFF1A    16-bit capture register 90
RESERVEDFF1C     0xFF1C    RESERVED
RESERVEDFF1D     0xFF1D    RESERVED
RESERVEDFF1E     0xFF1E    RESERVED
RESERVEDFF1F     0xFF1F    RESERVED
PM0              0xFF20    Port mode register 0
PM0.PM07          7   P07 Pin Input/Output Mode Selection
PM0.PM06          6   P06 Pin Input/Output Mode Selection
PM0.PM05          5   P05 Pin Input/Output Mode Selection
PM0.PM04          4   P04 Pin Input/Output Mode Selection
PM0.PM03          3   P03 Pin Input/Output Mode Selection
PM0.PM02          2   P02 Pin Input/Output Mode Selection
PM0.PM01          1   P01 Pin Input/Output Mode Selection
PM0.PM00          0   P00 Pin Input/Output Mode Selection
PM1              0xFF21    Port mode register 1
PM1.PM17          7   P17 Pin Input/Output Mode Selection
PM1.PM16          6   P16 Pin Input/Output Mode Selection
PM1.PM15          5   P15 Pin Input/Output Mode Selection
PM1.PM14          4   P14 Pin Input/Output Mode Selection
PM1.PM13          3   P13 Pin Input/Output Mode Selection
PM1.PM12          2   P12 Pin Input/Output Mode Selection
PM1.PM11          1   P11 Pin Input/Output Mode Selection
PM1.PM10          0   P10 Pin Input/Output Mode Selection
PM2              0xFF22    Port mode register 2
PM2.PM27          7   P27 Pin Input/Output Mode Selection
PM2.PM26          6   P26 Pin Input/Output Mode Selection
PM2.PM25          5   P25 Pin Input/Output Mode Selection
PM2.PM24          4   P24 Pin Input/Output Mode Selection
PM2.PM23          3   P23 Pin Input/Output Mode Selection
PM2.PM22          2   P22 Pin Input/Output Mode Selection
PM2.PM21          1   P21 Pin Input/Output Mode Selection
PM2.PM20          0   P20 Pin Input/Output Mode Selection
PM3              0xFF23    Port mode register 3
PM3.PM31          1   P31 Pin Input/Output Mode Selection
PM3.PM30          0   P30 Pin Input/Output Mode Selection
PM4              0xFF24    Port mode register 4
PM4.PM47          7   P47 Pin Input/Output Mode Selection
PM4.PM46          6   P46 Pin Input/Output Mode Selection
PM4.PM45          5   P45 Pin Input/Output Mode Selection
PM4.PM44          4   P44 Pin Input/Output Mode Selection
PM4.PM43          3   P43 Pin Input/Output Mode Selection
PM4.PM42          2   P42 Pin Input/Output Mode Selection
PM4.PM41          1   P41 Pin Input/Output Mode Selection
PM4.PM40          0   P40 Pin Input/Output Mode Selection
RESERVEDFF25     0xFF25    RESERVED
RESERVEDFF26     0xFF26    RESERVED
RESERVEDFF27     0xFF27    RESERVED
RESERVEDFF28     0xFF28    RESERVED
RESERVEDFF29     0xFF29    RESERVED
RESERVEDFF2A     0xFF2A    RESERVED
RESERVEDFF2B     0xFF2B    RESERVED
RESERVEDFF2C     0xFF2C    RESERVED
RESERVEDFF2D     0xFF2D    RESERVED
RESERVEDFF2E     0xFF2E    RESERVED
RESERVEDFF2F     0xFF2F    RESERVED
RESERVEDFF30     0xFF30    RESERVED
RESERVEDFF31     0xFF31    RESERVED
PUB2             0xFF32    Pull-up resistor option register B2
PUB2.PUB27        7   P27 On-Chip Pull-Up Resistor Selection
PUB2.PUB26        6   P26 On-Chip Pull-Up Resistor Selection
PUB2.PUB25        5   P25 On-Chip Pull-Up Resistor Selection
PUB2.PUB24        4   P24 On-Chip Pull-Up Resistor Selection
PUB2.PUB23        3   P23 On-Chip Pull-Up Resistor Selection
PUB2.PUB22        2   P22 On-Chip Pull-Up Resistor Selection
PUB2.PUB21        1   P21 On-Chip Pull-Up Resistor Selection
PUB2.PUB20        0   P20 On-Chip Pull-Up Resistor Selection
RESERVEDFF33     0xFF33    RESERVED
RESERVEDFF34     0xFF34    RESERVED
RESERVEDFF35     0xFF35    RESERVED
RESERVEDFF36     0xFF36    RESERVED
RESERVEDFF37     0xFF37    RESERVED
RESERVEDFF38     0xFF38    RESERVED
RESERVEDFF39     0xFF39    RESERVED
RESERVEDFF3A     0xFF3A    RESERVED
RESERVEDFF3B     0xFF3B    RESERVED
RESERVEDFF3C     0xFF3C    RESERVED
RESERVEDFF3D     0xFF3D    RESERVED
RESERVEDFF3E     0xFF3E    RESERVED
RESERVEDFF3F     0xFF3F    RESERVED
RESERVEDFF40     0xFF40    RESERVED
RESERVEDFF41     0xFF41    RESERVED
TCL2             0xFF42    Timer clock selection register 2
TCL2.TCL22        2    Watchdog Timer Count Clock Selection 2
TCL2.TCL21        1    Watchdog Timer Count Clock Selection 1
TCL2.TCL20        0    Watchdog Timer Count Clock Selection 0
RESERVEDFF43     0xFF43    RESERVED
RESERVEDFF44     0xFF44    RESERVED
RESERVEDFF45     0xFF45    RESERVED
RESERVEDFF46     0xFF46    RESERVED
RESERVEDFF47     0xFF47    RESERVED
TMC90            0xFF48    16-bit timer mode control register 90
TMC90.TOD90       15  Timer Output Data
TMC90.TOF90       14  Overflow Flag Control
TMC90.CPT901      13  Capture Edge Selection 1
TMC90.CPT900      12  Capture Edge Selection 0
TMC90.TOC90       11  Timer Output Data Inversion Control
TMC90.TCL901      10  16-Bit Timer Counter 90 Count Clock Selection 1
TMC90.TCL900      9   16-Bit Timer Counter 90 Count Clock Selection 0
TMC90.TOE90       8   16-Bit Timer Output Control
TMC90.BCS902      3   Buzzer Frequency 2
TMC90.BCS901      2   Buzzer Frequency 1
TMC90.BCS900      1   Buzzer Frequency 0
TMC90.BZOE90      0   Buzzer Port Output Control
BZC90            0xFF49    Buzzer output control register 90
WTM              0xFF4A    Watch timer mode control register
WTM.WTM7          7    Watch Timer Count Clock Selection
WTM.WTM6          6    Prescaler Interval Selection bit 6
WTM.WTM5          5    Prescaler Interval Selection bit 5
WTM.WTM4          4    Prescaler Interval Selection bit 4
WTM.WTM1          1    Control of 5-Bit Counter Operation
WTM.WTM0          0    Watch Timer Operation
RESERVEDFF4B     0xFF4B    RESERVED
RESERVEDFF4C     0xFF4C    RESERVED
RESERVEDFF4D     0xFF4D    RESERVED
RESERVEDFF4E     0xFF4E    RESERVED
RESERVEDFF4F     0xFF4F    RESERVED
CR80             0xFF50    8-bit compare register 80
TM80             0xFF51    8-bit timer counter 80
RESERVEDFF52     0xFF52    RESERVED
TMC80            0xFF53    8-bit timer mode control register 80
TMC80.TCE80       7   8-Bit Timer Counter 80 Operation Control
TMC80.PWME80      6   Operation Mode Selection
TMC80.TCL801      2   8-Bit Timer Counter 80 Count Clock Selection 1
TMC80.TCL800      1   8-Bit Timer Counter 80 Count Clock Selection 0
TMC80.TOE80       0   8-Bit Timer/Event Counter Output Control
RESERVEDFF54     0xFF54    RESERVED
RESERVEDFF55     0xFF55    RESERVED
RESERVEDFF56     0xFF56    RESERVED
RESERVEDFF57     0xFF57    RESERVED
RESERVEDFF58     0xFF58    RESERVED
RESERVEDFF59     0xFF59    RESERVED
RESERVEDFF5A     0xFF5A    RESERVED
RESERVEDFF5B     0xFF5B    RESERVED
RESERVEDFF5C     0xFF5C    RESERVED
RESERVEDFF5D     0xFF5D    RESERVED
RESERVEDFF5E     0xFF5E    RESERVED
RESERVEDFF5F     0xFF5F    RESERVED
RESERVEDFF60     0xFF60    RESERVED
RESERVEDFF61     0xFF61    RESERVED
RESERVEDFF62     0xFF62    RESERVED
RESERVEDFF63     0xFF63    RESERVED
RESERVEDFF64     0xFF64    RESERVED
RESERVEDFF65     0xFF65    RESERVED
RESERVEDFF66     0xFF66    RESERVED
RESERVEDFF67     0xFF67    RESERVED
RESERVEDFF68     0xFF68    RESERVED
RESERVEDFF69     0xFF69    RESERVED
RESERVEDFF6A     0xFF6A    RESERVED
RESERVEDFF6B     0xFF6B    RESERVED
RESERVEDFF6C     0xFF6C    RESERVED
RESERVEDFF6D     0xFF6D    RESERVED
RESERVEDFF6E     0xFF6E    RESERVED
RESERVEDFF6F     0xFF6F    RESERVED
ASIM20           0xFF70    Asynchronous serial interface mode register 20
ASIM20.TXE20      7    Transmit Operation Control
ASIM20.RXE20      6    Receive Operation Control
ASIM20.PS201      5    Parity Bit Specification 1
ASIM20.PS200      4    Parity Bit Specification 0
ASIM20.CL20       3    Transmit Data Character Length Specification
ASIM20.SL20       2    Transmit Data Stop Bit Length
ASIS20           0xFF71    Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity Error Flag
ASIS20.FE20       1   Flaming Error Flag
ASIS20.OVE20      0   Overrun Error Flag
CSIM20           0xFF72    Serial operation mode register 20
CSIM20.CSIE20     7    3-Wire Serial I/O Mode Operation Control
CSIM20.SSE20      6    SS20 Pin Selection
CSIM20.DAP20      3    3-Wire Serial I/O Mode Data Phase Selection
CSIM20.DIR20      2    First-Bit Specification
CSIM20.CSCK20     1    3-Wire Serial I/O Mode Clock Selection
CSIM20.CKP20      0    3-Wire Serial I/O Mode Clock Phase Selection
BRGC20           0xFF73    Baud rate generator control register 20
BRGC20.TPS203     7   3-Bit Counter Source Clock Selection bit 3
BRGC20.TPS202     6   3-Bit Counter Source Clock Selection bit 2
BRGC20.TPS201     5   3-Bit Counter Source Clock Selection bit 1
BRGC20.TPS200     4   3-Bit Counter Source Clock Selection bit 0
TXS20            0xFF74    Transmission shift register 20
RXB20            0xFF75    Reception buffer register 20 (ADRESS ?)
IF0              0xFFE0    Interrupt request flag register 0
IF0.WTIIF         7
IF0.WTIF          6
IF0.STIF20        5
IF0.SRIF20        4
IF0.PIF2          3
IF0.PIF1          2
IF0.PIF0          1
IF0.TMIF4         0
IF1              0xFFE1    Interrupt request flag register 1
IF1.KRIF00        2
IF1.TMIF90        1
IF1.TMIF80        0
RESERVEDFFE2     0xFFE2    RESERVED
RESERVEDFFE3     0xFFE3    RESERVED
MK0              0xFFE4    Interrupt mask flag register 0
MK0.WTIMK         7
MK0.STMK20        6
MK0.WTMK          5
MK0.SRMK20        4
MK0.PMK2          3
MK0.PMK1          2
MK0.PMK0          1
MK0.TMMK4         0
MK1              0xFFE5    Interrupt mask flag register 1
MK1.KRMK00        2
MK1.TMMK90        1
MK1.TMMK80        0
RESERVEDFFE6     0xFFE6    RESERVED
RESERVEDFFE7     0xFFE7    RESERVED
RESERVEDFFE8     0xFFE8    RESERVED
RESERVEDFFE9     0xFFE9    RESERVED
RESERVEDFFEA     0xFFEA    RESERVED
RESERVEDFFEB     0xFFEB    RESERVED
INTM0            0xFFEC    External interrupt mode register 0
INTM0.ES21        7   INTP2 Effective Edge Selection 1
INTM0.ES20        6   INTP2 Effective Edge Selection 0
INTM0.ES11        5   INTP1 Effective Edge Selection 1
INTM0.ES10        4   INTP1 Effective Edge Selection 0
INTM0.ES01        3   INTP0 Effective Edge Selection 1
INTM0.ES00        2   INTP0 Effective Edge Selection 0
RESERVEDFFED     0xFFED    RESERVED
RESERVEDFFEE     0xFFEE    RESERVED
RESERVEDFFEF     0xFFEF    RESERVED
SCKM             0xFFF0    Suboscillation mode register
SCKM.FRC          1   Use of Feedback Resistor
SCKM.SCC          0   Control of Subsystem Clock Oscillator Operation
RESERVEDFFF1     0xFFF1    RESERVED
CSS              0xFFF2    Subclock control register
CSS.CLS           5   CPU Clock Operation Status
CSS.CSS0          4   Selection of Main System or Subsystem Clock Oscillator
RESERVEDFFF3     0xFFF3    RESERVED
RESERVEDFFF4     0xFFF4    RESERVED
KRM00            0xFFF5    Key return mode register 00
KRM00.KRM007      7   Key Return Signal Detection Selection bit 7
KRM00.KRM006      6   Key Return Signal Detection Selection bit 6
KRM00.KRM005      5   Key Return Signal Detection Selection bit 5
KRM00.KRM004      4   Key Return Signal Detection Selection bit 4
KRM00.KRM000      0   Key Return Signal Detection Selection bit 0
RESERVEDFFF6     0xFFF6    RESERVED
PU0              0xFFF7    Pull-up resistor option register 0
PU0.PU04          4   P4 On-Chip Pull-Up Resistor Selection
PU0.PU03          3   P3 On-Chip Pull-Up Resistor Selection
PU0.PU01          1   P1 On-Chip Pull-Up Resistor Selection
PU0.PU00          0   P0 On-Chip Pull-Up Resistor Selection
RESERVEDFFF8     0xFFF8    RESERVED
WDTM             0xFFF9    Watchdog timer mode register
WDTM.RUN          7   Watchdog Timer Operation Selection
WDTM.WDTM4        4   Watchdog Timer Operation Mode Selection bit 4
WDTM.WDTM3        3   Watchdog Timer Operation Mode Selection bit 3
OSTS             0xFFFA    Oscillation settling time selection register
OSTS.OSTS2        2   Oscillation Settling Time Selection bit 2
OSTS.OSTS1        1   Oscillation Settling Time Selection bit 1
OSTS.OSTS0        0   Oscillation Settling Time Selection bit 0
PCC              0xFFFB    Processor clock control register
PCC.MCC           7   Control of Main System Clock Oscillator Operation
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC    RESERVED
RESERVEDFFFD     0xFFFD    RESERVED
RESERVEDFFFE     0xFFFE    RESERVED
RESERVEDFFFF     0xFFFF    RESERVED


.UPD78F9046
; http://www.ic.nec.co.jp/nesdis/image/U13600EJ2V0UMJ1.pdf
; U13600EJ2V0UMJ1.pdf, U13546EJ1V0DSJ1.pdf


; ROM=16K (0x0000:0x4000)
; RAM=512 (0xFD00:0xFF00)


; MEMORY MAP
area DATA FLASH_      0x0000:0x4000   Flash Memory
area BSS RESERVED     0x4000:0xFD00   Unusable
area DATA RAM_        0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1       0xFF00:0xFF76   Special Function Register
area BSS RESERVED     0xFF76:0xFFE0
area DATA FSR_2       0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt __RESET           0x0000   Processor reset
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR20_INTCSI20  0x000C   INTSR20/INTCSI20
interrupt INTST20_          0x000E   INTST20
interrupt INTWT_            0x0010   INTWT
interrupt INTWTI_           0x0012   INTWTI
interrupt INTTM80_          0x0014   INTTM80
interrupt INTTM90_          0x0016   INTTM90
interrupt INTKR00_          0x0018   INTKR00


; INPUT/ OUTPUT PORTS
P0               0xFF00    Port 0
P1               0xFF01    Port 1
P2               0xFF02    Port 2
P3               0xFF03    Port 3
P4               0xFF04    Port 4
RESERVEDFF05     0xFF05    RESERVED
RESERVEDFF06     0xFF06    RESERVED
RESERVEDFF07     0xFF07    RESERVED
RESERVEDFF08     0xFF08    RESERVED
RESERVEDFF09     0xFF09    RESERVED
RESERVEDFF0A     0xFF0A    RESERVED
RESERVEDFF0B     0xFF0B    RESERVED
RESERVEDFF0C     0xFF0C    RESERVED
RESERVEDFF0D     0xFF0D    RESERVED
RESERVEDFF0E     0xFF0E    RESERVED
RESERVEDFF0F     0xFF0F    RESERVED
RESERVEDFF10     0xFF10    RESERVED
RESERVEDFF11     0xFF11    RESERVED
RESERVEDFF12     0xFF12    RESERVED
RESERVEDFF13     0xFF13    RESERVED
RESERVEDFF14     0xFF14    RESERVED
RESERVEDFF15     0xFF15    RESERVED
CR90             0xFF16    16-bit compare register 90
TM90             0xFF18    16-bit timer counter 90
TCP90            0xFF1A    16-bit capture register 90
RESERVEDFF1C     0xFF1C    RESERVED
RESERVEDFF1D     0xFF1D    RESERVED
RESERVEDFF1E     0xFF1E    RESERVED
RESERVEDFF1F     0xFF1F    RESERVED
PM0              0xFF20    Port mode register 0
PM0.PM07          7   P07 Pin Input/Output Mode Selection
PM0.PM06          6   P06 Pin Input/Output Mode Selection
PM0.PM05          5   P05 Pin Input/Output Mode Selection
PM0.PM04          4   P04 Pin Input/Output Mode Selection
PM0.PM03          3   P03 Pin Input/Output Mode Selection
PM0.PM02          2   P02 Pin Input/Output Mode Selection
PM0.PM01          1   P01 Pin Input/Output Mode Selection
PM0.PM00          0   P00 Pin Input/Output Mode Selection
PM1              0xFF21    Port mode register 1
PM1.PM17          7   P17 Pin Input/Output Mode Selection
PM1.PM16          6   P16 Pin Input/Output Mode Selection
PM1.PM15          5   P15 Pin Input/Output Mode Selection
PM1.PM14          4   P14 Pin Input/Output Mode Selection
PM1.PM13          3   P13 Pin Input/Output Mode Selection
PM1.PM12          2   P12 Pin Input/Output Mode Selection
PM1.PM11          1   P11 Pin Input/Output Mode Selection
PM1.PM10          0   P10 Pin Input/Output Mode Selection
PM2              0xFF22    Port mode register 2
PM2.PM27          7   P27 Pin Input/Output Mode Selection
PM2.PM26          6   P26 Pin Input/Output Mode Selection
PM2.PM25          5   P25 Pin Input/Output Mode Selection
PM2.PM24          4   P24 Pin Input/Output Mode Selection
PM2.PM23          3   P23 Pin Input/Output Mode Selection
PM2.PM22          2   P22 Pin Input/Output Mode Selection
PM2.PM21          1   P21 Pin Input/Output Mode Selection
PM2.PM20          0   P20 Pin Input/Output Mode Selection
PM3              0xFF23    Port mode register 3
PM3.PM31          1   P31 Pin Input/Output Mode Selection
PM3.PM30          0   P30 Pin Input/Output Mode Selection
PM4              0xFF24    Port mode register 4
PM4.PM47          7   P47 Pin Input/Output Mode Selection
PM4.PM46          6   P46 Pin Input/Output Mode Selection
PM4.PM45          5   P45 Pin Input/Output Mode Selection
PM4.PM44          4   P44 Pin Input/Output Mode Selection
PM4.PM43          3   P43 Pin Input/Output Mode Selection
PM4.PM42          2   P42 Pin Input/Output Mode Selection
PM4.PM41          1   P41 Pin Input/Output Mode Selection
PM4.PM40          0   P40 Pin Input/Output Mode Selection
RESERVEDFF25     0xFF25    RESERVED
RESERVEDFF26     0xFF26    RESERVED
RESERVEDFF27     0xFF27    RESERVED
RESERVEDFF28     0xFF28    RESERVED
RESERVEDFF29     0xFF29    RESERVED
RESERVEDFF2A     0xFF2A    RESERVED
RESERVEDFF2B     0xFF2B    RESERVED
RESERVEDFF2C     0xFF2C    RESERVED
RESERVEDFF2D     0xFF2D    RESERVED
RESERVEDFF2E     0xFF2E    RESERVED
RESERVEDFF2F     0xFF2F    RESERVED
RESERVEDFF30     0xFF30    RESERVED
RESERVEDFF31     0xFF31    RESERVED
PUB2             0xFF32    Pull-up resistor option register B2
PUB2.PUB27        7   P27 On-Chip Pull-Up Resistor Selection
PUB2.PUB26        6   P26 On-Chip Pull-Up Resistor Selection
PUB2.PUB25        5   P25 On-Chip Pull-Up Resistor Selection
PUB2.PUB24        4   P24 On-Chip Pull-Up Resistor Selection
PUB2.PUB23        3   P23 On-Chip Pull-Up Resistor Selection
PUB2.PUB22        2   P22 On-Chip Pull-Up Resistor Selection
PUB2.PUB21        1   P21 On-Chip Pull-Up Resistor Selection
PUB2.PUB20        0   P20 On-Chip Pull-Up Resistor Selection
RESERVEDFF33     0xFF33    RESERVED
RESERVEDFF34     0xFF34    RESERVED
RESERVEDFF35     0xFF35    RESERVED
RESERVEDFF36     0xFF36    RESERVED
RESERVEDFF37     0xFF37    RESERVED
RESERVEDFF38     0xFF38    RESERVED
RESERVEDFF39     0xFF39    RESERVED
RESERVEDFF3A     0xFF3A    RESERVED
RESERVEDFF3B     0xFF3B    RESERVED
RESERVEDFF3C     0xFF3C    RESERVED
RESERVEDFF3D     0xFF3D    RESERVED
RESERVEDFF3E     0xFF3E    RESERVED
RESERVEDFF3F     0xFF3F    RESERVED
RESERVEDFF40     0xFF40    RESERVED
RESERVEDFF41     0xFF41    RESERVED
TCL2             0xFF42    Timer clock selection register 2
TCL2.TCL22        2    Watchdog Timer Count Clock Selection 2
TCL2.TCL21        1    Watchdog Timer Count Clock Selection 1
TCL2.TCL20        0    Watchdog Timer Count Clock Selection 0
RESERVEDFF43     0xFF43    RESERVED
RESERVEDFF44     0xFF44    RESERVED
RESERVEDFF45     0xFF45    RESERVED
RESERVEDFF46     0xFF46    RESERVED
RESERVEDFF47     0xFF47    RESERVED
TMC90            0xFF48    16-bit timer mode control register 90
TMC90.TOD90       15  Timer Output Data
TMC90.TOF90       14  Overflow Flag Control
TMC90.CPT901      13  Capture Edge Selection 1
TMC90.CPT900      12  Capture Edge Selection 0
TMC90.TOC90       11  Timer Output Data Inversion Control
TMC90.TCL901      10  16-Bit Timer Counter 90 Count Clock Selection 1
TMC90.TCL900      9   16-Bit Timer Counter 90 Count Clock Selection 0
TMC90.TOE90       8   16-Bit Timer Output Control
TMC90.BCS902      3   Buzzer Frequency 2
TMC90.BCS901      2   Buzzer Frequency 1
TMC90.BCS900      1   Buzzer Frequency 0
TMC90.BZOE90      0   Buzzer Port Output Control
BZC90            0xFF49    Buzzer output control register 90
WTM              0xFF4A    Watch timer mode control register
WTM.WTM7          7    Watch Timer Count Clock Selection
WTM.WTM6          6    Prescaler Interval Selection bit 6
WTM.WTM5          5    Prescaler Interval Selection bit 5
WTM.WTM4          4    Prescaler Interval Selection bit 4
WTM.WTM1          1    Control of 5-Bit Counter Operation
WTM.WTM0          0    Watch Timer Operation
RESERVEDFF4B     0xFF4B    RESERVED
RESERVEDFF4C     0xFF4C    RESERVED
RESERVEDFF4D     0xFF4D    RESERVED
RESERVEDFF4E     0xFF4E    RESERVED
RESERVEDFF4F     0xFF4F    RESERVED
CR80             0xFF50    8-bit compare register 80
TM80             0xFF51    8-bit timer counter 80
RESERVEDFF52     0xFF52    RESERVED
TMC80            0xFF53    8-bit timer mode control register 80
TMC80.TCE80       7   8-Bit Timer Counter 80 Operation Control
TMC80.PWME80      6   Operation Mode Selection
TMC80.TCL801      2   8-Bit Timer Counter 80 Count Clock Selection 1
TMC80.TCL800      1   8-Bit Timer Counter 80 Count Clock Selection 0
TMC80.TOE80       0   8-Bit Timer/Event Counter Output Control
RESERVEDFF54     0xFF54    RESERVED
RESERVEDFF55     0xFF55    RESERVED
RESERVEDFF56     0xFF56    RESERVED
RESERVEDFF57     0xFF57    RESERVED
RESERVEDFF58     0xFF58    RESERVED
RESERVEDFF59     0xFF59    RESERVED
RESERVEDFF5A     0xFF5A    RESERVED
RESERVEDFF5B     0xFF5B    RESERVED
RESERVEDFF5C     0xFF5C    RESERVED
RESERVEDFF5D     0xFF5D    RESERVED
RESERVEDFF5E     0xFF5E    RESERVED
RESERVEDFF5F     0xFF5F    RESERVED
RESERVEDFF60     0xFF60    RESERVED
RESERVEDFF61     0xFF61    RESERVED
RESERVEDFF62     0xFF62    RESERVED
RESERVEDFF63     0xFF63    RESERVED
RESERVEDFF64     0xFF64    RESERVED
RESERVEDFF65     0xFF65    RESERVED
RESERVEDFF66     0xFF66    RESERVED
RESERVEDFF67     0xFF67    RESERVED
RESERVEDFF68     0xFF68    RESERVED
RESERVEDFF69     0xFF69    RESERVED
RESERVEDFF6A     0xFF6A    RESERVED
RESERVEDFF6B     0xFF6B    RESERVED
RESERVEDFF6C     0xFF6C    RESERVED
RESERVEDFF6D     0xFF6D    RESERVED
RESERVEDFF6E     0xFF6E    RESERVED
RESERVEDFF6F     0xFF6F    RESERVED
ASIM20           0xFF70    Asynchronous serial interface mode register 20
ASIM20.TXE20      7    Transmit Operation Control
ASIM20.RXE20      6    Receive Operation Control
ASIM20.PS201      5    Parity Bit Specification 1
ASIM20.PS200      4    Parity Bit Specification 0
ASIM20.CL20       3    Transmit Data Character Length Specification
ASIM20.SL20       2    Transmit Data Stop Bit Length
ASIS20           0xFF71    Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity Error Flag
ASIS20.FE20       1   Flaming Error Flag
ASIS20.OVE20      0   Overrun Error Flag
CSIM20           0xFF72    Serial operation mode register 20
CSIM20.CSIE20     7    3-Wire Serial I/O Mode Operation Control
CSIM20.SSE20      6    SS20 Pin Selection
CSIM20.DAP20      3    3-Wire Serial I/O Mode Data Phase Selection
CSIM20.DIR20      2    First-Bit Specification
CSIM20.CSCK20     1    3-Wire Serial I/O Mode Clock Selection
CSIM20.CKP20      0    3-Wire Serial I/O Mode Clock Phase Selection
BRGC20           0xFF73    Baud rate generator control register 20
BRGC20.TPS203     7   3-Bit Counter Source Clock Selection bit 3
BRGC20.TPS202     6   3-Bit Counter Source Clock Selection bit 2
BRGC20.TPS201     5   3-Bit Counter Source Clock Selection bit 1
BRGC20.TPS200     4   3-Bit Counter Source Clock Selection bit 0
TXS20            0xFF74    Transmission shift register 20
RXB20            0xFF75    Reception buffer register 20 (ADRESS ?)
IF0              0xFFE0    Interrupt request flag register 0
IF0.WTIIF         7
IF0.WTIF          6
IF0.STIF20        5
IF0.SRIF20        4
IF0.PIF2          3
IF0.PIF1          2
IF0.PIF0          1
IF0.TMIF4         0
IF1              0xFFE1    Interrupt request flag register 1
IF1.KRIF00        2
IF1.TMIF90        1
IF1.TMIF80        0
RESERVEDFFE2     0xFFE2    RESERVED
RESERVEDFFE3     0xFFE3    RESERVED
MK0              0xFFE4    Interrupt mask flag register 0
MK0.WTIMK         7
MK0.STMK20        6
MK0.WTMK          5
MK0.SRMK20        4
MK0.PMK2          3
MK0.PMK1          2
MK0.PMK0          1
MK0.TMMK4         0
MK1              0xFFE5    Interrupt mask flag register 1
MK1.KRMK00        2
MK1.TMMK90        1
MK1.TMMK80        0
RESERVEDFFE6     0xFFE6    RESERVED
RESERVEDFFE7     0xFFE7    RESERVED
RESERVEDFFE8     0xFFE8    RESERVED
RESERVEDFFE9     0xFFE9    RESERVED
RESERVEDFFEA     0xFFEA    RESERVED
RESERVEDFFEB     0xFFEB    RESERVED
INTM0            0xFFEC    External interrupt mode register 0
INTM0.ES21        7   INTP2 Effective Edge Selection 1
INTM0.ES20        6   INTP2 Effective Edge Selection 0
INTM0.ES11        5   INTP1 Effective Edge Selection 1
INTM0.ES10        4   INTP1 Effective Edge Selection 0
INTM0.ES01        3   INTP0 Effective Edge Selection 1
INTM0.ES00        2   INTP0 Effective Edge Selection 0
RESERVEDFFED     0xFFED    RESERVED
RESERVEDFFEE     0xFFEE    RESERVED
RESERVEDFFEF     0xFFEF    RESERVED
SCKM             0xFFF0    Suboscillation mode register
SCKM.FRC          1   Use of Feedback Resistor
SCKM.SCC          0   Control of Subsystem Clock Oscillator Operation
RESERVEDFFF1     0xFFF1    RESERVED
CSS              0xFFF2    Subclock control register
CSS.CLS           5   CPU Clock Operation Status
CSS.CSS0          4   Selection of Main System or Subsystem Clock Oscillator
RESERVEDFFF3     0xFFF3    RESERVED
RESERVEDFFF4     0xFFF4    RESERVED
KRM00            0xFFF5    Key return mode register 00
KRM00.KRM007      7   Key Return Signal Detection Selection bit 7
KRM00.KRM006      6   Key Return Signal Detection Selection bit 6
KRM00.KRM005      5   Key Return Signal Detection Selection bit 5
KRM00.KRM004      4   Key Return Signal Detection Selection bit 4
KRM00.KRM000      0   Key Return Signal Detection Selection bit 0
RESERVEDFFF6     0xFFF6    RESERVED
PU0              0xFFF7    Pull-up resistor option register 0
PU0.PU04          4   P4 On-Chip Pull-Up Resistor Selection
PU0.PU03          3   P3 On-Chip Pull-Up Resistor Selection
PU0.PU01          1   P1 On-Chip Pull-Up Resistor Selection
PU0.PU00          0   P0 On-Chip Pull-Up Resistor Selection
RESERVEDFFF8     0xFFF8    RESERVED
WDTM             0xFFF9    Watchdog timer mode register
WDTM.RUN          7   Watchdog Timer Operation Selection
WDTM.WDTM4        4   Watchdog Timer Operation Mode Selection bit 4
WDTM.WDTM3        3   Watchdog Timer Operation Mode Selection bit 3
OSTS             0xFFFA    Oscillation settling time selection register
OSTS.OSTS2        2   Oscillation Settling Time Selection bit 2
OSTS.OSTS1        1   Oscillation Settling Time Selection bit 1
OSTS.OSTS0        0   Oscillation Settling Time Selection bit 0
PCC              0xFFFB    Processor clock control register
PCC.MCC           7   Control of Main System Clock Oscillator Operation
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC    RESERVED
RESERVEDFFFD     0xFFFD    RESERVED
RESERVEDFFFE     0xFFFE    RESERVED
RESERVEDFFFF     0xFFFF    RESERVED


.UPD789071
; U14801EJ1V1UM00.pdf, U15158EJ1V0DS00.pdf


; MEMORY MAP
area DATA ROM_      0x0000:0x8000   Internal ROM
area BSS RESERVED   0x8000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF74   Special Function Register
area BSS RESERVED   0xFF74:0xFFE0   RESERVED
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0014   INTTM80
interrupt INTTM90_          0x0016   INTTM90


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
RESERVEDFF05     0xFF05   RESERVED
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 Pin Input/Output Mode Selection
PM0.PM06          6   P06 Pin Input/Output Mode Selection
PM0.PM05          5   P05 Pin Input/Output Mode Selection
PM0.PM04          4   P04 Pin Input/Output Mode Selection
PM0.PM03          3   P03 Pin Input/Output Mode Selection
PM0.PM02          2   P02 Pin Input/Output Mode Selection
PM0.PM01          1   P01 Pin Input/Output Mode Selection
PM0.PM00          0   P00 Pin Input/Output Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM15          5   P15 Pin Input/Output Mode Selection
PM1.PM14          4   P14 Pin Input/Output Mode Selection
PM1.PM13          3   P13 Pin Input/Output Mode Selection
PM1.PM12          2   P12 Pin Input/Output Mode Selection
PM1.PM11          1   P11 Pin Input/Output Mode Selection
PM1.PM10          0   P10 Pin Input/Output Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM27          7   P27 Pin Input/Output Mode Selection
PM2.PM26          6   P26 Pin Input/Output Mode Selection
PM2.PM25          5   P25 Pin Input/Output Mode Selection
PM2.PM24          4   P24 Pin Input/Output Mode Selection
PM2.PM23          3   P23 Pin Input/Output Mode Selection
PM2.PM22          2   P22 Pin Input/Output Mode Selection
PM2.PM21          1   P21 Pin Input/Output Mode Selection
PM2.PM20          0   P20 Pin Input/Output Mode Selection
PM3              0xFF23   Port mode register 3
PM3.PM31          1   P31 Pin Input/Output Mode Selection
PM3.PM30          0   P30 Pin Input/Output Mode Selection
RESERVEDFF24     0xFF24   RESERVED
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB27        7   P27 on-chip pull-up resistor selection
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock selection register 2
WDCS.WDCS2        2   Count clock selection bit 2
WDCS.WDCS1        1   Count clock selection bit 1
WDCS.WDCS0        0   Count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag setting
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock (fcl) selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock (fcl) selection bit 0
TMC90.TOE90       0   16-bit timer counter output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit Operation Control
ASIM20.RXE20      6   Receive Operation Control
ASIM20.PS201      5   Parity Bit Specification bit 1
ASIM20.PS200      4   Parity Bit Specification bit 0
ASIM20.CL20       3   Transmit data character Length Specification
ASIM20.SL20       2   Transmit Data Stop Bit Length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2    Parity Error Flag
ASIS20.FE20       1    Flaming Error Flag
ASIS20.OVE20      0    Overrun Error Flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   3-wire serial I/O mode operation control
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-Bit Counter Source Clock Selection bit 3
BRGC20.TPS202     6   3-Bit Counter Source Clock Selection bit 2
BRGC20.TPS201     5   3-Bit Counter Source Clock Selection bit 1
BRGC20.TPS200     4   3-Bit Counter Source Clock Selection bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        5   STIF20 - Interrupt Request Flag
IF0.SRIF20        4   SRIF20 - Interrupt Request Flag
IF0.PIF2          3   PIF2 - Interrupt Request Flag
IF0.PIF1          2   PIF1 - Interrupt Request Flag
IF0.PIF0          1   PIF0 - Interrupt Request Flag
IF0.WDTIF         0   WDTIF - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.TMIF90        7   TMIF90 - Interrupt Request Flag
IF1.TMIF80        0   TMIF80 - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.SRMK20        4   SRMK20 - Interrupt handling control
MK0.PMK2          3   PMK2 - Interrupt handling control
MK0.PMK1          2   PMK1 - Interrupt handling control
MK0.PMK0          1   PMK0 - Interrupt handling control
MK0.WDTMK         0   WDTMK - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.TMMK90        7   TMMK90 - Interrupt handling control
MK1.TMMK80        0   TMMK80 - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 Valid Edge Selection bit 1
INTM0.ES20        6   INTP2 Valid Edge Selection bit 0
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP0 Valid Edge Selection bit 1
INTM0.ES00        2   INTP0 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PUO3          3   P3 on-chip pull-up resistor selection
PU0.PUO1          1   P1 on-chip pull-up resistor selection
PU0.PUO0          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation Stabilization Time Selection Register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789071_A
; U14801EJ1V1UM00.pdf
.UPD789071_A1
; U14801EJ1V1UM00.pdf
.UPD789071_A2
; U14801EJ1V1UM00.pdf
.UPD789072
; U14801EJ1V1UM00.pdf, U15158EJ1V0DS00.pdf


; MEMORY MAP
area DATA ROM_      0x0000:0x1000   Internal ROM
area BSS RESERVED   0x1000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF74   Special Function Register
area BSS RESERVED   0xFF74:0xFFE0   RESERVED
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0014   INTTM80
interrupt INTTM90_          0x0016   INTTM90


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
RESERVEDFF05     0xFF05   RESERVED
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 Pin Input/Output Mode Selection
PM0.PM06          6   P06 Pin Input/Output Mode Selection
PM0.PM05          5   P05 Pin Input/Output Mode Selection
PM0.PM04          4   P04 Pin Input/Output Mode Selection
PM0.PM03          3   P03 Pin Input/Output Mode Selection
PM0.PM02          2   P02 Pin Input/Output Mode Selection
PM0.PM01          1   P01 Pin Input/Output Mode Selection
PM0.PM00          0   P00 Pin Input/Output Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM15          5   P15 Pin Input/Output Mode Selection
PM1.PM14          4   P14 Pin Input/Output Mode Selection
PM1.PM13          3   P13 Pin Input/Output Mode Selection
PM1.PM12          2   P12 Pin Input/Output Mode Selection
PM1.PM11          1   P11 Pin Input/Output Mode Selection
PM1.PM10          0   P10 Pin Input/Output Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM27          7   P27 Pin Input/Output Mode Selection
PM2.PM26          6   P26 Pin Input/Output Mode Selection
PM2.PM25          5   P25 Pin Input/Output Mode Selection
PM2.PM24          4   P24 Pin Input/Output Mode Selection
PM2.PM23          3   P23 Pin Input/Output Mode Selection
PM2.PM22          2   P22 Pin Input/Output Mode Selection
PM2.PM21          1   P21 Pin Input/Output Mode Selection
PM2.PM20          0   P20 Pin Input/Output Mode Selection
PM3              0xFF23   Port mode register 3
PM3.PM31          1   P31 Pin Input/Output Mode Selection
PM3.PM30          0   P30 Pin Input/Output Mode Selection
RESERVEDFF24     0xFF24   RESERVED
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB27        7   P27 on-chip pull-up resistor selection
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock selection register 2
WDCS.WDCS2        2   Count clock selection bit 2
WDCS.WDCS1        1   Count clock selection bit 1
WDCS.WDCS0        0   Count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag setting
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock (fcl) selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock (fcl) selection bit 0
TMC90.TOE90       0   16-bit timer counter output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit Operation Control
ASIM20.RXE20      6   Receive Operation Control
ASIM20.PS201      5   Parity Bit Specification bit 1
ASIM20.PS200      4   Parity Bit Specification bit 0
ASIM20.CL20       3   Transmit data character Length Specification
ASIM20.SL20       2   Transmit Data Stop Bit Length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2    Parity Error Flag
ASIS20.FE20       1    Flaming Error Flag
ASIS20.OVE20      0    Overrun Error Flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   3-wire serial I/O mode operation control
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-Bit Counter Source Clock Selection bit 3
BRGC20.TPS202     6   3-Bit Counter Source Clock Selection bit 2
BRGC20.TPS201     5   3-Bit Counter Source Clock Selection bit 1
BRGC20.TPS200     4   3-Bit Counter Source Clock Selection bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        5   STIF20 - Interrupt Request Flag
IF0.SRIF20        4   SRIF20 - Interrupt Request Flag
IF0.PIF2          3   PIF2 - Interrupt Request Flag
IF0.PIF1          2   PIF1 - Interrupt Request Flag
IF0.PIF0          1   PIF0 - Interrupt Request Flag
IF0.WDTIF         0   WDTIF - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.TMIF90        7   TMIF90 - Interrupt Request Flag
IF1.TMIF80        0   TMIF80 - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.SRMK20        4   SRMK20 - Interrupt handling control
MK0.PMK2          3   PMK2 - Interrupt handling control
MK0.PMK1          2   PMK1 - Interrupt handling control
MK0.PMK0          1   PMK0 - Interrupt handling control
MK0.WDTMK         0   WDTMK - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.TMMK90        7   TMMK90 - Interrupt handling control
MK1.TMMK80        0   TMMK80 - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 Valid Edge Selection bit 1
INTM0.ES20        6   INTP2 Valid Edge Selection bit 0
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP0 Valid Edge Selection bit 1
INTM0.ES00        2   INTP0 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PUO3          3   P3 on-chip pull-up resistor selection
PU0.PUO1          1   P1 on-chip pull-up resistor selection
PU0.PUO0          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation Stabilization Time Selection Register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789072_A
; U14801EJ1V1UM00.pdf
.UPD789072_A1
; U14801EJ1V1UM00.pdf
.UPD789072_A2
; U14801EJ1V1UM00.pdf
.UPD789074
; U14801EJ1V1UM00.pdf, U15158EJ1V0DS00.pdf


; MEMORY MAP
area DATA ROM_      0x0000:0x2000   Internal ROM
area BSS RESERVED   0x2000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF74   Special Function Register
area BSS RESERVED   0xFF74:0xFFE0   RESERVED
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0014   INTTM80
interrupt INTTM90_          0x0016   INTTM90


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
RESERVEDFF05     0xFF05   RESERVED
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 Pin Input/Output Mode Selection
PM0.PM06          6   P06 Pin Input/Output Mode Selection
PM0.PM05          5   P05 Pin Input/Output Mode Selection
PM0.PM04          4   P04 Pin Input/Output Mode Selection
PM0.PM03          3   P03 Pin Input/Output Mode Selection
PM0.PM02          2   P02 Pin Input/Output Mode Selection
PM0.PM01          1   P01 Pin Input/Output Mode Selection
PM0.PM00          0   P00 Pin Input/Output Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM15          5   P15 Pin Input/Output Mode Selection
PM1.PM14          4   P14 Pin Input/Output Mode Selection
PM1.PM13          3   P13 Pin Input/Output Mode Selection
PM1.PM12          2   P12 Pin Input/Output Mode Selection
PM1.PM11          1   P11 Pin Input/Output Mode Selection
PM1.PM10          0   P10 Pin Input/Output Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM27          7   P27 Pin Input/Output Mode Selection
PM2.PM26          6   P26 Pin Input/Output Mode Selection
PM2.PM25          5   P25 Pin Input/Output Mode Selection
PM2.PM24          4   P24 Pin Input/Output Mode Selection
PM2.PM23          3   P23 Pin Input/Output Mode Selection
PM2.PM22          2   P22 Pin Input/Output Mode Selection
PM2.PM21          1   P21 Pin Input/Output Mode Selection
PM2.PM20          0   P20 Pin Input/Output Mode Selection
PM3              0xFF23   Port mode register 3
PM3.PM31          1   P31 Pin Input/Output Mode Selection
PM3.PM30          0   P30 Pin Input/Output Mode Selection
RESERVEDFF24     0xFF24   RESERVED
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB27        7   P27 on-chip pull-up resistor selection
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock selection register 2
WDCS.WDCS2        2   Count clock selection bit 2
WDCS.WDCS1        1   Count clock selection bit 1
WDCS.WDCS0        0   Count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag setting
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock (fcl) selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock (fcl) selection bit 0
TMC90.TOE90       0   16-bit timer counter output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit Operation Control
ASIM20.RXE20      6   Receive Operation Control
ASIM20.PS201      5   Parity Bit Specification bit 1
ASIM20.PS200      4   Parity Bit Specification bit 0
ASIM20.CL20       3   Transmit data character Length Specification
ASIM20.SL20       2   Transmit Data Stop Bit Length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2    Parity Error Flag
ASIS20.FE20       1    Flaming Error Flag
ASIS20.OVE20      0    Overrun Error Flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   3-wire serial I/O mode operation control
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-Bit Counter Source Clock Selection bit 3
BRGC20.TPS202     6   3-Bit Counter Source Clock Selection bit 2
BRGC20.TPS201     5   3-Bit Counter Source Clock Selection bit 1
BRGC20.TPS200     4   3-Bit Counter Source Clock Selection bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        5   STIF20 - Interrupt Request Flag
IF0.SRIF20        4   SRIF20 - Interrupt Request Flag
IF0.PIF2          3   PIF2 - Interrupt Request Flag
IF0.PIF1          2   PIF1 - Interrupt Request Flag
IF0.PIF0          1   PIF0 - Interrupt Request Flag
IF0.WDTIF         0   WDTIF - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.TMIF90        7   TMIF90 - Interrupt Request Flag
IF1.TMIF80        0   TMIF80 - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.SRMK20        4   SRMK20 - Interrupt handling control
MK0.PMK2          3   PMK2 - Interrupt handling control
MK0.PMK1          2   PMK1 - Interrupt handling control
MK0.PMK0          1   PMK0 - Interrupt handling control
MK0.WDTMK         0   WDTMK - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.TMMK90        7   TMMK90 - Interrupt handling control
MK1.TMMK80        0   TMMK80 - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 Valid Edge Selection bit 1
INTM0.ES20        6   INTP2 Valid Edge Selection bit 0
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP0 Valid Edge Selection bit 1
INTM0.ES00        2   INTP0 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PUO3          3   P3 on-chip pull-up resistor selection
PU0.PUO1          1   P1 on-chip pull-up resistor selection
PU0.PUO0          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation Stabilization Time Selection Register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789074_A
; U14801EJ1V1UM00.pdf
.UPD789074_A1
; U14801EJ1V1UM00.pdf
.UPD789074_A2
; U14801EJ1V1UM00.pdf
.UPD78F9076
; U14801EJ1V1UM00.pdf, U14708EJ1V0PM00.pdf


; MEMORY MAP
area DATA FLASH_    0x0000:0x4000   Internal flash memory
area BSS RESERVED   0x4000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF74   Special Function Register
area BSS RESERVED   0xFF74:0xFFE0   RESERVED
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0014   INTTM80
interrupt INTTM90_          0x0016   INTTM90


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
RESERVEDFF05     0xFF05   RESERVED
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 Pin Input/Output Mode Selection
PM0.PM06          6   P06 Pin Input/Output Mode Selection
PM0.PM05          5   P05 Pin Input/Output Mode Selection
PM0.PM04          4   P04 Pin Input/Output Mode Selection
PM0.PM03          3   P03 Pin Input/Output Mode Selection
PM0.PM02          2   P02 Pin Input/Output Mode Selection
PM0.PM01          1   P01 Pin Input/Output Mode Selection
PM0.PM00          0   P00 Pin Input/Output Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM15          5   P15 Pin Input/Output Mode Selection
PM1.PM14          4   P14 Pin Input/Output Mode Selection
PM1.PM13          3   P13 Pin Input/Output Mode Selection
PM1.PM12          2   P12 Pin Input/Output Mode Selection
PM1.PM11          1   P11 Pin Input/Output Mode Selection
PM1.PM10          0   P10 Pin Input/Output Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM27          7   P27 Pin Input/Output Mode Selection
PM2.PM26          6   P26 Pin Input/Output Mode Selection
PM2.PM25          5   P25 Pin Input/Output Mode Selection
PM2.PM24          4   P24 Pin Input/Output Mode Selection
PM2.PM23          3   P23 Pin Input/Output Mode Selection
PM2.PM22          2   P22 Pin Input/Output Mode Selection
PM2.PM21          1   P21 Pin Input/Output Mode Selection
PM2.PM20          0   P20 Pin Input/Output Mode Selection
PM3              0xFF23   Port mode register 3
PM3.PM31          1   P31 Pin Input/Output Mode Selection
PM3.PM30          0   P30 Pin Input/Output Mode Selection
RESERVEDFF24     0xFF24   RESERVED
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB27        7   P27 on-chip pull-up resistor selection
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock selection register 2
WDCS.WDCS2        2   Count clock selection bit 2
WDCS.WDCS1        1   Count clock selection bit 1
WDCS.WDCS0        0   Count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag setting
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock (fcl) selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock (fcl) selection bit 0
TMC90.TOE90       0   16-bit timer counter output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit Operation Control
ASIM20.RXE20      6   Receive Operation Control
ASIM20.PS201      5   Parity Bit Specification bit 1
ASIM20.PS200      4   Parity Bit Specification bit 0
ASIM20.CL20       3   Transmit data character Length Specification
ASIM20.SL20       2   Transmit Data Stop Bit Length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2    Parity Error Flag
ASIS20.FE20       1    Flaming Error Flag
ASIS20.OVE20      0    Overrun Error Flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   3-wire serial I/O mode operation control
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-Bit Counter Source Clock Selection bit 3
BRGC20.TPS202     6   3-Bit Counter Source Clock Selection bit 2
BRGC20.TPS201     5   3-Bit Counter Source Clock Selection bit 1
BRGC20.TPS200     4   3-Bit Counter Source Clock Selection bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        5   STIF20 - Interrupt Request Flag
IF0.SRIF20        4   SRIF20 - Interrupt Request Flag
IF0.PIF2          3   PIF2 - Interrupt Request Flag
IF0.PIF1          2   PIF1 - Interrupt Request Flag
IF0.PIF0          1   PIF0 - Interrupt Request Flag
IF0.WDTIF         0   WDTIF - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.TMIF90        7   TMIF90 - Interrupt Request Flag
IF1.TMIF80        0   TMIF80 - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.SRMK20        4   SRMK20 - Interrupt handling control
MK0.PMK2          3   PMK2 - Interrupt handling control
MK0.PMK1          2   PMK1 - Interrupt handling control
MK0.PMK0          1   PMK0 - Interrupt handling control
MK0.WDTMK         0   WDTMK - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.TMMK90        7   TMMK90 - Interrupt handling control
MK1.TMMK80        0   TMMK80 - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 Valid Edge Selection bit 1
INTM0.ES20        6   INTP2 Valid Edge Selection bit 0
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP0 Valid Edge Selection bit 1
INTM0.ES00        2   INTP0 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PUO3          3   P3 on-chip pull-up resistor selection
PU0.PUO1          1   P1 on-chip pull-up resistor selection
PU0.PUO0          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation Stabilization Time Selection Register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789101
; U13045EJ2V0UM00.PDF


.UPD789102
; U13045EJ2V0UM00.PDF
.UPD789104
; U13045EJ2V0UM00.PDF
.UPD789101A
; U14590EJ1V0DS00.PDF, U14643EJ1V0UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x8000   Internal ROM
area BSS RESERVED   0x8000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789101A_A
; U14590EJ1V0DS00.PDF, U14643EJ1V0UM00.PDF
.UPD789101A_A1
; U14925EJ1V1DS00.PDF, U14643EJ1V0UM00.PDF

.UPD789101A_A2
; U14925EJ1V1DS00.PDF, U14643EJ1V0UM00.PDF
.UPD789102A
; U14590EJ1V0DS00.PDF, U14643EJ1V0UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x1000   Internal ROM
area BSS RESERVED   0x1000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789102A_A
; U14590EJ1V0DS00.PDF, U14643EJ1V0UM00.PDF
.UPD789102A_A1
; U14925EJ1V1DS00.PDF, U14643EJ1V0UM00.PDF
.UPD789102A_A2
; U14925EJ1V1DS00.PDF, U14643EJ1V0UM00.PDF
.UPD789104A
; U14590EJ1V0DS00.PDF, U14643EJ1V0UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x2000   Internal ROM
area BSS RESERVED   0x2000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789104A_A
; U14590EJ1V0DS00.PDF, U14643EJ1V0UM00.PDF
.UPD789104A_A1
; U14925EJ1V1DS00.PDF, U14643EJ1V0UM00.PDF
.UPD789104A_A2
; U14925EJ1V1DS00.PDF, U14643EJ1V0UM00.PDF
.UPD789111
; U13045EJ2V0UM00.PDF

.UPD789112
; U13045EJ2V0UM00.PDF
.UPD789114
; U13045EJ2V0UM00.PDF
.UPD78F9116
; U13045EJ2V0UM00.PDF
.UPD789111A
; U14590EJ1V0DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x8000   Internal ROM
area BSS RESERVED   0x8000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789111A_A
; U14590EJ1V0DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF
.UPD789111A_A1
; U14925EJ1V1DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF
.UPD789111A_A2
; U14925EJ1V1DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF
.UPD789112A
; U14590EJ1V0DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x1000   Internal ROM
area BSS RESERVED   0x1000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789112A_A
; U14590EJ1V0DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF
.UPD789112A_A1
; U14925EJ1V1DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF
.UPD789112A_A2
; U14925EJ1V1DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF
.UPD789114A
; U14590EJ1V0DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x2000   Internal ROM
area BSS RESERVED   0x2000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789114A_A
; U14590EJ1V0DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF
.UPD789114A_A1
; U14925EJ1V1DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF
.UPD789114A_A2
; U14925EJ1V1DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF
.UPD78F9116A
; U14667EJ1V1DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x4000   Flash memory
area BSS RESERVED   0x4000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789121A
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14678EJ1V0DS00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x8000   Internal ROM
area BSS RESERVED   0x8000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
RESERVEDFFFA     0xFFFA   RESERVED
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789121A_A
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14678EJ1V0DS00.PDF



.UPD789121A_A1
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14926EJ1V0DS00.PDF




.UPD789121A_A2
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14926EJ1V0DS00.PDF




.UPD789122A
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14678EJ1V0DS00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x1000   Internal ROM
area BSS RESERVED   0x1000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
RESERVEDFFFA     0xFFFA   RESERVED
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789122A_A
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14678EJ1V0DS00.PDF




.UPD789122A_A1
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14926EJ1V0DS00.PDF




.UPD789122A_A2
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14926EJ1V0DS00.PDF




.UPD789124A
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14678EJ1V0DS00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x2000   Internal ROM
area BSS RESERVED   0x2000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
RESERVEDFFFA     0xFFFA   RESERVED
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789124A_A
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14678EJ1V0DS00.PDF




.UPD789124A_A1
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14926EJ1V0DS00.PDF




.UPD789124A_A2
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14926EJ1V0DS00.PDF




.UPD789131A
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14678EJ1V0DS00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x8000   Internal ROM
area BSS RESERVED   0x8000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
RESERVEDFFFA     0xFFFA   RESERVED
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789131A_A
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14678EJ1V0DS00.PDF



.UPD789131A_A1
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14926EJ1V0DS00.PDF



.UPD789131A_A2
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14926EJ1V0DS00.PDF




.UPD789132A
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14678EJ1V0DS00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x1000   Internal ROM
area BSS RESERVED   0x1000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
RESERVEDFFFA     0xFFFA   RESERVED
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789132A_A
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14678EJ1V0DS00.PDF



.UPD789132A_A1
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14926EJ1V0DS00.PDF



.UPD789132A_A2
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14926EJ1V0DS00.PDF



.UPD789134A
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14678EJ1V0DS00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x2000   Internal ROM
area BSS RESERVED   0x2000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
RESERVEDFFFA     0xFFFA   RESERVED
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789134A_A
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14678EJ1V0DS00.PDF




.UPD789134A_A1
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14926EJ1V0DS00.PDF




.UPD789134A_A2
; U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF, U14926EJ1V0DS00.PDF



.UPD78F9136A
; U14690EJ1V0DS00.PDF, U14643EJ1V0UM00.PDF, U13423EE2V0PL00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x4000   Flash memory
area BSS RESERVED   0x4000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTSR_INTCSI0     0x000C   INTSR/INTCSI0
interrupt INTST20_          0x000E   INTST20
interrupt INTTM80_          0x0010   INTTM80
interrupt INTTM20_          0x0012   INTTM20
interrupt INTAD0_           0x0014   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Time clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inverse control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer 20 output control
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   8-bit timer counter 80 operation control
TMC80.PWME80      6   Operation mode selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operating mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmit shift / Receive buffer register 20
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF20        7   TMIF20 - Interrupt request flag
IF0.TMIF80        6   TMIF80 - Interrupt request flag
IF0.STIF20        5   STIF20 - Interrupt request flag
IF0.SRIF20        4   SRIF20 - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         0   ADIF0 - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK20        7   TMMK20 - Interrupt servicing control
MK0.TMMK80        6   TMMK80 - Interrupt servicing control
MK0.STMK20        5   STMK20 - Interrupt servicing control
MK0.SRMK20        4   SRMK20 - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         0   ADMK0  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selects operation of watchdog timer
WDTM.WDTM4        4   Selects operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selects operation mode of watchdog timer bit 3
RESERVEDFFFA     0xFFFA   RESERVED
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789166
; U14017EJ3V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0010   INTST20
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM80_          0x0016   INTTM80
interrupt INTTM81_          0x0018   INTTM81
interrupt INTTM82_          0x001A   INTTM82
interrupt INTTM90_          0x001C   INTTM90
interrupt INTAD0_           0x0022   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF50     0xFF50   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   TM80 operation control
TMC80.PWME80      6   PWM output selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
CR81             0xFF54   8-bit compare register 81
TM81             0xFF55   8-bit timer counter 81
RESERVEDFF56     0xFF56   RESERVED
TMC81            0xFF57   8-bit timer mode control register 81
TMC81.TCE81       7   TM81 operation control
TMC81.PWME81      6   PWM output selection
TMC81.TCL811      2   8-bit timer counter 81 count clock selection bit 1
TMC81.TCL810      1   8-bit timer counter 81 count clock selection bit 0
TMC81.TOE81       0   8-bit timer/event counter 81 output control
CR82             0xFF58   8-bit compare register 82
TM82             0xFF59   8-bit timer counter 82
RESERVEDFF5A     0xFF5A   RESERVED
TMC82            0xFF5B   8-bit timer mode control register 82
TMC82.TCE82       7   TM82 operation control
TMC82.PWME82      6   PWM output selection
TMC82.TCL821      2   8-bit timer counter 82 count clock selection bit 1
TMC82.TCL820      1   8-bit timer counter 82 count clock selection bit 0
TMC82.TOE82       0   8-bit timer 82 output control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmission shift / Reception buffer register 20
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF20        6   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         7   ADIF0    - Interrupt request flag
IF1.SMBOVIF0      6   SMBOVIF0 - Interrupt request flag
IF1.SMBIF0        5   SMBIF0   - Interrupt request flag
IF1.TMIF90        4   TMIF90   - Interrupt request flag
IF1.TMIF82        3   TMIF82   - Interrupt request flag
IF1.TMIF81        2   TMIF81   - Interrupt request flag
IF1.TMIF80        1   TMIF80   - Interrupt request flag
IF1.WTIIF         0   WTIIF    - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt handling control
MK0.SRMK20        6   SRMK20 - Interrupt handling control
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.PMK3          4   PMK3   - Interrupt handling control
MK0.PMK2          3   PMK2   - Interrupt handling control
MK0.PMK1          2   PMK1   - Interrupt handling control
MK0.PMK0          1   PMK0   - Interrupt handling control
MK0.TMMK4         0   TMMK4  - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         7   ADMK0    - Interrupt handling control
MK1.SMBOVMK0      6   SMBOVMK0 - Interrupt handling control
MK1.SMBMK0        5   SMBMK0   - Interrupt handling control
MK1.TMMK90        4   TMMK90   - Interrupt handling control
MK1.TMMK82        3   TMMK82   - Interrupt handling control
MK1.TMMK81        2   TMMK81   - Interrupt handling control
MK1.TMMK80        1   TMMK80   - Interrupt handling control
MK1.WTIMK         0   WTIMK    - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        3   INTLVI0 valid edge selection bit 1
INTM1.ES40        2   INTLVI0 valid edge selection bit 0
INTM1.ES41        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Use of feedback resistor
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection 2
OSTS.OSTS1        1   Oscillation stabilization time selection 1
OSTS.OSTS0        0   Oscillation stabilization time selection 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789166Y
; U14017EJ3V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0010   INTST20
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM80_          0x0016   INTTM80
interrupt INTTM81_          0x0018   INTTM81
interrupt INTTM82_          0x001A   INTTM82
interrupt INTTM90_          0x001C   INTTM90
interrupt INTAD0_           0x0022   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF50     0xFF50   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   TM80 operation control
TMC80.PWME80      6   PWM output selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
CR81             0xFF54   8-bit compare register 81
TM81             0xFF55   8-bit timer counter 81
RESERVEDFF56     0xFF56   RESERVED
TMC81            0xFF57   8-bit timer mode control register 81
TMC81.TCE81       7   TM81 operation control
TMC81.PWME81      6   PWM output selection
TMC81.TCL811      2   8-bit timer counter 81 count clock selection bit 1
TMC81.TCL810      1   8-bit timer counter 81 count clock selection bit 0
TMC81.TOE81       0   8-bit timer/event counter 81 output control
CR82             0xFF58   8-bit compare register 82
TM82             0xFF59   8-bit timer counter 82
RESERVEDFF5A     0xFF5A   RESERVED
TMC82            0xFF5B   8-bit timer mode control register 82
TMC82.TCE82       7   TM82 operation control
TMC82.PWME82      6   PWM output selection
TMC82.TCL821      2   8-bit timer counter 82 count clock selection bit 1
TMC82.TCL820      1   8-bit timer counter 82 count clock selection bit 0
TMC82.TOE82       0   8-bit timer 82 output control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmission shift / Reception buffer register 20
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF20        6   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         7   ADIF0    - Interrupt request flag
IF1.SMBOVIF0      6   SMBOVIF0 - Interrupt request flag
IF1.SMBIF0        5   SMBIF0   - Interrupt request flag
IF1.TMIF90        4   TMIF90   - Interrupt request flag
IF1.TMIF82        3   TMIF82   - Interrupt request flag
IF1.TMIF81        2   TMIF81   - Interrupt request flag
IF1.TMIF80        1   TMIF80   - Interrupt request flag
IF1.WTIIF         0   WTIIF    - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt handling control
MK0.SRMK20        6   SRMK20 - Interrupt handling control
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.PMK3          4   PMK3   - Interrupt handling control
MK0.PMK2          3   PMK2   - Interrupt handling control
MK0.PMK1          2   PMK1   - Interrupt handling control
MK0.PMK0          1   PMK0   - Interrupt handling control
MK0.TMMK4         0   TMMK4  - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         7   ADMK0    - Interrupt handling control
MK1.SMBOVMK0      6   SMBOVMK0 - Interrupt handling control
MK1.SMBMK0        5   SMBMK0   - Interrupt handling control
MK1.TMMK90        4   TMMK90   - Interrupt handling control
MK1.TMMK82        3   TMMK82   - Interrupt handling control
MK1.TMMK81        2   TMMK81   - Interrupt handling control
MK1.TMMK80        1   TMMK80   - Interrupt handling control
MK1.WTIMK         0   WTIMK    - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        3   INTLVI0 valid edge selection bit 1
INTM1.ES40        2   INTLVI0 valid edge selection bit 0
INTM1.ES41        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Use of feedback resistor
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection 2
OSTS.OSTS1        1   Oscillation stabilization time selection 1
OSTS.OSTS0        0   Oscillation stabilization time selection 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789166_A
; U14017EJ3V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF




.UPD789166_A1
; U15005EJ1V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF




.UPD789166_A2
; U15005EJ1V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF




.UPD789167
; U14017EJ3V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x6000   Internal ROM
area BSS RESERVED   0x6000:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0010   INTST20
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM80_          0x0016   INTTM80
interrupt INTTM81_          0x0018   INTTM81
interrupt INTTM82_          0x001A   INTTM82
interrupt INTTM90_          0x001C   INTTM90
interrupt INTAD0_           0x0022   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF50     0xFF50   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   TM80 operation control
TMC80.PWME80      6   PWM output selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
CR81             0xFF54   8-bit compare register 81
TM81             0xFF55   8-bit timer counter 81
RESERVEDFF56     0xFF56   RESERVED
TMC81            0xFF57   8-bit timer mode control register 81
TMC81.TCE81       7   TM81 operation control
TMC81.PWME81      6   PWM output selection
TMC81.TCL811      2   8-bit timer counter 81 count clock selection bit 1
TMC81.TCL810      1   8-bit timer counter 81 count clock selection bit 0
TMC81.TOE81       0   8-bit timer/event counter 81 output control
CR82             0xFF58   8-bit compare register 82
TM82             0xFF59   8-bit timer counter 82
RESERVEDFF5A     0xFF5A   RESERVED
TMC82            0xFF5B   8-bit timer mode control register 82
TMC82.TCE82       7   TM82 operation control
TMC82.PWME82      6   PWM output selection
TMC82.TCL821      2   8-bit timer counter 82 count clock selection bit 1
TMC82.TCL820      1   8-bit timer counter 82 count clock selection bit 0
TMC82.TOE82       0   8-bit timer 82 output control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmission shift / Reception buffer register 20
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF20        6   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         7   ADIF0    - Interrupt request flag
IF1.SMBOVIF0      6   SMBOVIF0 - Interrupt request flag
IF1.SMBIF0        5   SMBIF0   - Interrupt request flag
IF1.TMIF90        4   TMIF90   - Interrupt request flag
IF1.TMIF82        3   TMIF82   - Interrupt request flag
IF1.TMIF81        2   TMIF81   - Interrupt request flag
IF1.TMIF80        1   TMIF80   - Interrupt request flag
IF1.WTIIF         0   WTIIF    - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt handling control
MK0.SRMK20        6   SRMK20 - Interrupt handling control
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.PMK3          4   PMK3   - Interrupt handling control
MK0.PMK2          3   PMK2   - Interrupt handling control
MK0.PMK1          2   PMK1   - Interrupt handling control
MK0.PMK0          1   PMK0   - Interrupt handling control
MK0.TMMK4         0   TMMK4  - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         7   ADMK0    - Interrupt handling control
MK1.SMBOVMK0      6   SMBOVMK0 - Interrupt handling control
MK1.SMBMK0        5   SMBMK0   - Interrupt handling control
MK1.TMMK90        4   TMMK90   - Interrupt handling control
MK1.TMMK82        3   TMMK82   - Interrupt handling control
MK1.TMMK81        2   TMMK81   - Interrupt handling control
MK1.TMMK80        1   TMMK80   - Interrupt handling control
MK1.WTIMK         0   WTIMK    - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        3   INTLVI0 valid edge selection bit 1
INTM1.ES40        2   INTLVI0 valid edge selection bit 0
INTM1.ES41        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Use of feedback resistor
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection 2
OSTS.OSTS1        1   Oscillation stabilization time selection 1
OSTS.OSTS0        0   Oscillation stabilization time selection 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789167Y
; U14017EJ3V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x6000   Internal ROM
area BSS RESERVED   0x6000:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0010   INTST20
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM80_          0x0016   INTTM80
interrupt INTTM81_          0x0018   INTTM81
interrupt INTTM82_          0x001A   INTTM82
interrupt INTTM90_          0x001C   INTTM90
interrupt INTSMB0_          0x001E   INTSMB0 (mPD789167Y and 789177Y Subseries)
interrupt INTSMBOV0_        0x0020   INTSMBOV0 (mPD789167Y and 789177Y Subseries)
interrupt INTAD0_           0x0022   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF50     0xFF50   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   TM80 operation control
TMC80.PWME80      6   PWM output selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
CR81             0xFF54   8-bit compare register 81
TM81             0xFF55   8-bit timer counter 81
RESERVEDFF56     0xFF56   RESERVED
TMC81            0xFF57   8-bit timer mode control register 81
TMC81.TCE81       7   TM81 operation control
TMC81.PWME81      6   PWM output selection
TMC81.TCL811      2   8-bit timer counter 81 count clock selection bit 1
TMC81.TCL810      1   8-bit timer counter 81 count clock selection bit 0
TMC81.TOE81       0   8-bit timer/event counter 81 output control
CR82             0xFF58   8-bit compare register 82
TM82             0xFF59   8-bit timer counter 82
RESERVEDFF5A     0xFF5A   RESERVED
TMC82            0xFF5B   8-bit timer mode control register 82
TMC82.TCE82       7   TM82 operation control
TMC82.PWME82      6   PWM output selection
TMC82.TCL821      2   8-bit timer counter 82 count clock selection bit 1
TMC82.TCL820      1   8-bit timer counter 82 count clock selection bit 0
TMC82.TOE82       0   8-bit timer 82 output control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmission shift / Reception buffer register 20
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
SMBC0            0xFF78   SMB control register 0 (mPD789167Y and 789177Y Subseries)
SMBC0.SMBE0       7   SMB operation
SMBC0.LREL0       6   Escape from transmission
SMBC0.WREL0       5   Wait cancel
SMBC0.SPIE0       4   Interrupt request generation at stop condition detection
SMBC0.WTIM0       3   Wait and interrupt request generation control
SMBC0.ACKE0       2   Acknowledge control
SMBC0.STT0        1   Start condition trigger
SMBC0.SPT0        0   Stop condition trigger
SMBS0            0xFF79   SMB status register 0 (mPD789167Y and 789177Y Subseries)
SMBS0.MSTS0       7   Master status
SMBS0.ALD0        6   Arbitration defeat detection
SMBS0.EXC0        5   Extension code receive detection
SMBS0.COI0        4   Matching address detection
SMBS0.TRC0        3   Receive/send status detection
SMBS0.ACKD0       2   Acknowledge output
SMBS0.STD0        1   Start condition detection
SMBS0.SPD0        0   Stop condition detection
SMBCL0           0xFF7A   SMB clock selection register 0 (mPD789167Y and 789177Y Subseries)
SMBCL0.CLD0       5   SCL0 line level detection (valid only when SMBE0 = 1)
SMBCL0.DAD0       4   SDA0 line level detection (valid only when SMBE0 = 1)
SMBCL0.SMC0       3   Operating mode switching
SMBCL0.DFC0       2   Digital filter operation control
SMBCL0.CL01       1   Communication clock bit 1
SMBCL0.CL00       0   Communication clock bit 0
SMBSVA0          0xFF7B   SMB slave address register 0 (mPD789167Y and 789177Y Subseries)
SMBM0            0xFF7C   SMB mode register 0 (mPD789167Y and 789177Y Subseries)
SMBM0.SCLCTL0     5   SCL level control
SMBM0.AWTIM0      4   Wait and interrupt control when an address match is found
SMBM0.STIE0       3   Start condition interrupt enable
SMBM0.TOEN0       2   Time-out count enable bit
SMBM0.TOCL01      1   Time-out clock selection bit 1
SMBM0.TOCL00      0   Time-out clock selection bit 0
SMBVI0           0xFF7D   SMB input level setting register 0 (mPD789167Y and 789177Y Subseries)
SMBVI0.TOS02      6   Time-out time selection bit 2
SMBVI0.TOS01      5   Time-out time selection bit 1
SMBVI0.TOS00      4   Time-out time selection bit 0
SMBVI0.SVIN0      3   Input level selection bit
SMBVI0.LVL01      1   Input level selection bit 1
SMBVI0.LVL00      0   Input level selection bit 0
SMB0             0xFF7E   SMB shift register 0 (mPD789167Y and 789177Y Subseries)
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF20        6   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         7   ADIF0    - Interrupt request flag
IF1.SMBOVIF0      6   SMBOVIF0 - Interrupt request flag
IF1.SMBIF0        5   SMBIF0   - Interrupt request flag
IF1.TMIF90        4   TMIF90   - Interrupt request flag
IF1.TMIF82        3   TMIF82   - Interrupt request flag
IF1.TMIF81        2   TMIF81   - Interrupt request flag
IF1.TMIF80        1   TMIF80   - Interrupt request flag
IF1.WTIIF         0   WTIIF    - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt handling control
MK0.SRMK20        6   SRMK20 - Interrupt handling control
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.PMK3          4   PMK3   - Interrupt handling control
MK0.PMK2          3   PMK2   - Interrupt handling control
MK0.PMK1          2   PMK1   - Interrupt handling control
MK0.PMK0          1   PMK0   - Interrupt handling control
MK0.TMMK4         0   TMMK4  - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         7   ADMK0    - Interrupt handling control
MK1.SMBOVMK0      6   SMBOVMK0 - Interrupt handling control
MK1.SMBMK0        5   SMBMK0   - Interrupt handling control
MK1.TMMK90        4   TMMK90   - Interrupt handling control
MK1.TMMK82        3   TMMK82   - Interrupt handling control
MK1.TMMK81        2   TMMK81   - Interrupt handling control
MK1.TMMK80        1   TMMK80   - Interrupt handling control
MK1.WTIMK         0   WTIMK    - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        3   INTLVI0 valid edge selection bit 1
INTM1.ES40        2   INTLVI0 valid edge selection bit 0
INTM1.ES41        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Use of feedback resistor
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection 2
OSTS.OSTS1        1   Oscillation stabilization time selection 1
OSTS.OSTS0        0   Oscillation stabilization time selection 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789167_A
; U14017EJ3V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF
.UPD789167_A1
; U15005EJ1V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF




.UPD789167_A2
; U15005EJ1V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF




.UPD789176
; U14017EJ3V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0010   INTST20
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM80_          0x0016   INTTM80
interrupt INTTM81_          0x0018   INTTM81
interrupt INTTM82_          0x001A   INTTM82
interrupt INTTM90_          0x001C   INTTM90
interrupt INTAD0_           0x0022   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF50     0xFF50   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   TM80 operation control
TMC80.PWME80      6   PWM output selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
CR81             0xFF54   8-bit compare register 81
TM81             0xFF55   8-bit timer counter 81
RESERVEDFF56     0xFF56   RESERVED
TMC81            0xFF57   8-bit timer mode control register 81
TMC81.TCE81       7   TM81 operation control
TMC81.PWME81      6   PWM output selection
TMC81.TCL811      2   8-bit timer counter 81 count clock selection bit 1
TMC81.TCL810      1   8-bit timer counter 81 count clock selection bit 0
TMC81.TOE81       0   8-bit timer/event counter 81 output control
CR82             0xFF58   8-bit compare register 82
TM82             0xFF59   8-bit timer counter 82
RESERVEDFF5A     0xFF5A   RESERVED
TMC82            0xFF5B   8-bit timer mode control register 82
TMC82.TCE82       7   TM82 operation control
TMC82.PWME82      6   PWM output selection
TMC82.TCL821      2   8-bit timer counter 82 count clock selection bit 1
TMC82.TCL820      1   8-bit timer counter 82 count clock selection bit 0
TMC82.TOE82       0   8-bit timer 82 output control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmission shift / Reception buffer register 20
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF20        6   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         7   ADIF0    - Interrupt request flag
IF1.SMBOVIF0      6   SMBOVIF0 - Interrupt request flag
IF1.SMBIF0        5   SMBIF0   - Interrupt request flag
IF1.TMIF90        4   TMIF90   - Interrupt request flag
IF1.TMIF82        3   TMIF82   - Interrupt request flag
IF1.TMIF81        2   TMIF81   - Interrupt request flag
IF1.TMIF80        1   TMIF80   - Interrupt request flag
IF1.WTIIF         0   WTIIF    - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt handling control
MK0.SRMK20        6   SRMK20 - Interrupt handling control
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.PMK3          4   PMK3   - Interrupt handling control
MK0.PMK2          3   PMK2   - Interrupt handling control
MK0.PMK1          2   PMK1   - Interrupt handling control
MK0.PMK0          1   PMK0   - Interrupt handling control
MK0.TMMK4         0   TMMK4  - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         7   ADMK0    - Interrupt handling control
MK1.SMBOVMK0      6   SMBOVMK0 - Interrupt handling control
MK1.SMBMK0        5   SMBMK0   - Interrupt handling control
MK1.TMMK90        4   TMMK90   - Interrupt handling control
MK1.TMMK82        3   TMMK82   - Interrupt handling control
MK1.TMMK81        2   TMMK81   - Interrupt handling control
MK1.TMMK80        1   TMMK80   - Interrupt handling control
MK1.WTIMK         0   WTIMK    - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        3   INTLVI0 valid edge selection bit 1
INTM1.ES40        2   INTLVI0 valid edge selection bit 0
INTM1.ES41        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Use of feedback resistor
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection 2
OSTS.OSTS1        1   Oscillation stabilization time selection 1
OSTS.OSTS0        0   Oscillation stabilization time selection 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789176Y
; U14017EJ3V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0010   INTST20
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM80_          0x0016   INTTM80
interrupt INTTM81_          0x0018   INTTM81
interrupt INTTM82_          0x001A   INTTM82
interrupt INTTM90_          0x001C   INTTM90
interrupt INTAD0_           0x0022   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF50     0xFF50   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   TM80 operation control
TMC80.PWME80      6   PWM output selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
CR81             0xFF54   8-bit compare register 81
TM81             0xFF55   8-bit timer counter 81
RESERVEDFF56     0xFF56   RESERVED
TMC81            0xFF57   8-bit timer mode control register 81
TMC81.TCE81       7   TM81 operation control
TMC81.PWME81      6   PWM output selection
TMC81.TCL811      2   8-bit timer counter 81 count clock selection bit 1
TMC81.TCL810      1   8-bit timer counter 81 count clock selection bit 0
TMC81.TOE81       0   8-bit timer/event counter 81 output control
CR82             0xFF58   8-bit compare register 82
TM82             0xFF59   8-bit timer counter 82
RESERVEDFF5A     0xFF5A   RESERVED
TMC82            0xFF5B   8-bit timer mode control register 82
TMC82.TCE82       7   TM82 operation control
TMC82.PWME82      6   PWM output selection
TMC82.TCL821      2   8-bit timer counter 82 count clock selection bit 1
TMC82.TCL820      1   8-bit timer counter 82 count clock selection bit 0
TMC82.TOE82       0   8-bit timer 82 output control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmission shift / Reception buffer register 20
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF20        6   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         7   ADIF0    - Interrupt request flag
IF1.SMBOVIF0      6   SMBOVIF0 - Interrupt request flag
IF1.SMBIF0        5   SMBIF0   - Interrupt request flag
IF1.TMIF90        4   TMIF90   - Interrupt request flag
IF1.TMIF82        3   TMIF82   - Interrupt request flag
IF1.TMIF81        2   TMIF81   - Interrupt request flag
IF1.TMIF80        1   TMIF80   - Interrupt request flag
IF1.WTIIF         0   WTIIF    - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt handling control
MK0.SRMK20        6   SRMK20 - Interrupt handling control
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.PMK3          4   PMK3   - Interrupt handling control
MK0.PMK2          3   PMK2   - Interrupt handling control
MK0.PMK1          2   PMK1   - Interrupt handling control
MK0.PMK0          1   PMK0   - Interrupt handling control
MK0.TMMK4         0   TMMK4  - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         7   ADMK0    - Interrupt handling control
MK1.SMBOVMK0      6   SMBOVMK0 - Interrupt handling control
MK1.SMBMK0        5   SMBMK0   - Interrupt handling control
MK1.TMMK90        4   TMMK90   - Interrupt handling control
MK1.TMMK82        3   TMMK82   - Interrupt handling control
MK1.TMMK81        2   TMMK81   - Interrupt handling control
MK1.TMMK80        1   TMMK80   - Interrupt handling control
MK1.WTIMK         0   WTIMK    - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        3   INTLVI0 valid edge selection bit 1
INTM1.ES40        2   INTLVI0 valid edge selection bit 0
INTM1.ES41        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Use of feedback resistor
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection 2
OSTS.OSTS1        1   Oscillation stabilization time selection 1
OSTS.OSTS0        0   Oscillation stabilization time selection 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789176_A
; U14017EJ3V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF



.UPD789176_A1
; U15005EJ1V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF



.UPD789176_A2
; U15005EJ1V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF



.UPD789177
; U14017EJ3V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x6000   Internal ROM
area BSS RESERVED   0x6000:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0010   INTST20
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM80_          0x0016   INTTM80
interrupt INTTM81_          0x0018   INTTM81
interrupt INTTM82_          0x001A   INTTM82
interrupt INTTM90_          0x001C   INTTM90
interrupt INTAD0_           0x0022   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF50     0xFF50   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   TM80 operation control
TMC80.PWME80      6   PWM output selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
CR81             0xFF54   8-bit compare register 81
TM81             0xFF55   8-bit timer counter 81
RESERVEDFF56     0xFF56   RESERVED
TMC81            0xFF57   8-bit timer mode control register 81
TMC81.TCE81       7   TM81 operation control
TMC81.PWME81      6   PWM output selection
TMC81.TCL811      2   8-bit timer counter 81 count clock selection bit 1
TMC81.TCL810      1   8-bit timer counter 81 count clock selection bit 0
TMC81.TOE81       0   8-bit timer/event counter 81 output control
CR82             0xFF58   8-bit compare register 82
TM82             0xFF59   8-bit timer counter 82
RESERVEDFF5A     0xFF5A   RESERVED
TMC82            0xFF5B   8-bit timer mode control register 82
TMC82.TCE82       7   TM82 operation control
TMC82.PWME82      6   PWM output selection
TMC82.TCL821      2   8-bit timer counter 82 count clock selection bit 1
TMC82.TCL820      1   8-bit timer counter 82 count clock selection bit 0
TMC82.TOE82       0   8-bit timer 82 output control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmission shift / Reception buffer register 20
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF20        6   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         7   ADIF0    - Interrupt request flag
IF1.SMBOVIF0      6   SMBOVIF0 - Interrupt request flag
IF1.SMBIF0        5   SMBIF0   - Interrupt request flag
IF1.TMIF90        4   TMIF90   - Interrupt request flag
IF1.TMIF82        3   TMIF82   - Interrupt request flag
IF1.TMIF81        2   TMIF81   - Interrupt request flag
IF1.TMIF80        1   TMIF80   - Interrupt request flag
IF1.WTIIF         0   WTIIF    - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt handling control
MK0.SRMK20        6   SRMK20 - Interrupt handling control
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.PMK3          4   PMK3   - Interrupt handling control
MK0.PMK2          3   PMK2   - Interrupt handling control
MK0.PMK1          2   PMK1   - Interrupt handling control
MK0.PMK0          1   PMK0   - Interrupt handling control
MK0.TMMK4         0   TMMK4  - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         7   ADMK0    - Interrupt handling control
MK1.SMBOVMK0      6   SMBOVMK0 - Interrupt handling control
MK1.SMBMK0        5   SMBMK0   - Interrupt handling control
MK1.TMMK90        4   TMMK90   - Interrupt handling control
MK1.TMMK82        3   TMMK82   - Interrupt handling control
MK1.TMMK81        2   TMMK81   - Interrupt handling control
MK1.TMMK80        1   TMMK80   - Interrupt handling control
MK1.WTIMK         0   WTIMK    - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        3   INTLVI0 valid edge selection bit 1
INTM1.ES40        2   INTLVI0 valid edge selection bit 0
INTM1.ES41        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Use of feedback resistor
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection 2
OSTS.OSTS1        1   Oscillation stabilization time selection 1
OSTS.OSTS0        0   Oscillation stabilization time selection 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789177Y
; U14017EJ3V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x6000   Internal ROM
area BSS RESERVED   0x6000:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0010   INTST20
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM80_          0x0016   INTTM80
interrupt INTTM81_          0x0018   INTTM81
interrupt INTTM82_          0x001A   INTTM82
interrupt INTTM90_          0x001C   INTTM90
interrupt INTSMB0_          0x001E   INTSMB0 (mPD789167Y and 789177Y Subseries)
interrupt INTSMBOV0_        0x0020   INTSMBOV0 (mPD789167Y and 789177Y Subseries)
interrupt INTAD0_           0x0022   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF50     0xFF50   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   TM80 operation control
TMC80.PWME80      6   PWM output selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
CR81             0xFF54   8-bit compare register 81
TM81             0xFF55   8-bit timer counter 81
RESERVEDFF56     0xFF56   RESERVED
TMC81            0xFF57   8-bit timer mode control register 81
TMC81.TCE81       7   TM81 operation control
TMC81.PWME81      6   PWM output selection
TMC81.TCL811      2   8-bit timer counter 81 count clock selection bit 1
TMC81.TCL810      1   8-bit timer counter 81 count clock selection bit 0
TMC81.TOE81       0   8-bit timer/event counter 81 output control
CR82             0xFF58   8-bit compare register 82
TM82             0xFF59   8-bit timer counter 82
RESERVEDFF5A     0xFF5A   RESERVED
TMC82            0xFF5B   8-bit timer mode control register 82
TMC82.TCE82       7   TM82 operation control
TMC82.PWME82      6   PWM output selection
TMC82.TCL821      2   8-bit timer counter 82 count clock selection bit 1
TMC82.TCL820      1   8-bit timer counter 82 count clock selection bit 0
TMC82.TOE82       0   8-bit timer 82 output control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmission shift / Reception buffer register 20
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
SMBC0            0xFF78   SMB control register 0 (mPD789167Y and 789177Y Subseries)
SMBC0.SMBE0       7   SMB operation
SMBC0.LREL0       6   Escape from transmission
SMBC0.WREL0       5   Wait cancel
SMBC0.SPIE0       4   Interrupt request generation at stop condition detection
SMBC0.WTIM0       3   Wait and interrupt request generation control
SMBC0.ACKE0       2   Acknowledge control
SMBC0.STT0        1   Start condition trigger
SMBC0.SPT0        0   Stop condition trigger
SMBS0            0xFF79   SMB status register 0 (mPD789167Y and 789177Y Subseries)
SMBS0.MSTS0       7   Master status
SMBS0.ALD0        6   Arbitration defeat detection
SMBS0.EXC0        5   Extension code receive detection
SMBS0.COI0        4   Matching address detection
SMBS0.TRC0        3   Receive/send status detection
SMBS0.ACKD0       2   Acknowledge output
SMBS0.STD0        1   Start condition detection
SMBS0.SPD0        0   Stop condition detection
SMBCL0           0xFF7A   SMB clock selection register 0 (mPD789167Y and 789177Y Subseries)
SMBCL0.CLD0       5   SCL0 line level detection (valid only when SMBE0 = 1)
SMBCL0.DAD0       4   SDA0 line level detection (valid only when SMBE0 = 1)
SMBCL0.SMC0       3   Operating mode switching
SMBCL0.DFC0       2   Digital filter operation control
SMBCL0.CL01       1   Communication clock bit 1
SMBCL0.CL00       0   Communication clock bit 0
SMBSVA0          0xFF7B   SMB slave address register 0 (mPD789167Y and 789177Y Subseries)
SMBM0            0xFF7C   SMB mode register 0 (mPD789167Y and 789177Y Subseries)
SMBM0.SCLCTL0     5   SCL level control
SMBM0.AWTIM0      4   Wait and interrupt control when an address match is found
SMBM0.STIE0       3   Start condition interrupt enable
SMBM0.TOEN0       2   Time-out count enable bit
SMBM0.TOCL01      1   Time-out clock selection bit 1
SMBM0.TOCL00      0   Time-out clock selection bit 0
SMBVI0           0xFF7D   SMB input level setting register 0 (mPD789167Y and 789177Y Subseries)
SMBVI0.TOS02      6   Time-out time selection bit 2
SMBVI0.TOS01      5   Time-out time selection bit 1
SMBVI0.TOS00      4   Time-out time selection bit 0
SMBVI0.SVIN0      3   Input level selection bit
SMBVI0.LVL01      1   Input level selection bit 1
SMBVI0.LVL00      0   Input level selection bit 0
SMB0             0xFF7E   SMB shift register 0 (mPD789167Y and 789177Y Subseries)
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF20        6   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         7   ADIF0    - Interrupt request flag
IF1.SMBOVIF0      6   SMBOVIF0 - Interrupt request flag
IF1.SMBIF0        5   SMBIF0   - Interrupt request flag
IF1.TMIF90        4   TMIF90   - Interrupt request flag
IF1.TMIF82        3   TMIF82   - Interrupt request flag
IF1.TMIF81        2   TMIF81   - Interrupt request flag
IF1.TMIF80        1   TMIF80   - Interrupt request flag
IF1.WTIIF         0   WTIIF    - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt handling control
MK0.SRMK20        6   SRMK20 - Interrupt handling control
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.PMK3          4   PMK3   - Interrupt handling control
MK0.PMK2          3   PMK2   - Interrupt handling control
MK0.PMK1          2   PMK1   - Interrupt handling control
MK0.PMK0          1   PMK0   - Interrupt handling control
MK0.TMMK4         0   TMMK4  - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         7   ADMK0    - Interrupt handling control
MK1.SMBOVMK0      6   SMBOVMK0 - Interrupt handling control
MK1.SMBMK0        5   SMBMK0   - Interrupt handling control
MK1.TMMK90        4   TMMK90   - Interrupt handling control
MK1.TMMK82        3   TMMK82   - Interrupt handling control
MK1.TMMK81        2   TMMK81   - Interrupt handling control
MK1.TMMK80        1   TMMK80   - Interrupt handling control
MK1.WTIMK         0   WTIMK    - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        3   INTLVI0 valid edge selection bit 1
INTM1.ES40        2   INTLVI0 valid edge selection bit 0
INTM1.ES41        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Use of feedback resistor
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection 2
OSTS.OSTS1        1   Oscillation stabilization time selection 1
OSTS.OSTS0        0   Oscillation stabilization time selection 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789177_A
; U14017EJ3V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF



.UPD789177_A1
; U15005EJ1V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF



.UPD789177_A2
; U15005EJ1V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF



.UPD78F9177
; U14022EJ1V0DS00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x6000   Internal flash memory
area BSS RESERVED   0x6000:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0010   INTST20
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM80_          0x0016   INTTM80
interrupt INTTM81_          0x0018   INTTM81
interrupt INTTM82_          0x001A   INTTM82
interrupt INTTM90_          0x001C   INTTM90
interrupt INTAD0_           0x0022   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF50     0xFF50   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   TM80 operation control
TMC80.PWME80      6   PWM output selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
CR81             0xFF54   8-bit compare register 81
TM81             0xFF55   8-bit timer counter 81
RESERVEDFF56     0xFF56   RESERVED
TMC81            0xFF57   8-bit timer mode control register 81
TMC81.TCE81       7   TM81 operation control
TMC81.PWME81      6   PWM output selection
TMC81.TCL811      2   8-bit timer counter 81 count clock selection bit 1
TMC81.TCL810      1   8-bit timer counter 81 count clock selection bit 0
TMC81.TOE81       0   8-bit timer/event counter 81 output control
CR82             0xFF58   8-bit compare register 82
TM82             0xFF59   8-bit timer counter 82
RESERVEDFF5A     0xFF5A   RESERVED
TMC82            0xFF5B   8-bit timer mode control register 82
TMC82.TCE82       7   TM82 operation control
TMC82.PWME82      6   PWM output selection
TMC82.TCL821      2   8-bit timer counter 82 count clock selection bit 1
TMC82.TCL820      1   8-bit timer counter 82 count clock selection bit 0
TMC82.TOE82       0   8-bit timer 82 output control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmission shift / Reception buffer register 20
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF20        6   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         7   ADIF0    - Interrupt request flag
IF1.SMBOVIF0      6   SMBOVIF0 - Interrupt request flag
IF1.SMBIF0        5   SMBIF0   - Interrupt request flag
IF1.TMIF90        4   TMIF90   - Interrupt request flag
IF1.TMIF82        3   TMIF82   - Interrupt request flag
IF1.TMIF81        2   TMIF81   - Interrupt request flag
IF1.TMIF80        1   TMIF80   - Interrupt request flag
IF1.WTIIF         0   WTIIF    - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt handling control
MK0.SRMK20        6   SRMK20 - Interrupt handling control
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.PMK3          4   PMK3   - Interrupt handling control
MK0.PMK2          3   PMK2   - Interrupt handling control
MK0.PMK1          2   PMK1   - Interrupt handling control
MK0.PMK0          1   PMK0   - Interrupt handling control
MK0.TMMK4         0   TMMK4  - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         7   ADMK0    - Interrupt handling control
MK1.SMBOVMK0      6   SMBOVMK0 - Interrupt handling control
MK1.SMBMK0        5   SMBMK0   - Interrupt handling control
MK1.TMMK90        4   TMMK90   - Interrupt handling control
MK1.TMMK82        3   TMMK82   - Interrupt handling control
MK1.TMMK81        2   TMMK81   - Interrupt handling control
MK1.TMMK80        1   TMMK80   - Interrupt handling control
MK1.WTIMK         0   WTIMK    - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        3   INTLVI0 valid edge selection bit 1
INTM1.ES40        2   INTLVI0 valid edge selection bit 0
INTM1.ES41        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Use of feedback resistor
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection 2
OSTS.OSTS1        1   Oscillation stabilization time selection 1
OSTS.OSTS0        0   Oscillation stabilization time selection 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78F9177Y
; U13210EJ1V0PM00.PDF, U14186EJ2V0UM00.PDF, U14477EE1V0PL00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x6000   Internal flash memory
area BSS RESERVED   0x6000:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFD0   RESERVED
area DATA FSR_2     0xFFD0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0010   INTST20
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM80_          0x0016   INTTM80
interrupt INTTM81_          0x0018   INTTM81
interrupt INTTM82_          0x001A   INTTM82
interrupt INTTM90_          0x001C   INTTM90
interrupt INTAD0_           0x0022   INTAD0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF50     0xFF50   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE80       7   TM80 operation control
TMC80.PWME80      6   PWM output selection
TMC80.TCL801      2   8-bit timer counter 80 count clock selection bit 1
TMC80.TCL800      1   8-bit timer counter 80 count clock selection bit 0
TMC80.TOE80       0   8-bit timer/event counter 80 output control
CR81             0xFF54   8-bit compare register 81
TM81             0xFF55   8-bit timer counter 81
RESERVEDFF56     0xFF56   RESERVED
TMC81            0xFF57   8-bit timer mode control register 81
TMC81.TCE81       7   TM81 operation control
TMC81.PWME81      6   PWM output selection
TMC81.TCL811      2   8-bit timer counter 81 count clock selection bit 1
TMC81.TCL810      1   8-bit timer counter 81 count clock selection bit 0
TMC81.TOE81       0   8-bit timer/event counter 81 output control
CR82             0xFF58   8-bit compare register 82
TM82             0xFF59   8-bit timer counter 82
RESERVEDFF5A     0xFF5A   RESERVED
TMC82            0xFF5B   8-bit timer mode control register 82
TMC82.TCE82       7   TM82 operation control
TMC82.PWME82      6   PWM output selection
TMC82.TCL821      2   8-bit timer counter 82 count clock selection bit 1
TMC82.TCL820      1   8-bit timer counter 82 count clock selection bit 0
TMC82.TOE82       0   8-bit timer 82 output control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6
CSIM20.DAP20      3
CSIM20.DIR20      2
CSIM20.CSCK20     1
CSIM20.CKP20      0
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmission shift / Reception buffer register 20
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF20        6   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF0         7   ADIF0    - Interrupt request flag
IF1.SMBOVIF0      6   SMBOVIF0 - Interrupt request flag
IF1.SMBIF0        5   SMBIF0   - Interrupt request flag
IF1.TMIF90        4   TMIF90   - Interrupt request flag
IF1.TMIF82        3   TMIF82   - Interrupt request flag
IF1.TMIF81        2   TMIF81   - Interrupt request flag
IF1.TMIF80        1   TMIF80   - Interrupt request flag
IF1.WTIIF         0   WTIIF    - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt handling control
MK0.SRMK20        6   SRMK20 - Interrupt handling control
MK0.STMK20        5   STMK20 - Interrupt handling control
MK0.PMK3          4   PMK3   - Interrupt handling control
MK0.PMK2          3   PMK2   - Interrupt handling control
MK0.PMK1          2   PMK1   - Interrupt handling control
MK0.PMK0          1   PMK0   - Interrupt handling control
MK0.TMMK4         0   TMMK4  - Interrupt handling control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK0         7   ADMK0    - Interrupt handling control
MK1.SMBOVMK0      6   SMBOVMK0 - Interrupt handling control
MK1.SMBMK0        5   SMBMK0   - Interrupt handling control
MK1.TMMK90        4   TMMK90   - Interrupt handling control
MK1.TMMK82        3   TMMK82   - Interrupt handling control
MK1.TMMK81        2   TMMK81   - Interrupt handling control
MK1.TMMK80        1   TMMK80   - Interrupt handling control
MK1.WTIMK         0   WTIMK    - Interrupt handling control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        3   INTLVI0 valid edge selection bit 1
INTM1.ES40        2   INTLVI0 valid edge selection bit 0
INTM1.ES41        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Use of feedback resistor
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection 2
OSTS.OSTS1        1   Oscillation stabilization time selection 1
OSTS.OSTS0        0   Oscillation stabilization time selection 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789304
; U14384EJ1V0DS00.PDF, U14800EJ1V0UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x2000   Internal ROM
area BSS RESERVED   0x2000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA18   LCD display RAM
area BSS RESERVED   0xFA18:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF79   Special Function Register
area BSS RESERVED   0xFF79:0xFFB0   RESERVED
area DATA FSR_2     0xFFB0:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTCSI10_         0x0010   INTCSI10
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM20_          0x0016   INTTM20
interrupt INTTM30_          0x0018   INTTM30
interrupt INTTM40_          0x001A   INTTM40
interrupt INTTMWT_          0x001E   INTTMWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR40             0xFF0C   8-bit compare register 40
CR30             0xFF0D   8-bit compare register 30
TM40             0xFF0E   8-bit timer counter 40
TM30             0xFF0F   8-bit timer counter 30
SIO20            0xFF10   Transmit shift / Receive buffer register 20
SIO10            0xFF11   Serial shift register 10
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Count clock selection bit 2
WDCS.WDCS1        1   Count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inversion control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer counter 20 output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH40            0xFF4C   8-bit compare register H40
TMC30            0xFF4D   8-bit timer mode control register 30
TMC30.TCE30       7   Control of TM30 count operation
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD300      1   Selection of operation mode for timer 30 and timer 40
TMC30.TOE30       0   Control of timer output
TMC40            0xFF4E   8-bit timer mode control register 40
TMC40.TCE40       7   Control of TM40 count operation
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of operation mode for timer 30 and timer 40
TMC40.TMD400      1   Selection of operation mode for timer 30 and timer 40
TMC40.TOE40       0   Control of timer output
TCA40            0xFF4F   Carrier generator output control register 40
TCA40.RMC40       2   Control of remote control output
TCA40.NRZB40      1   
TCA40.NRZ40       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Character length specification of transmit data
ASIM20.SL20       2   Transmit data stop bit length specification
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.DIR20      2
CSIM20.CSCK20     1
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
CSIM10           0xFF78   Serial operation mode register 10
CSIM10.CSIE10     7
CSIM10.TPS101     5
CSIM10.TPS100     4
CSIM10.DIR10      2
CSIM10.CSCK10     1
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fCLK1) selection bit 3
LCDC0.LCDC02      2   Internal clock (fCLK1) selection bit 2
LCDC0.LCDC01      1   LCD clock (fLCD) selection bit 1
LCDC0.LCDC00      0   LCD clock (fLCD) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Voltage amplification level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20  - Interrupt request flag
IF0.CSIIF10       6   CSIIF10 - Interrupt request flag
IF0.SRIF20        5   SRIF20  - Interrupt request flag
IF0.PIF3          4   PIF3    - Interrupt request flag
IF0.PIF2          3   PIF2    - Interrupt request flag
IF0.PIF1          2   PIF1    - Interrupt request flag
IF0.PIF0          1   PIF0    - Interrupt request flag
IF0.WDTIF         0   WDTIF   - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.TMIF40        3   TMIF40 - Interrupt request flag
IF1.TMIF30        2   TMIF30 - Interrupt request flag
IF1.TMIF20        1   TMIF20 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20  - Interrupt servicing control
MK0.CSIMK10       6   CSIMK10 - Interrupt servicing control
MK0.SRMK20        5   SRMK20  - Interrupt servicing control
MK0.PMK3          4   PMK3    - Interrupt servicing control
MK0.PMK2          3   PMK2    - Interrupt servicing control
MK0.PMK1          2   PMK1    - Interrupt servicing control
MK0.PMK0          1   PMK0    - Interrupt servicing control
MK0.WDTMK         0   WDTMK   - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.TMMK40        3   TMMK40 - Interrupt servicing control
MK1.TMMK30        2   TMMK30 - Interrupt servicing control
MK1.TMMK20        1   TMMK20 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789306
; U14384EJ1V0DS00.PDF, U14800EJ1V0UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA18   LCD display RAM
area BSS RESERVED   0xFA18:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF79   Special Function Register
area BSS RESERVED   0xFF79:0xFFB0   RESERVED
area DATA FSR_2     0xFFB0:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTCSI10_         0x0010   INTCSI10
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM20_          0x0016   INTTM20
interrupt INTTM30_          0x0018   INTTM30
interrupt INTTM40_          0x001A   INTTM40
interrupt INTTMWT_          0x001E   INTTMWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR40             0xFF0C   8-bit compare register 40
CR30             0xFF0D   8-bit compare register 30
TM40             0xFF0E   8-bit timer counter 40
TM30             0xFF0F   8-bit timer counter 30
SIO20            0xFF10   Transmit shift / Receive buffer register 20
SIO10            0xFF11   Serial shift register 10
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Count clock selection bit 2
WDCS.WDCS1        1   Count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inversion control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer counter 20 output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH40            0xFF4C   8-bit compare register H40
TMC30            0xFF4D   8-bit timer mode control register 30
TMC30.TCE30       7   Control of TM30 count operation
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD300      1   Selection of operation mode for timer 30 and timer 40
TMC30.TOE30       0   Control of timer output
TMC40            0xFF4E   8-bit timer mode control register 40
TMC40.TCE40       7   Control of TM40 count operation
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of operation mode for timer 30 and timer 40
TMC40.TMD400      1   Selection of operation mode for timer 30 and timer 40
TMC40.TOE40       0   Control of timer output
TCA40            0xFF4F   Carrier generator output control register 40
TCA40.RMC40       2   Control of remote control output
TCA40.NRZB40      1   
TCA40.NRZ40       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Character length specification of transmit data
ASIM20.SL20       2   Transmit data stop bit length specification
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.DIR20      2
CSIM20.CSCK20     1
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
CSIM10           0xFF78   Serial operation mode register 10
CSIM10.CSIE10     7
CSIM10.TPS101     5
CSIM10.TPS100     4
CSIM10.DIR10      2
CSIM10.CSCK10     1
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fCLK1) selection bit 3
LCDC0.LCDC02      2   Internal clock (fCLK1) selection bit 2
LCDC0.LCDC01      1   LCD clock (fLCD) selection bit 1
LCDC0.LCDC00      0   LCD clock (fLCD) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Voltage amplification level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20  - Interrupt request flag
IF0.CSIIF10       6   CSIIF10 - Interrupt request flag
IF0.SRIF20        5   SRIF20  - Interrupt request flag
IF0.PIF3          4   PIF3    - Interrupt request flag
IF0.PIF2          3   PIF2    - Interrupt request flag
IF0.PIF1          2   PIF1    - Interrupt request flag
IF0.PIF0          1   PIF0    - Interrupt request flag
IF0.WDTIF         0   WDTIF   - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.TMIF40        3   TMIF40 - Interrupt request flag
IF1.TMIF30        2   TMIF30 - Interrupt request flag
IF1.TMIF20        1   TMIF20 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20  - Interrupt servicing control
MK0.CSIMK10       6   CSIMK10 - Interrupt servicing control
MK0.SRMK20        5   SRMK20  - Interrupt servicing control
MK0.PMK3          4   PMK3    - Interrupt servicing control
MK0.PMK2          3   PMK2    - Interrupt servicing control
MK0.PMK1          2   PMK1    - Interrupt servicing control
MK0.PMK0          1   PMK0    - Interrupt servicing control
MK0.WDTMK         0   WDTMK   - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.TMMK40        3   TMMK40 - Interrupt servicing control
MK1.TMMK30        2   TMMK30 - Interrupt servicing control
MK1.TMMK20        1   TMMK20 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78F9306
; U14564EJ1V0DS00.PDF, U14800EJ1V0UM00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x4000   Internal flash memory
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA18   LCD display RAM
area BSS RESERVED   0xFA18:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF79   Special Function Register
area BSS RESERVED   0xFF79:0xFFB0   RESERVED
area DATA FSR_2     0xFFB0:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTCSI10_         0x0010   INTCSI10
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM20_          0x0016   INTTM20
interrupt INTTM30_          0x0018   INTTM30
interrupt INTTM40_          0x001A   INTTM40
interrupt INTTMWT_          0x001E   INTTMWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR40             0xFF0C   8-bit compare register 40
CR30             0xFF0D   8-bit compare register 30
TM40             0xFF0E   8-bit timer counter 40
TM30             0xFF0F   8-bit timer counter 30
SIO20            0xFF10   Transmit shift / Receive buffer register 20
SIO10            0xFF11   Serial shift register 10
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Count clock selection bit 2
WDCS.WDCS1        1   Count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inversion control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer counter 20 output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH40            0xFF4C   8-bit compare register H40
TMC30            0xFF4D   8-bit timer mode control register 30
TMC30.TCE30       7   Control of TM30 count operation
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD300      1   Selection of operation mode for timer 30 and timer 40
TMC30.TOE30       0   Control of timer output
TMC40            0xFF4E   8-bit timer mode control register 40
TMC40.TCE40       7   Control of TM40 count operation
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of operation mode for timer 30 and timer 40
TMC40.TMD400      1   Selection of operation mode for timer 30 and timer 40
TMC40.TOE40       0   Control of timer output
TCA40            0xFF4F   Carrier generator output control register 40
TCA40.RMC40       2   Control of remote control output
TCA40.NRZB40      1   
TCA40.NRZ40       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Character length specification of transmit data
ASIM20.SL20       2   Transmit data stop bit length specification
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.DIR20      2
CSIM20.CSCK20     1
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
CSIM10           0xFF78   Serial operation mode register 10
CSIM10.CSIE10     7
CSIM10.TPS101     5
CSIM10.TPS100     4
CSIM10.DIR10      2
CSIM10.CSCK10     1
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fCLK1) selection bit 3
LCDC0.LCDC02      2   Internal clock (fCLK1) selection bit 2
LCDC0.LCDC01      1   LCD clock (fLCD) selection bit 1
LCDC0.LCDC00      0   LCD clock (fLCD) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Voltage amplification level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20  - Interrupt request flag
IF0.CSIIF10       6   CSIIF10 - Interrupt request flag
IF0.SRIF20        5   SRIF20  - Interrupt request flag
IF0.PIF3          4   PIF3    - Interrupt request flag
IF0.PIF2          3   PIF2    - Interrupt request flag
IF0.PIF1          2   PIF1    - Interrupt request flag
IF0.PIF0          1   PIF0    - Interrupt request flag
IF0.WDTIF         0   WDTIF   - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.TMIF40        3   TMIF40 - Interrupt request flag
IF1.TMIF30        2   TMIF30 - Interrupt request flag
IF1.TMIF20        1   TMIF20 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20  - Interrupt servicing control
MK0.CSIMK10       6   CSIMK10 - Interrupt servicing control
MK0.SRMK20        5   SRMK20  - Interrupt servicing control
MK0.PMK3          4   PMK3    - Interrupt servicing control
MK0.PMK2          3   PMK2    - Interrupt servicing control
MK0.PMK1          2   PMK1    - Interrupt servicing control
MK0.PMK0          1   PMK0    - Interrupt servicing control
MK0.WDTMK         0   WDTMK   - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.TMMK40        3   TMMK40 - Interrupt servicing control
MK1.TMMK30        2   TMMK30 - Interrupt servicing control
MK1.TMMK20        1   TMMK20 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789314
; U14384EJ1V0DS00.PDF, U14800EJ1V0UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x2000   Internal ROM
area BSS RESERVED   0x2000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA18   LCD display RAM
area BSS RESERVED   0xFA18:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF79   Special Function Register
area BSS RESERVED   0xFF79:0xFFB0   RESERVED
area DATA FSR_2     0xFFB0:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTCSI10_         0x0010   INTCSI10
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM20_          0x0016   INTTM20
interrupt INTTM30_          0x0018   INTTM30
interrupt INTTM40_          0x001A   INTTM40
interrupt INTTMWT_          0x001E   INTTMWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR40             0xFF0C   8-bit compare register 40
CR30             0xFF0D   8-bit compare register 30
TM40             0xFF0E   8-bit timer counter 40
TM30             0xFF0F   8-bit timer counter 30
SIO20            0xFF10   Transmit shift / Receive buffer register 20
SIO10            0xFF11   Serial shift register 10
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Count clock selection bit 2
WDCS.WDCS1        1   Count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inversion control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer counter 20 output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH40            0xFF4C   8-bit compare register H40
TMC30            0xFF4D   8-bit timer mode control register 30
TMC30.TCE30       7   Control of TM30 count operation
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD300      1   Selection of operation mode for timer 30 and timer 40
TMC30.TOE30       0   Control of timer output
TMC40            0xFF4E   8-bit timer mode control register 40
TMC40.TCE40       7   Control of TM40 count operation
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of operation mode for timer 30 and timer 40
TMC40.TMD400      1   Selection of operation mode for timer 30 and timer 40
TMC40.TOE40       0   Control of timer output
TCA40            0xFF4F   Carrier generator output control register 40
TCA40.RMC40       2   Control of remote control output
TCA40.NRZB40      1   
TCA40.NRZ40       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Character length specification of transmit data
ASIM20.SL20       2   Transmit data stop bit length specification
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.DIR20      2
CSIM20.CSCK20     1
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
CSIM10           0xFF78   Serial operation mode register 10
CSIM10.CSIE10     7
CSIM10.TPS101     5
CSIM10.TPS100     4
CSIM10.DIR10      2
CSIM10.CSCK10     1
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fCLK1) selection bit 3
LCDC0.LCDC02      2   Internal clock (fCLK1) selection bit 2
LCDC0.LCDC01      1   LCD clock (fLCD) selection bit 1
LCDC0.LCDC00      0   LCD clock (fLCD) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Voltage amplification level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20  - Interrupt request flag
IF0.CSIIF10       6   CSIIF10 - Interrupt request flag
IF0.SRIF20        5   SRIF20  - Interrupt request flag
IF0.PIF3          4   PIF3    - Interrupt request flag
IF0.PIF2          3   PIF2    - Interrupt request flag
IF0.PIF1          2   PIF1    - Interrupt request flag
IF0.PIF0          1   PIF0    - Interrupt request flag
IF0.WDTIF         0   WDTIF   - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.TMIF40        3   TMIF40 - Interrupt request flag
IF1.TMIF30        2   TMIF30 - Interrupt request flag
IF1.TMIF20        1   TMIF20 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20  - Interrupt servicing control
MK0.CSIMK10       6   CSIMK10 - Interrupt servicing control
MK0.SRMK20        5   SRMK20  - Interrupt servicing control
MK0.PMK3          4   PMK3    - Interrupt servicing control
MK0.PMK2          3   PMK2    - Interrupt servicing control
MK0.PMK1          2   PMK1    - Interrupt servicing control
MK0.PMK0          1   PMK0    - Interrupt servicing control
MK0.WDTMK         0   WDTMK   - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.TMMK40        3   TMMK40 - Interrupt servicing control
MK1.TMMK30        2   TMMK30 - Interrupt servicing control
MK1.TMMK20        1   TMMK20 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
RESERVEDFFFA     0xFFFA   RESERVED
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789316
; U14384EJ1V0DS00.PDF, U14800EJ1V0UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA18   LCD display RAM
area BSS RESERVED   0xFA18:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF79   Special Function Register
area BSS RESERVED   0xFF79:0xFFB0   RESERVED
area DATA FSR_2     0xFFB0:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTCSI10_         0x0010   INTCSI10
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM20_          0x0016   INTTM20
interrupt INTTM30_          0x0018   INTTM30
interrupt INTTM40_          0x001A   INTTM40
interrupt INTTMWT_          0x001E   INTTMWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR40             0xFF0C   8-bit compare register 40
CR30             0xFF0D   8-bit compare register 30
TM40             0xFF0E   8-bit timer counter 40
TM30             0xFF0F   8-bit timer counter 30
SIO20            0xFF10   Transmit shift / Receive buffer register 20
SIO10            0xFF11   Serial shift register 10
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Count clock selection bit 2
WDCS.WDCS1        1   Count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inversion control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer counter 20 output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH40            0xFF4C   8-bit compare register H40
TMC30            0xFF4D   8-bit timer mode control register 30
TMC30.TCE30       7   Control of TM30 count operation
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD300      1   Selection of operation mode for timer 30 and timer 40
TMC30.TOE30       0   Control of timer output
TMC40            0xFF4E   8-bit timer mode control register 40
TMC40.TCE40       7   Control of TM40 count operation
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of operation mode for timer 30 and timer 40
TMC40.TMD400      1   Selection of operation mode for timer 30 and timer 40
TMC40.TOE40       0   Control of timer output
TCA40            0xFF4F   Carrier generator output control register 40
TCA40.RMC40       2   Control of remote control output
TCA40.NRZB40      1   
TCA40.NRZ40       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Character length specification of transmit data
ASIM20.SL20       2   Transmit data stop bit length specification
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.DIR20      2
CSIM20.CSCK20     1
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
CSIM10           0xFF78   Serial operation mode register 10
CSIM10.CSIE10     7
CSIM10.TPS101     5
CSIM10.TPS100     4
CSIM10.DIR10      2
CSIM10.CSCK10     1
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fCLK1) selection bit 3
LCDC0.LCDC02      2   Internal clock (fCLK1) selection bit 2
LCDC0.LCDC01      1   LCD clock (fLCD) selection bit 1
LCDC0.LCDC00      0   LCD clock (fLCD) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Voltage amplification level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20  - Interrupt request flag
IF0.CSIIF10       6   CSIIF10 - Interrupt request flag
IF0.SRIF20        5   SRIF20  - Interrupt request flag
IF0.PIF3          4   PIF3    - Interrupt request flag
IF0.PIF2          3   PIF2    - Interrupt request flag
IF0.PIF1          2   PIF1    - Interrupt request flag
IF0.PIF0          1   PIF0    - Interrupt request flag
IF0.WDTIF         0   WDTIF   - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.TMIF40        3   TMIF40 - Interrupt request flag
IF1.TMIF30        2   TMIF30 - Interrupt request flag
IF1.TMIF20        1   TMIF20 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20  - Interrupt servicing control
MK0.CSIMK10       6   CSIMK10 - Interrupt servicing control
MK0.SRMK20        5   SRMK20  - Interrupt servicing control
MK0.PMK3          4   PMK3    - Interrupt servicing control
MK0.PMK2          3   PMK2    - Interrupt servicing control
MK0.PMK1          2   PMK1    - Interrupt servicing control
MK0.PMK0          1   PMK0    - Interrupt servicing control
MK0.WDTMK         0   WDTMK   - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.TMMK40        3   TMMK40 - Interrupt servicing control
MK1.TMMK30        2   TMMK30 - Interrupt servicing control
MK1.TMMK20        1   TMMK20 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
RESERVEDFFFA     0xFFFA   RESERVED
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78F9316
; U14564EJ1V0DS00.PDF, U14800EJ1V0UM00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x4000   Internal flash memory
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA18   LCD display RAM
area BSS RESERVED   0xFA18:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF79   Special Function Register
area BSS RESERVED   0xFF79:0xFFB0   RESERVED
area DATA FSR_2     0xFFB0:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTCSI10_         0x0010   INTCSI10
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM20_          0x0016   INTTM20
interrupt INTTM30_          0x0018   INTTM30
interrupt INTTM40_          0x001A   INTTM40
interrupt INTTMWT_          0x001E   INTTMWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR40             0xFF0C   8-bit compare register 40
CR30             0xFF0D   8-bit compare register 30
TM40             0xFF0E   8-bit timer counter 40
TM30             0xFF0F   8-bit timer counter 30
SIO20            0xFF10   Transmit shift / Receive buffer register 20
SIO10            0xFF11   Serial shift register 10
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Count clock selection bit 2
WDCS.WDCS1        1   Count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
TMC20.TOD20       7   Timer output data
TMC20.TOF20       6   Overflow flag set
TMC20.CPT201      5   Capture edge selection bit 1
TMC20.CPT200      4   Capture edge selection bit 0
TMC20.TOC20       3   Timer output data inversion control
TMC20.TCL201      2   16-bit timer counter 20 count clock selection bit 1
TMC20.TCL200      1   16-bit timer counter 20 count clock selection bit 0
TMC20.TOE20       0   16-bit timer counter 20 output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH40            0xFF4C   8-bit compare register H40
TMC30            0xFF4D   8-bit timer mode control register 30
TMC30.TCE30       7   Control of TM30 count operation
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD300      1   Selection of operation mode for timer 30 and timer 40
TMC30.TOE30       0   Control of timer output
TMC40            0xFF4E   8-bit timer mode control register 40
TMC40.TCE40       7   Control of TM40 count operation
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of operation mode for timer 30 and timer 40
TMC40.TMD400      1   Selection of operation mode for timer 30 and timer 40
TMC40.TOE40       0   Control of timer output
TCA40            0xFF4F   Carrier generator output control register 40
TCA40.RMC40       2   Control of remote control output
TCA40.NRZB40      1   
TCA40.NRZ40       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Character length specification of transmit data
ASIM20.SL20       2   Transmit data stop bit length specification
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.DIR20      2
CSIM20.CSCK20     1
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
CSIM10           0xFF78   Serial operation mode register 10
CSIM10.CSIE10     7
CSIM10.TPS101     5
CSIM10.TPS100     4
CSIM10.DIR10      2
CSIM10.CSCK10     1
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fCLK1) selection bit 3
LCDC0.LCDC02      2   Internal clock (fCLK1) selection bit 2
LCDC0.LCDC01      1   LCD clock (fLCD) selection bit 1
LCDC0.LCDC00      0   LCD clock (fLCD) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Voltage amplification level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20  - Interrupt request flag
IF0.CSIIF10       6   CSIIF10 - Interrupt request flag
IF0.SRIF20        5   SRIF20  - Interrupt request flag
IF0.PIF3          4   PIF3    - Interrupt request flag
IF0.PIF2          3   PIF2    - Interrupt request flag
IF0.PIF1          2   PIF1    - Interrupt request flag
IF0.PIF0          1   PIF0    - Interrupt request flag
IF0.WDTIF         0   WDTIF   - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.TMIF40        3   TMIF40 - Interrupt request flag
IF1.TMIF30        2   TMIF30 - Interrupt request flag
IF1.TMIF20        1   TMIF20 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20  - Interrupt servicing control
MK0.CSIMK10       6   CSIMK10 - Interrupt servicing control
MK0.SRMK20        5   SRMK20  - Interrupt servicing control
MK0.PMK3          4   PMK3    - Interrupt servicing control
MK0.PMK2          3   PMK2    - Interrupt servicing control
MK0.PMK1          2   PMK1    - Interrupt servicing control
MK0.PMK0          1   PMK0    - Interrupt servicing control
MK0.WDTMK         0   WDTMK   - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.TMMK40        3   TMMK40 - Interrupt servicing control
MK1.TMMK30        2   TMMK30 - Interrupt servicing control
MK1.TMMK20        1   TMMK20 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
RESERVEDFFFA     0xFFFA   RESERVED
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789322
; U14673EJ1V0PM00.PDF, U15043EJ1V0UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x1000   Internal ROM
area BSS RESERVED   0x1000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA18   LCD display RAM
area BSS RESERVED   0xFA18:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF75   Special Function Register
area BSS RESERVED   0xFF75:0xFFB0
area DATA FSR_2     0xFFB0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTCSI10_         0x0008   INTCSI10
interrupt INTWT_            0x000A   INTWT
interrupt INTTM30_          0x000C   INTTM30
interrupt INTTM40_          0x000E   INTTM40
interrupt INTKR00_          0x0010   INTKR00
interrupt INTWTI_           0x0012   INTWTI


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P4               0xFF03   Port 4
RESERVEDFF04     0xFF04   RESERVED
P6               0xFF05   Port 6
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM43          3   P43 pin input/output mode selection
PM4.PM42          2   P42 pin input/output mode selection
PM4.PM41          1   P41 pin input/output mode selection
PM4.PM40          0   P40 pin input/output mode selection
RESERVEDFF25     0xFF25   RESERVED
PM6              0xFF26   Port mode register 6
PM6.PM61          1   P61 pin input/output mode selection
PM6.PM60          0   P60 pin input/output mode selection
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28   Port mode register 8
PM8.PM85          5   P85 pin input/output mode selection
PM8.PM84          4   P84 pin input/output mode selection
PM8.PM83          3   P83 pin input/output mode selection
PM8.PM82          2   P82 pin input/output mode selection
PM8.PM81          1   P81 pin input/output mode selection
PM8.PM80          0   P80 pin input/output mode selection
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Watchdog timer clock selection register
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock (fW ) selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
PF8              0xFF58   Port function register 8
PF8.PF85          5   P85 port function
PF8.PF84          4   P84 port function
PF8.PF83          3   P83 port function
PF8.PF82          2   P82 port function
PF8.PF81          1   P81 port function
PF8.PF80          0   P80 port function
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
CR30             0xFF63   8-bit compare register 30
TM30             0xFF64   8-bit timer counter 30
TMC30            0xFF65   8-bit timer mode control register 30
TMC30.TCE30       7   Control of TM30 count operation
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD300      1   Selection of operation mode for timer 30
CR40             0xFF66   8-bit compare register 40
CRH40            0xFF67   8-bit H width compare register 40
TM40             0xFF68   8-bit timer counter 40
TMC40            0xFF69   8-bit timer mode control register 40
TMC40.TCE40       7   Control of TM40 count operation
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of operation mode for timer 40 bit 1
TMC40.TMD400      1   Selection of operation mode for timer 40 bit 0
TMC40.TOE40       0   Control of timer output
TCA40            0xFF6A   Carrier generator output control register 40
TCA40.RMC40       2   Control of remote control output
TCA40.NRZB40      1   next data to be output to NRZ40
TCA40.NRZ40       0   No return zero data
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
RESERVEDFF70     0xFF70   RESERVED
RESERVEDFF71     0xFF71   RESERVED
CSIM10           0xFF72   Serial operation mode register 10
CSIM10.CSIE10     7   Operation control in 3-wire serial I/O mode
CSIM10.TPS101     5   Count clock selection when internal clock is selected bit 1
CSIM10.TPS100     4   Count clock selection when internal clock is selected bit 0
CSIM10.DIR10      2   Start bit specification
CSIM10.CSCK10     1   SIO10 clock selection
RESERVEDFF73     0xFF73   RESERVED
SIO10            0xFF74   Transmission/reception shift register 10
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Supply of power for LCD drive
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   LCD source clock (fLCD) selection bit 3
LCDC0.LCDC02      2   LCD source clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection 0
RESERVEDFFB3     0xFFB3   RESERVED
RESERVEDFFB4     0xFFB4   RESERVED
RESERVEDFFB5     0xFFB5   RESERVED
RESERVEDFFB6     0xFFB6   RESERVED
RESERVEDFFB7     0xFFB7   RESERVED
RESERVEDFFB8     0xFFB8   RESERVED
RESERVEDFFB9     0xFFB9   RESERVED
RESERVEDFFBA     0xFFBA   RESERVED
RESERVEDFFBB     0xFFBB   RESERVED
RESERVEDFFBC     0xFFBC   RESERVED
RESERVEDFFBD     0xFFBD   RESERVED
RESERVEDFFBE     0xFFBE   RESERVED
RESERVEDFFBF     0xFFBF   RESERVED
RESERVEDFFC0     0xFFC0   RESERVED
RESERVEDFFC1     0xFFC1   RESERVED
RESERVEDFFC2     0xFFC2   RESERVED
RESERVEDFFC3     0xFFC3   RESERVED
RESERVEDFFC4     0xFFC4   RESERVED
RESERVEDFFC5     0xFFC5   RESERVED
RESERVEDFFC6     0xFFC6   RESERVED
RESERVEDFFC7     0xFFC7   RESERVED
RESERVEDFFC8     0xFFC8   RESERVED
RESERVEDFFC9     0xFFC9   RESERVED
RESERVEDFFCA     0xFFCA   RESERVED
RESERVEDFFCB     0xFFCB   RESERVED
RESERVEDFFCC     0xFFCC   RESERVED
RESERVEDFFCD     0xFFCD   RESERVED
RESERVEDFFCE     0xFFCE   RESERVED
RESERVEDFFCF     0xFFCF   RESERVED
RESERVEDFFD0     0xFFD0   RESERVED
RESERVEDFFD1     0xFFD1   RESERVED
RESERVEDFFD2     0xFFD2   RESERVED
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
POCF1            0xFFDD   Power-on-clear register 1
POCF1.POCOF1      2   POC output detection flag
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIIF         7   WTIIF  - Interrupt request flag
IF0.KRIF00        6   KRIF00 - Interrupt request flag
IF0.TMIF40        5   TMIF40 - Interrupt request flag
IF0.TMIF30        4   TMIF30 - Interrupt request flag
IF0.WTIF          3   WTIF   - Interrupt request flag
IF0.CSIIF0        2   CSIIF0 - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTIMK         7   WTIMK  - Interrupt servicing control
MK0.KRMK00        6   KRMK00 - Interrupt servicing control
MK0.TMMK40        5   TMMK40 - Interrupt servicing control
MK0.TMMK30        4   TMMK30 - Interrupt servicing control
MK0.WTMK          3   WTMK   - Interrupt servicing control
MK0.CSIMK0        2   CSIMK0 - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM00       0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P4 on-chip pull-up resistor selection
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2
OSTS.OSTS1        1
OSTS.OSTS0        0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU ) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789324
; U14673EJ1V0PM00.PDF, U15043EJ1V0UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x2000   Internal ROM
area BSS RESERVED   0x2000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA18   LCD display RAM
area BSS RESERVED   0xFA18:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF75   Special Function Register
area BSS RESERVED   0xFF75:0xFFB0
area DATA FSR_2     0xFFB0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTCSI10_         0x0008   INTCSI10
interrupt INTWT_            0x000A   INTWT
interrupt INTTM30_          0x000C   INTTM30
interrupt INTTM40_          0x000E   INTTM40
interrupt INTKR00_          0x0010   INTKR00
interrupt INTWTI_           0x0012   INTWTI


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P4               0xFF03   Port 4
RESERVEDFF04     0xFF04   RESERVED
P6               0xFF05   Port 6
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM43          3   P43 pin input/output mode selection
PM4.PM42          2   P42 pin input/output mode selection
PM4.PM41          1   P41 pin input/output mode selection
PM4.PM40          0   P40 pin input/output mode selection
RESERVEDFF25     0xFF25   RESERVED
PM6              0xFF26   Port mode register 6
PM6.PM61          1   P61 pin input/output mode selection
PM6.PM60          0   P60 pin input/output mode selection
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28   Port mode register 8
PM8.PM85          5   P85 pin input/output mode selection
PM8.PM84          4   P84 pin input/output mode selection
PM8.PM83          3   P83 pin input/output mode selection
PM8.PM82          2   P82 pin input/output mode selection
PM8.PM81          1   P81 pin input/output mode selection
PM8.PM80          0   P80 pin input/output mode selection
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Watchdog timer clock selection register
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock (fW ) selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
PF8              0xFF58   Port function register 8
PF8.PF85          5   P85 port function
PF8.PF84          4   P84 port function
PF8.PF83          3   P83 port function
PF8.PF82          2   P82 port function
PF8.PF81          1   P81 port function
PF8.PF80          0   P80 port function
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
CR30             0xFF63   8-bit compare register 30
TM30             0xFF64   8-bit timer counter 30
TMC30            0xFF65   8-bit timer mode control register 30
TMC30.TCE30       7   Control of TM30 count operation
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD300      1   Selection of operation mode for timer 30
CR40             0xFF66   8-bit compare register 40
CRH40            0xFF67   8-bit H width compare register 40
TM40             0xFF68   8-bit timer counter 40
TMC40            0xFF69   8-bit timer mode control register 40
TMC40.TCE40       7   Control of TM40 count operation
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of operation mode for timer 40 bit 1
TMC40.TMD400      1   Selection of operation mode for timer 40 bit 0
TMC40.TOE40       0   Control of timer output
TCA40            0xFF6A   Carrier generator output control register 40
TCA40.RMC40       2   Control of remote control output
TCA40.NRZB40      1   next data to be output to NRZ40
TCA40.NRZ40       0   No return zero data
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
RESERVEDFF70     0xFF70   RESERVED
RESERVEDFF71     0xFF71   RESERVED
CSIM10           0xFF72   Serial operation mode register 10
CSIM10.CSIE10     7   Operation control in 3-wire serial I/O mode
CSIM10.TPS101     5   Count clock selection when internal clock is selected bit 1
CSIM10.TPS100     4   Count clock selection when internal clock is selected bit 0
CSIM10.DIR10      2   Start bit specification
CSIM10.CSCK10     1   SIO10 clock selection
RESERVEDFF73     0xFF73   RESERVED
SIO10            0xFF74   Transmission/reception shift register 10
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Supply of power for LCD drive
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   LCD source clock (fLCD) selection bit 3
LCDC0.LCDC02      2   LCD source clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection 0
RESERVEDFFB3     0xFFB3   RESERVED
RESERVEDFFB4     0xFFB4   RESERVED
RESERVEDFFB5     0xFFB5   RESERVED
RESERVEDFFB6     0xFFB6   RESERVED
RESERVEDFFB7     0xFFB7   RESERVED
RESERVEDFFB8     0xFFB8   RESERVED
RESERVEDFFB9     0xFFB9   RESERVED
RESERVEDFFBA     0xFFBA   RESERVED
RESERVEDFFBB     0xFFBB   RESERVED
RESERVEDFFBC     0xFFBC   RESERVED
RESERVEDFFBD     0xFFBD   RESERVED
RESERVEDFFBE     0xFFBE   RESERVED
RESERVEDFFBF     0xFFBF   RESERVED
RESERVEDFFC0     0xFFC0   RESERVED
RESERVEDFFC1     0xFFC1   RESERVED
RESERVEDFFC2     0xFFC2   RESERVED
RESERVEDFFC3     0xFFC3   RESERVED
RESERVEDFFC4     0xFFC4   RESERVED
RESERVEDFFC5     0xFFC5   RESERVED
RESERVEDFFC6     0xFFC6   RESERVED
RESERVEDFFC7     0xFFC7   RESERVED
RESERVEDFFC8     0xFFC8   RESERVED
RESERVEDFFC9     0xFFC9   RESERVED
RESERVEDFFCA     0xFFCA   RESERVED
RESERVEDFFCB     0xFFCB   RESERVED
RESERVEDFFCC     0xFFCC   RESERVED
RESERVEDFFCD     0xFFCD   RESERVED
RESERVEDFFCE     0xFFCE   RESERVED
RESERVEDFFCF     0xFFCF   RESERVED
RESERVEDFFD0     0xFFD0   RESERVED
RESERVEDFFD1     0xFFD1   RESERVED
RESERVEDFFD2     0xFFD2   RESERVED
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
POCF1            0xFFDD   Power-on-clear register 1
POCF1.POCOF1      2   POC output detection flag
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIIF         7   WTIIF  - Interrupt request flag
IF0.KRIF00        6   KRIF00 - Interrupt request flag
IF0.TMIF40        5   TMIF40 - Interrupt request flag
IF0.TMIF30        4   TMIF30 - Interrupt request flag
IF0.WTIF          3   WTIF   - Interrupt request flag
IF0.CSIIF0        2   CSIIF0 - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTIMK         7   WTIMK  - Interrupt servicing control
MK0.KRMK00        6   KRMK00 - Interrupt servicing control
MK0.TMMK40        5   TMMK40 - Interrupt servicing control
MK0.TMMK30        4   TMMK30 - Interrupt servicing control
MK0.WTMK          3   WTMK   - Interrupt servicing control
MK0.CSIMK0        2   CSIMK0 - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM00       0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P4 on-chip pull-up resistor selection
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2
OSTS.OSTS1        1
OSTS.OSTS0        0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU ) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789326
; U14673EJ1V0PM00.PDF, U15043EJ1V0UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA18   LCD display RAM
area BSS RESERVED   0xFA18:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF75   Special Function Register
area BSS RESERVED   0xFF75:0xFFB0
area DATA FSR_2     0xFFB0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTCSI10_         0x0008   INTCSI10
interrupt INTWT_            0x000A   INTWT
interrupt INTTM30_          0x000C   INTTM30
interrupt INTTM40_          0x000E   INTTM40
interrupt INTKR00_          0x0010   INTKR00
interrupt INTWTI_           0x0012   INTWTI


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P4               0xFF03   Port 4
RESERVEDFF04     0xFF04   RESERVED
P6               0xFF05   Port 6
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM43          3   P43 pin input/output mode selection
PM4.PM42          2   P42 pin input/output mode selection
PM4.PM41          1   P41 pin input/output mode selection
PM4.PM40          0   P40 pin input/output mode selection
RESERVEDFF25     0xFF25   RESERVED
PM6              0xFF26   Port mode register 6
PM6.PM61          1   P61 pin input/output mode selection
PM6.PM60          0   P60 pin input/output mode selection
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28   Port mode register 8
PM8.PM85          5   P85 pin input/output mode selection
PM8.PM84          4   P84 pin input/output mode selection
PM8.PM83          3   P83 pin input/output mode selection
PM8.PM82          2   P82 pin input/output mode selection
PM8.PM81          1   P81 pin input/output mode selection
PM8.PM80          0   P80 pin input/output mode selection
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Watchdog timer clock selection register
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock (fW ) selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
PF8              0xFF58   Port function register 8
PF8.PF85          5   P85 port function
PF8.PF84          4   P84 port function
PF8.PF83          3   P83 port function
PF8.PF82          2   P82 port function
PF8.PF81          1   P81 port function
PF8.PF80          0   P80 port function
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
CR30             0xFF63   8-bit compare register 30
TM30             0xFF64   8-bit timer counter 30
TMC30            0xFF65   8-bit timer mode control register 30
TMC30.TCE30       7   Control of TM30 count operation
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD300      1   Selection of operation mode for timer 30
CR40             0xFF66   8-bit compare register 40
CRH40            0xFF67   8-bit H width compare register 40
TM40             0xFF68   8-bit timer counter 40
TMC40            0xFF69   8-bit timer mode control register 40
TMC40.TCE40       7   Control of TM40 count operation
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of operation mode for timer 40 bit 1
TMC40.TMD400      1   Selection of operation mode for timer 40 bit 0
TMC40.TOE40       0   Control of timer output
TCA40            0xFF6A   Carrier generator output control register 40
TCA40.RMC40       2   Control of remote control output
TCA40.NRZB40      1   next data to be output to NRZ40
TCA40.NRZ40       0   No return zero data
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
RESERVEDFF70     0xFF70   RESERVED
RESERVEDFF71     0xFF71   RESERVED
CSIM10           0xFF72   Serial operation mode register 10
CSIM10.CSIE10     7   Operation control in 3-wire serial I/O mode
CSIM10.TPS101     5   Count clock selection when internal clock is selected bit 1
CSIM10.TPS100     4   Count clock selection when internal clock is selected bit 0
CSIM10.DIR10      2   Start bit specification
CSIM10.CSCK10     1   SIO10 clock selection
RESERVEDFF73     0xFF73   RESERVED
SIO10            0xFF74   Transmission/reception shift register 10
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Supply of power for LCD drive
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   LCD source clock (fLCD) selection bit 3
LCDC0.LCDC02      2   LCD source clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection 0
RESERVEDFFB3     0xFFB3   RESERVED
RESERVEDFFB4     0xFFB4   RESERVED
RESERVEDFFB5     0xFFB5   RESERVED
RESERVEDFFB6     0xFFB6   RESERVED
RESERVEDFFB7     0xFFB7   RESERVED
RESERVEDFFB8     0xFFB8   RESERVED
RESERVEDFFB9     0xFFB9   RESERVED
RESERVEDFFBA     0xFFBA   RESERVED
RESERVEDFFBB     0xFFBB   RESERVED
RESERVEDFFBC     0xFFBC   RESERVED
RESERVEDFFBD     0xFFBD   RESERVED
RESERVEDFFBE     0xFFBE   RESERVED
RESERVEDFFBF     0xFFBF   RESERVED
RESERVEDFFC0     0xFFC0   RESERVED
RESERVEDFFC1     0xFFC1   RESERVED
RESERVEDFFC2     0xFFC2   RESERVED
RESERVEDFFC3     0xFFC3   RESERVED
RESERVEDFFC4     0xFFC4   RESERVED
RESERVEDFFC5     0xFFC5   RESERVED
RESERVEDFFC6     0xFFC6   RESERVED
RESERVEDFFC7     0xFFC7   RESERVED
RESERVEDFFC8     0xFFC8   RESERVED
RESERVEDFFC9     0xFFC9   RESERVED
RESERVEDFFCA     0xFFCA   RESERVED
RESERVEDFFCB     0xFFCB   RESERVED
RESERVEDFFCC     0xFFCC   RESERVED
RESERVEDFFCD     0xFFCD   RESERVED
RESERVEDFFCE     0xFFCE   RESERVED
RESERVEDFFCF     0xFFCF   RESERVED
RESERVEDFFD0     0xFFD0   RESERVED
RESERVEDFFD1     0xFFD1   RESERVED
RESERVEDFFD2     0xFFD2   RESERVED
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
POCF1            0xFFDD   Power-on-clear register 1
POCF1.POCOF1      2   POC output detection flag
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIIF         7   WTIIF  - Interrupt request flag
IF0.KRIF00        6   KRIF00 - Interrupt request flag
IF0.TMIF40        5   TMIF40 - Interrupt request flag
IF0.TMIF30        4   TMIF30 - Interrupt request flag
IF0.WTIF          3   WTIF   - Interrupt request flag
IF0.CSIIF0        2   CSIIF0 - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTIMK         7   WTIMK  - Interrupt servicing control
MK0.KRMK00        6   KRMK00 - Interrupt servicing control
MK0.TMMK40        5   TMMK40 - Interrupt servicing control
MK0.TMMK30        4   TMMK30 - Interrupt servicing control
MK0.WTMK          3   WTMK   - Interrupt servicing control
MK0.CSIMK0        2   CSIMK0 - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM00       0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P4 on-chip pull-up resistor selection
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2
OSTS.OSTS1        1
OSTS.OSTS0        0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU ) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789327
; U14673EJ1V0PM00.PDF, U15043EJ1V0UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x6000   Internal ROM
area BSS RESERVED   0x6000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA18   LCD display RAM
area BSS RESERVED   0xFA18:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF75   Special Function Register
area BSS RESERVED   0xFF75:0xFFB0
area DATA FSR_2     0xFFB0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTCSI10_         0x0008   INTCSI10
interrupt INTWT_            0x000A   INTWT
interrupt INTTM30_          0x000C   INTTM30
interrupt INTTM40_          0x000E   INTTM40
interrupt INTKR00_          0x0010   INTKR00
interrupt INTWTI_           0x0012   INTWTI


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P4               0xFF03   Port 4
RESERVEDFF04     0xFF04   RESERVED
P6               0xFF05   Port 6
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM43          3   P43 pin input/output mode selection
PM4.PM42          2   P42 pin input/output mode selection
PM4.PM41          1   P41 pin input/output mode selection
PM4.PM40          0   P40 pin input/output mode selection
RESERVEDFF25     0xFF25   RESERVED
PM6              0xFF26   Port mode register 6
PM6.PM61          1   P61 pin input/output mode selection
PM6.PM60          0   P60 pin input/output mode selection
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28   Port mode register 8
PM8.PM85          5   P85 pin input/output mode selection
PM8.PM84          4   P84 pin input/output mode selection
PM8.PM83          3   P83 pin input/output mode selection
PM8.PM82          2   P82 pin input/output mode selection
PM8.PM81          1   P81 pin input/output mode selection
PM8.PM80          0   P80 pin input/output mode selection
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Watchdog timer clock selection register
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock (fW ) selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
PF8              0xFF58   Port function register 8
PF8.PF85          5   P85 port function
PF8.PF84          4   P84 port function
PF8.PF83          3   P83 port function
PF8.PF82          2   P82 port function
PF8.PF81          1   P81 port function
PF8.PF80          0   P80 port function
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
CR30             0xFF63   8-bit compare register 30
TM30             0xFF64   8-bit timer counter 30
TMC30            0xFF65   8-bit timer mode control register 30
TMC30.TCE30       7   Control of TM30 count operation
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD300      1   Selection of operation mode for timer 30
CR40             0xFF66   8-bit compare register 40
CRH40            0xFF67   8-bit H width compare register 40
TM40             0xFF68   8-bit timer counter 40
TMC40            0xFF69   8-bit timer mode control register 40
TMC40.TCE40       7   Control of TM40 count operation
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of operation mode for timer 40 bit 1
TMC40.TMD400      1   Selection of operation mode for timer 40 bit 0
TMC40.TOE40       0   Control of timer output
TCA40            0xFF6A   Carrier generator output control register 40
TCA40.RMC40       2   Control of remote control output
TCA40.NRZB40      1   next data to be output to NRZ40
TCA40.NRZ40       0   No return zero data
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
RESERVEDFF70     0xFF70   RESERVED
RESERVEDFF71     0xFF71   RESERVED
CSIM10           0xFF72   Serial operation mode register 10
CSIM10.CSIE10     7   Operation control in 3-wire serial I/O mode
CSIM10.TPS101     5   Count clock selection when internal clock is selected bit 1
CSIM10.TPS100     4   Count clock selection when internal clock is selected bit 0
CSIM10.DIR10      2   Start bit specification
CSIM10.CSCK10     1   SIO10 clock selection
RESERVEDFF73     0xFF73   RESERVED
SIO10            0xFF74   Transmission/reception shift register 10
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Supply of power for LCD drive
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   LCD source clock (fLCD) selection bit 3
LCDC0.LCDC02      2   LCD source clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection 0
RESERVEDFFB3     0xFFB3   RESERVED
RESERVEDFFB4     0xFFB4   RESERVED
RESERVEDFFB5     0xFFB5   RESERVED
RESERVEDFFB6     0xFFB6   RESERVED
RESERVEDFFB7     0xFFB7   RESERVED
RESERVEDFFB8     0xFFB8   RESERVED
RESERVEDFFB9     0xFFB9   RESERVED
RESERVEDFFBA     0xFFBA   RESERVED
RESERVEDFFBB     0xFFBB   RESERVED
RESERVEDFFBC     0xFFBC   RESERVED
RESERVEDFFBD     0xFFBD   RESERVED
RESERVEDFFBE     0xFFBE   RESERVED
RESERVEDFFBF     0xFFBF   RESERVED
RESERVEDFFC0     0xFFC0   RESERVED
RESERVEDFFC1     0xFFC1   RESERVED
RESERVEDFFC2     0xFFC2   RESERVED
RESERVEDFFC3     0xFFC3   RESERVED
RESERVEDFFC4     0xFFC4   RESERVED
RESERVEDFFC5     0xFFC5   RESERVED
RESERVEDFFC6     0xFFC6   RESERVED
RESERVEDFFC7     0xFFC7   RESERVED
RESERVEDFFC8     0xFFC8   RESERVED
RESERVEDFFC9     0xFFC9   RESERVED
RESERVEDFFCA     0xFFCA   RESERVED
RESERVEDFFCB     0xFFCB   RESERVED
RESERVEDFFCC     0xFFCC   RESERVED
RESERVEDFFCD     0xFFCD   RESERVED
RESERVEDFFCE     0xFFCE   RESERVED
RESERVEDFFCF     0xFFCF   RESERVED
RESERVEDFFD0     0xFFD0   RESERVED
RESERVEDFFD1     0xFFD1   RESERVED
RESERVEDFFD2     0xFFD2   RESERVED
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
POCF1            0xFFDD   Power-on-clear register 1
POCF1.POCOF1      2   POC output detection flag
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIIF         7   WTIIF  - Interrupt request flag
IF0.KRIF00        6   KRIF00 - Interrupt request flag
IF0.TMIF40        5   TMIF40 - Interrupt request flag
IF0.TMIF30        4   TMIF30 - Interrupt request flag
IF0.WTIF          3   WTIF   - Interrupt request flag
IF0.CSIIF0        2   CSIIF0 - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTIMK         7   WTIMK  - Interrupt servicing control
MK0.KRMK00        6   KRMK00 - Interrupt servicing control
MK0.TMMK40        5   TMMK40 - Interrupt servicing control
MK0.TMMK30        4   TMMK30 - Interrupt servicing control
MK0.WTMK          3   WTMK   - Interrupt servicing control
MK0.CSIMK0        2   CSIMK0 - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM00       0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P4 on-chip pull-up resistor selection
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2
OSTS.OSTS1        1
OSTS.OSTS0        0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU ) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78F9328
; U14411EJ1V0PM00.PDF, U15043EJ1V0UM00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x8000   Flash memory
area BSS RESERVED   0x8000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA18   LCD display RAM
area BSS RESERVED   0xFA18:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF75   Special Function Register
area BSS RESERVED   0xFF75:0xFFB0
area DATA FSR_2     0xFFB0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTCSI10_         0x0008   INTCSI10
interrupt INTWT_            0x000A   INTWT
interrupt INTTM30_          0x000C   INTTM30
interrupt INTTM40_          0x000E   INTTM40
interrupt INTKR00_          0x0010   INTKR00
interrupt INTWTI_           0x0012   INTWTI


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P4               0xFF03   Port 4
RESERVEDFF04     0xFF04   RESERVED
P6               0xFF05   Port 6
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM43          3   P43 pin input/output mode selection
PM4.PM42          2   P42 pin input/output mode selection
PM4.PM41          1   P41 pin input/output mode selection
PM4.PM40          0   P40 pin input/output mode selection
RESERVEDFF25     0xFF25   RESERVED
PM6              0xFF26   Port mode register 6
PM6.PM61          1   P61 pin input/output mode selection
PM6.PM60          0   P60 pin input/output mode selection
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28   Port mode register 8
PM8.PM85          5   P85 pin input/output mode selection
PM8.PM84          4   P84 pin input/output mode selection
PM8.PM83          3   P83 pin input/output mode selection
PM8.PM82          2   P82 pin input/output mode selection
PM8.PM81          1   P81 pin input/output mode selection
PM8.PM80          0   P80 pin input/output mode selection
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Watchdog timer clock selection register
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock (fW ) selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
PF8              0xFF58   Port function register 8
PF8.PF85          5   P85 port function
PF8.PF84          4   P84 port function
PF8.PF83          3   P83 port function
PF8.PF82          2   P82 port function
PF8.PF81          1   P81 port function
PF8.PF80          0   P80 port function
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
CR30             0xFF63   8-bit compare register 30
TM30             0xFF64   8-bit timer counter 30
TMC30            0xFF65   8-bit timer mode control register 30
TMC30.TCE30       7   Control of TM30 count operation
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD300      1   Selection of operation mode for timer 30
CR40             0xFF66   8-bit compare register 40
CRH40            0xFF67   8-bit H width compare register 40
TM40             0xFF68   8-bit timer counter 40
TMC40            0xFF69   8-bit timer mode control register 40
TMC40.TCE40       7   Control of TM40 count operation
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of operation mode for timer 40 bit 1
TMC40.TMD400      1   Selection of operation mode for timer 40 bit 0
TMC40.TOE40       0   Control of timer output
TCA40            0xFF6A   Carrier generator output control register 40
TCA40.RMC40       2   Control of remote control output
TCA40.NRZB40      1   next data to be output to NRZ40
TCA40.NRZ40       0   No return zero data
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
RESERVEDFF70     0xFF70   RESERVED
RESERVEDFF71     0xFF71   RESERVED
CSIM10           0xFF72   Serial operation mode register 10
CSIM10.CSIE10     7   Operation control in 3-wire serial I/O mode
CSIM10.TPS101     5   Count clock selection when internal clock is selected bit 1
CSIM10.TPS100     4   Count clock selection when internal clock is selected bit 0
CSIM10.DIR10      2   Start bit specification
CSIM10.CSCK10     1   SIO10 clock selection
RESERVEDFF73     0xFF73   RESERVED
SIO10            0xFF74   Transmission/reception shift register 10
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Supply of power for LCD drive
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   LCD source clock (fLCD) selection bit 3
LCDC0.LCDC02      2   LCD source clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection 0
RESERVEDFFB3     0xFFB3   RESERVED
RESERVEDFFB4     0xFFB4   RESERVED
RESERVEDFFB5     0xFFB5   RESERVED
RESERVEDFFB6     0xFFB6   RESERVED
RESERVEDFFB7     0xFFB7   RESERVED
RESERVEDFFB8     0xFFB8   RESERVED
RESERVEDFFB9     0xFFB9   RESERVED
RESERVEDFFBA     0xFFBA   RESERVED
RESERVEDFFBB     0xFFBB   RESERVED
RESERVEDFFBC     0xFFBC   RESERVED
RESERVEDFFBD     0xFFBD   RESERVED
RESERVEDFFBE     0xFFBE   RESERVED
RESERVEDFFBF     0xFFBF   RESERVED
RESERVEDFFC0     0xFFC0   RESERVED
RESERVEDFFC1     0xFFC1   RESERVED
RESERVEDFFC2     0xFFC2   RESERVED
RESERVEDFFC3     0xFFC3   RESERVED
RESERVEDFFC4     0xFFC4   RESERVED
RESERVEDFFC5     0xFFC5   RESERVED
RESERVEDFFC6     0xFFC6   RESERVED
RESERVEDFFC7     0xFFC7   RESERVED
RESERVEDFFC8     0xFFC8   RESERVED
RESERVEDFFC9     0xFFC9   RESERVED
RESERVEDFFCA     0xFFCA   RESERVED
RESERVEDFFCB     0xFFCB   RESERVED
RESERVEDFFCC     0xFFCC   RESERVED
RESERVEDFFCD     0xFFCD   RESERVED
RESERVEDFFCE     0xFFCE   RESERVED
RESERVEDFFCF     0xFFCF   RESERVED
RESERVEDFFD0     0xFFD0   RESERVED
RESERVEDFFD1     0xFFD1   RESERVED
RESERVEDFFD2     0xFFD2   RESERVED
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
POCF1            0xFFDD   Power-on-clear register 1
POCF1.POCOF1      2   POC output detection flag
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIIF         7   WTIIF  - Interrupt request flag
IF0.KRIF00        6   KRIF00 - Interrupt request flag
IF0.TMIF40        5   TMIF40 - Interrupt request flag
IF0.TMIF30        4   TMIF30 - Interrupt request flag
IF0.WTIF          3   WTIF   - Interrupt request flag
IF0.CSIIF0        2   CSIIF0 - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTIMK         7   WTIMK  - Interrupt servicing control
MK0.KRMK00        6   KRMK00 - Interrupt servicing control
MK0.TMMK40        5   TMMK40 - Interrupt servicing control
MK0.TMMK30        4   TMMK30 - Interrupt servicing control
MK0.WTMK          3   WTMK   - Interrupt servicing control
MK0.CSIMK0        2   CSIMK0 - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM00       0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P4 on-chip pull-up resistor selection
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2
OSTS.OSTS1        1
OSTS.OSTS0        0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU ) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789405A
; U13952EJ2V0UM00.PDF, U14024EJ2V0DS00.PDF, U15877EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x3000   Internal ROM
area BSS RESERVED   0x3000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA1C   RAM space for LCD data
area BSS RESERVED   0xFA1C:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFB0
area DATA FSR_2     0xFFB0:0xFFB3   Special Function Register
area BSS RESERVED   0xFFB3:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR00_INTCSI00  0x000E   INTSR00/INTCSI00
interrupt INTST00_          0x0010   INTST00
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM00_          0x0016   INTTM00
interrupt INTTM01_          0x0018   INTTM01
interrupt INTTM02_          0x001A   INTTM02
interrupt INTTM50_          0x001C   INTTM50
interrupt INTKR00_          0x001E   INTKR00
interrupt INTAD0_           0x0020   INTAD0
interrupt INTCMP0_          0x0022   INTCMP0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
RESERVEDFF01     0xFF01   RESERVED
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P4               0xFF04   Port 4
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
P9               0xFF09   Port 9
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
SIO00            0xFF10   Transmit shift / Receive buffer register 00
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR50             0xFF16   16-bit compare register 50
TM50             0xFF18   16-bit timer counter 50
TCP50            0xFF1A   16-bit capture register 50
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED 
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin I/O mode selection
PM0.PM02          2   P02 pin I/O mode selection
PM0.PM01          1   P01 pin I/O mode selection
PM0.PM00          0   P00 pin I/O mode selection
RESERVEDFF21     0xFF21   RESERVED
PM2              0xFF22   Port mode register 2
PM2.PM27          7   P27 pin I/O mode selection
PM2.PM26          6   P26 pin I/O mode selection
PM2.PM25          5   P25 pin I/O mode selection
PM2.PM24          4   P24 pin I/O mode selection
PM2.PM23          3   P23 pin I/O mode selection
PM2.PM22          2   P22 pin I/O mode selection
PM2.PM21          1   P21 pin I/O mode selection
PM2.PM20          0   P20 pin I/O mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 pin I/O mode selection
PM4.PM46          6   P46 pin I/O mode selection
PM4.PM45          5   P45 pin I/O mode selection
PM4.PM44          4   P44 pin I/O mode selection
PM4.PM43          3   P43 pin I/O mode selection
PM4.PM42          2   P42 pin I/O mode selection
PM4.PM41          1   P41 pin I/O mode selection
PM4.PM40          0   P40 pin I/O mode selection
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin I/O mode selection
PM5.PM52          2   P52 pin I/O mode selection
PM5.PM51          1   P51 pin I/O mode selection
PM5.PM50          0   P50 pin I/O mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28   Port mode register 8
PM8.PM87          7   P87 pin I/O mode selection
PM8.PM86          6   P86 pin I/O mode selection
PM8.PM85          5   P85 pin I/O mode selection
PM8.PM84          4   P84 pin I/O mode selection
PM8.PM83          3   P83 pin I/O mode selection
PM8.PM82          2   P82 pin I/O mode selection
PM8.PM81          1   P81 pin I/O mode selection
PM8.PM80          0   P80 pin I/O mode selection
PM9              0xFF29   Port mode register 9
PM9.PM93          3   P93 pin I/O mode selection
PM9.PM92          2   P92 pin I/O mode selection
PM9.PM91          1   P91 pin I/O mode selection
PM9.PM90          0   P90 pin I/O mode selection
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2  Watchdog timer count clock selection bit 2
TCL2.TCL21        1  Watchdog timer count clock selection bit 1
TCL2.TCL20        0  Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC50            0xFF48   16-bit timer mode control register 50
TMC50.TOD50       7   Timer output data
TMC50.TOF50       6   Overflow flag set
TMC50.CPT501      5   Capture edge selection bit 1
TMC50.CPT500      4   Capture edge selection bit 0
TMC50.TOC50       3   Timer output data inverse control
TMC50.TCL501      2   16-bit timer 50 count clock selection bit 1
TMC50.TCL500      1   16-bit timer 50 count clock selection bit 0
TMC50.TOE50       0   16-bit timer 50 output control
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
CMPRM0           0xFF4E   Comparator mode register 0
CMPRM0.CMPON0     3   Comparator power supply on/off control
CMPRM0.SELCMP0    2   Clock output control
CMPRM0.OPDR0      1   Open-drain output selection
CMPRM0.CMPOUT0    0   The comparator output is read
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer counter 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   Operation control of 8-bit timer counter 00
TMC00.TCL001      2   Count clock selection of 8-bit timer/event counter 00 bit 1
TMC00.TCL000      1   Count clock selection of 8-bit timer/event counter 00 bit 0
CR01             0xFF54   8-bit compare register 01
TM01             0xFF55   8-bit timer counter 01
RESERVEDFF56     0xFF56   RESERVED
TMC01            0xFF57   8-bit timer mode control register 01
TMC01.TCE01       7   Operation control of 8-bit timer counter 01                
TMC01.TCL011      2   Count clock selection of 8-bit timer/event counter 01 bit 1
TMC01.TCL010      1   Count clock selection of 8-bit timer/event counter 01 bit 0
CR02             0xFF58   8-bit compare register 02
TM02             0xFF59   8-bit timer counter 02
RESERVEDFF5A     0xFF5A   RESERVED
TMC02            0xFF5B   8-bit timer mode control register 02
TMC02.TCE02       7   Operation control of 8-bit timer counter 02
TMC02.TCL021      2   Count clock selection of 8-bit timer 02 bit 1
TMC02.TCL020      1   Count clock selection of 8-bit timer 02 bit 0
TMC02.TOE02       0   Output control of 8-bit timer 02
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7   Transmit operation control
ASIM00.RXE00      6   Receive operation control
ASIM00.PS001      5   Parity bit specification bit 1
ASIM00.PS000      4   Parity bit specification bit 0
ASIM00.CL00       3   Character length specification
ASIM00.SL00       2   Transmit data stop bit length specification
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2   Parity error flag
ASIS00.FE00       1   Framing error flag
ASIS00.OVE00      0   Overrun error flag
CSIM00           0xFF72   Serial operation mode register 00
CSIM00.CSIE00     7   Operation control in 3-wire serial I/O mode
CSIM00.DIR00      2   Start bit specification
CSIM00.CSCK00     1   Clock selection in 3-wire serial I/O mode
BRGC00           0xFF73   Baud rate generator control register 00
BRGC00.TPS003     7   3-bit counter source clock selection bit 3
BRGC00.TPS002     6   3-bit counter source clock selection bit 2
BRGC00.TPS001     5   3-bit counter source clock selection bit 1
BRGC00.TPS000     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input select register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   Control of LCD display
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   LCD drive power supply selection
LCDM0.LCDM02      2   LCD controller/driver display mode selection bit 2
LCDM0.LCDM01      1   LCD controller/driver display mode selection bit 1
LCDM0.LCDM00      0   LCD controller/driver display mode selection bit 0
LPS0             0xFFB1   LCD port selector 0
LPS0.LPS05        5
LPS0.LPS04        4
LPS0.LPS03        3
LPS0.LPS02        2
LPS0.LPS01        1
LPS0.LPS00        0
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Selection of LCD source clock frequency bit 3
LCDC0.LCDC02      2   Selection of LCD source clock frequency bit 2
LCDC0.LCDC01      1   Selection of LCD clock (LCDCL) frequency bit 1
LCDC0.LCDC00      0   Selection of LCD clock (LCDCL) frequency bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF00        6   STIF00 - Interrupt request flag
IF0.SRIF00        5   SRIF00 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.CMPIF0        7   CMPIF0 - Interrupt request flag
IF1.ADIF0         6   ADIF0  - Interrupt request flag
IF1.KRIF00        5   KRIF00 - Interrupt request flag
IF1.TMIF50        4   TMIF50 - Interrupt request flag
IF1.TMIF02        3   TMIF02 - Interrupt request flag
IF1.TMIF01        2   TMIF01 - Interrupt request flag
IF1.TMIF00        1   TMIF00 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt servicing control
MK0.STMK00        6   STMK00 - Interrupt servicing control
MK0.SRMK00        5   SRMK00 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.CMPMK0        7   CMPMK0 - Interrupt servicing control
MK1.ADMK0         6   ADMK0  - Interrupt servicing control
MK1.KRMK00        5   KRMK00 - Interrupt servicing control
MK1.TMMK50        4   TMMK50 - Interrupt servicing control
MK1.TMMK02        3   TMMK02 - Interrupt servicing control
MK1.TMMK01        2   TMMK01 - Interrupt servicing control
MK1.TMMK00        1   TMMK00 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES61        7   INTCMP0 valid edge selection bit 1
INTM1.ES60        6   INTCMP0 valid edge selection bit 0
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
PU1              0xFFF3   Pull-up resistor option register 1
PU1.PU127         7   P2 on-chip pull-up resistor selection bit 7
PU1.PU126         6   P2 on-chip pull-up resistor selection bit 6
PU1.PU125         5   P2 on-chip pull-up resistor selection bit 5
PU1.PU124         4   P2 on-chip pull-up resistor selection bit 4
PU1.PU123         3   P2 on-chip pull-up resistor selection bit 3
PU1.PU122         2   P2 on-chip pull-up resistor selection bit 2
PU1.PU121         1   P2 on-chip pull-up resistor selection bit 1
PU1.PU120         0   P2 on-chip pull-up resistor selection bit 0
PU2              0xFFF4   Pull-up resistor option register 2
PU2.PU292         5   P9 on-chip pull-up resistor selection bit 2
PU2.PU290         4   P9 on-chip pull-up resistor selection bit 0
PU2.PU286         3   P8 on-chip pull-up resistor selection bit 6
PU2.PU284         2   P8 on-chip pull-up resistor selection bit 4
PU2.PU282         1   P8 on-chip pull-up resistor selection bit 2
PU2.PU280         0   P8 on-chip pull-up resistor selection bit 0
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM005      5   Key return signal detection selection bit 5
KRM00.KRM004      4   Key return signal detection selection bit 4
KRM00.KRM000      0   Key return signal detection selection bit 0
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P0 on-chip pull-up resistor selection bit 4
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   Selection of CPU clock (fCPU)
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789406A
; U13952EJ2V0UM00.PDF, U14024EJ2V0DS00.PDF, U15877EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA1C   RAM space for LCD data
area BSS RESERVED   0xFA1C:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFB0
area DATA FSR_2     0xFFB0:0xFFB3   Special Function Register
area BSS RESERVED   0xFFB3:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR00_INTCSI00  0x000E   INTSR00/INTCSI00
interrupt INTST00_          0x0010   INTST00
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM00_          0x0016   INTTM00
interrupt INTTM01_          0x0018   INTTM01
interrupt INTTM02_          0x001A   INTTM02
interrupt INTTM50_          0x001C   INTTM50
interrupt INTKR00_          0x001E   INTKR00
interrupt INTAD0_           0x0020   INTAD0
interrupt INTCMP0_          0x0022   INTCMP0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
RESERVEDFF01     0xFF01   RESERVED
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P4               0xFF04   Port 4
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
P9               0xFF09   Port 9
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
SIO00            0xFF10   Transmit shift / Receive buffer register 00
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR50             0xFF16   16-bit compare register 50
TM50             0xFF18   16-bit timer counter 50
TCP50            0xFF1A   16-bit capture register 50
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED 
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin I/O mode selection
PM0.PM02          2   P02 pin I/O mode selection
PM0.PM01          1   P01 pin I/O mode selection
PM0.PM00          0   P00 pin I/O mode selection
RESERVEDFF21     0xFF21   RESERVED
PM2              0xFF22   Port mode register 2
PM2.PM27          7   P27 pin I/O mode selection
PM2.PM26          6   P26 pin I/O mode selection
PM2.PM25          5   P25 pin I/O mode selection
PM2.PM24          4   P24 pin I/O mode selection
PM2.PM23          3   P23 pin I/O mode selection
PM2.PM22          2   P22 pin I/O mode selection
PM2.PM21          1   P21 pin I/O mode selection
PM2.PM20          0   P20 pin I/O mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 pin I/O mode selection
PM4.PM46          6   P46 pin I/O mode selection
PM4.PM45          5   P45 pin I/O mode selection
PM4.PM44          4   P44 pin I/O mode selection
PM4.PM43          3   P43 pin I/O mode selection
PM4.PM42          2   P42 pin I/O mode selection
PM4.PM41          1   P41 pin I/O mode selection
PM4.PM40          0   P40 pin I/O mode selection
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin I/O mode selection
PM5.PM52          2   P52 pin I/O mode selection
PM5.PM51          1   P51 pin I/O mode selection
PM5.PM50          0   P50 pin I/O mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28   Port mode register 8
PM8.PM87          7   P87 pin I/O mode selection
PM8.PM86          6   P86 pin I/O mode selection
PM8.PM85          5   P85 pin I/O mode selection
PM8.PM84          4   P84 pin I/O mode selection
PM8.PM83          3   P83 pin I/O mode selection
PM8.PM82          2   P82 pin I/O mode selection
PM8.PM81          1   P81 pin I/O mode selection
PM8.PM80          0   P80 pin I/O mode selection
PM9              0xFF29   Port mode register 9
PM9.PM93          3   P93 pin I/O mode selection
PM9.PM92          2   P92 pin I/O mode selection
PM9.PM91          1   P91 pin I/O mode selection
PM9.PM90          0   P90 pin I/O mode selection
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2  Watchdog timer count clock selection bit 2
TCL2.TCL21        1  Watchdog timer count clock selection bit 1
TCL2.TCL20        0  Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC50            0xFF48   16-bit timer mode control register 50
TMC50.TOD50       7   Timer output data
TMC50.TOF50       6   Overflow flag set
TMC50.CPT501      5   Capture edge selection bit 1
TMC50.CPT500      4   Capture edge selection bit 0
TMC50.TOC50       3   Timer output data inverse control
TMC50.TCL501      2   16-bit timer 50 count clock selection bit 1
TMC50.TCL500      1   16-bit timer 50 count clock selection bit 0
TMC50.TOE50       0   16-bit timer 50 output control
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
CMPRM0           0xFF4E   Comparator mode register 0
CMPRM0.CMPON0     3   Comparator power supply on/off control
CMPRM0.SELCMP0    2   Clock output control
CMPRM0.OPDR0      1   Open-drain output selection
CMPRM0.CMPOUT0    0   The comparator output is read
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer counter 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   Operation control of 8-bit timer counter 00
TMC00.TCL001      2   Count clock selection of 8-bit timer/event counter 00 bit 1
TMC00.TCL000      1   Count clock selection of 8-bit timer/event counter 00 bit 0
CR01             0xFF54   8-bit compare register 01
TM01             0xFF55   8-bit timer counter 01
RESERVEDFF56     0xFF56   RESERVED
TMC01            0xFF57   8-bit timer mode control register 01
TMC01.TCE01       7   Operation control of 8-bit timer counter 01                
TMC01.TCL011      2   Count clock selection of 8-bit timer/event counter 01 bit 1
TMC01.TCL010      1   Count clock selection of 8-bit timer/event counter 01 bit 0
CR02             0xFF58   8-bit compare register 02
TM02             0xFF59   8-bit timer counter 02
RESERVEDFF5A     0xFF5A   RESERVED
TMC02            0xFF5B   8-bit timer mode control register 02
TMC02.TCE02       7   Operation control of 8-bit timer counter 02
TMC02.TCL021      2   Count clock selection of 8-bit timer 02 bit 1
TMC02.TCL020      1   Count clock selection of 8-bit timer 02 bit 0
TMC02.TOE02       0   Output control of 8-bit timer 02
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7   Transmit operation control
ASIM00.RXE00      6   Receive operation control
ASIM00.PS001      5   Parity bit specification bit 1
ASIM00.PS000      4   Parity bit specification bit 0
ASIM00.CL00       3   Character length specification
ASIM00.SL00       2   Transmit data stop bit length specification
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2   Parity error flag
ASIS00.FE00       1   Framing error flag
ASIS00.OVE00      0   Overrun error flag
CSIM00           0xFF72   Serial operation mode register 00
CSIM00.CSIE00     7   Operation control in 3-wire serial I/O mode
CSIM00.DIR00      2   Start bit specification
CSIM00.CSCK00     1   Clock selection in 3-wire serial I/O mode
BRGC00           0xFF73   Baud rate generator control register 00
BRGC00.TPS003     7   3-bit counter source clock selection bit 3
BRGC00.TPS002     6   3-bit counter source clock selection bit 2
BRGC00.TPS001     5   3-bit counter source clock selection bit 1
BRGC00.TPS000     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input select register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   Control of LCD display
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   LCD drive power supply selection
LCDM0.LCDM02      2   LCD controller/driver display mode selection bit 2
LCDM0.LCDM01      1   LCD controller/driver display mode selection bit 1
LCDM0.LCDM00      0   LCD controller/driver display mode selection bit 0
LPS0             0xFFB1   LCD port selector 0
LPS0.LPS05        5
LPS0.LPS04        4
LPS0.LPS03        3
LPS0.LPS02        2
LPS0.LPS01        1
LPS0.LPS00        0
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Selection of LCD source clock frequency bit 3
LCDC0.LCDC02      2   Selection of LCD source clock frequency bit 2
LCDC0.LCDC01      1   Selection of LCD clock (LCDCL) frequency bit 1
LCDC0.LCDC00      0   Selection of LCD clock (LCDCL) frequency bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF00        6   STIF00 - Interrupt request flag
IF0.SRIF00        5   SRIF00 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.CMPIF0        7   CMPIF0 - Interrupt request flag
IF1.ADIF0         6   ADIF0  - Interrupt request flag
IF1.KRIF00        5   KRIF00 - Interrupt request flag
IF1.TMIF50        4   TMIF50 - Interrupt request flag
IF1.TMIF02        3   TMIF02 - Interrupt request flag
IF1.TMIF01        2   TMIF01 - Interrupt request flag
IF1.TMIF00        1   TMIF00 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt servicing control
MK0.STMK00        6   STMK00 - Interrupt servicing control
MK0.SRMK00        5   SRMK00 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.CMPMK0        7   CMPMK0 - Interrupt servicing control
MK1.ADMK0         6   ADMK0  - Interrupt servicing control
MK1.KRMK00        5   KRMK00 - Interrupt servicing control
MK1.TMMK50        4   TMMK50 - Interrupt servicing control
MK1.TMMK02        3   TMMK02 - Interrupt servicing control
MK1.TMMK01        2   TMMK01 - Interrupt servicing control
MK1.TMMK00        1   TMMK00 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES61        7   INTCMP0 valid edge selection bit 1
INTM1.ES60        6   INTCMP0 valid edge selection bit 0
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
PU1              0xFFF3   Pull-up resistor option register 1
PU1.PU127         7   P2 on-chip pull-up resistor selection bit 7
PU1.PU126         6   P2 on-chip pull-up resistor selection bit 6
PU1.PU125         5   P2 on-chip pull-up resistor selection bit 5
PU1.PU124         4   P2 on-chip pull-up resistor selection bit 4
PU1.PU123         3   P2 on-chip pull-up resistor selection bit 3
PU1.PU122         2   P2 on-chip pull-up resistor selection bit 2
PU1.PU121         1   P2 on-chip pull-up resistor selection bit 1
PU1.PU120         0   P2 on-chip pull-up resistor selection bit 0
PU2              0xFFF4   Pull-up resistor option register 2
PU2.PU292         5   P9 on-chip pull-up resistor selection bit 2
PU2.PU290         4   P9 on-chip pull-up resistor selection bit 0
PU2.PU286         3   P8 on-chip pull-up resistor selection bit 6
PU2.PU284         2   P8 on-chip pull-up resistor selection bit 4
PU2.PU282         1   P8 on-chip pull-up resistor selection bit 2
PU2.PU280         0   P8 on-chip pull-up resistor selection bit 0
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM005      5   Key return signal detection selection bit 5
KRM00.KRM004      4   Key return signal detection selection bit 4
KRM00.KRM000      0   Key return signal detection selection bit 0
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P0 on-chip pull-up resistor selection bit 4
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   Selection of CPU clock (fCPU)
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789407A
; U13952EJ2V0UM00.PDF, U14024EJ2V0DS00.PDF, U15877EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x6000   Internal ROM
area BSS RESERVED   0x6000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA1C   RAM space for LCD data
area BSS RESERVED   0xFA1C:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFB0
area DATA FSR_2     0xFFB0:0xFFB3   Special Function Register
area BSS RESERVED   0xFFB3:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR00_INTCSI00  0x000E   INTSR00/INTCSI00
interrupt INTST00_          0x0010   INTST00
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM00_          0x0016   INTTM00
interrupt INTTM01_          0x0018   INTTM01
interrupt INTTM02_          0x001A   INTTM02
interrupt INTTM50_          0x001C   INTTM50
interrupt INTKR00_          0x001E   INTKR00
interrupt INTAD0_           0x0020   INTAD0
interrupt INTCMP0_          0x0022   INTCMP0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
RESERVEDFF01     0xFF01   RESERVED
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P4               0xFF04   Port 4
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
P9               0xFF09   Port 9
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
SIO00            0xFF10   Transmit shift / Receive buffer register 00
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR50             0xFF16   16-bit compare register 50
TM50             0xFF18   16-bit timer counter 50
TCP50            0xFF1A   16-bit capture register 50
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED 
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin I/O mode selection
PM0.PM02          2   P02 pin I/O mode selection
PM0.PM01          1   P01 pin I/O mode selection
PM0.PM00          0   P00 pin I/O mode selection
RESERVEDFF21     0xFF21   RESERVED
PM2              0xFF22   Port mode register 2
PM2.PM27          7   P27 pin I/O mode selection
PM2.PM26          6   P26 pin I/O mode selection
PM2.PM25          5   P25 pin I/O mode selection
PM2.PM24          4   P24 pin I/O mode selection
PM2.PM23          3   P23 pin I/O mode selection
PM2.PM22          2   P22 pin I/O mode selection
PM2.PM21          1   P21 pin I/O mode selection
PM2.PM20          0   P20 pin I/O mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 pin I/O mode selection
PM4.PM46          6   P46 pin I/O mode selection
PM4.PM45          5   P45 pin I/O mode selection
PM4.PM44          4   P44 pin I/O mode selection
PM4.PM43          3   P43 pin I/O mode selection
PM4.PM42          2   P42 pin I/O mode selection
PM4.PM41          1   P41 pin I/O mode selection
PM4.PM40          0   P40 pin I/O mode selection
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin I/O mode selection
PM5.PM52          2   P52 pin I/O mode selection
PM5.PM51          1   P51 pin I/O mode selection
PM5.PM50          0   P50 pin I/O mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28   Port mode register 8
PM8.PM87          7   P87 pin I/O mode selection
PM8.PM86          6   P86 pin I/O mode selection
PM8.PM85          5   P85 pin I/O mode selection
PM8.PM84          4   P84 pin I/O mode selection
PM8.PM83          3   P83 pin I/O mode selection
PM8.PM82          2   P82 pin I/O mode selection
PM8.PM81          1   P81 pin I/O mode selection
PM8.PM80          0   P80 pin I/O mode selection
PM9              0xFF29   Port mode register 9
PM9.PM93          3   P93 pin I/O mode selection
PM9.PM92          2   P92 pin I/O mode selection
PM9.PM91          1   P91 pin I/O mode selection
PM9.PM90          0   P90 pin I/O mode selection
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2  Watchdog timer count clock selection bit 2
TCL2.TCL21        1  Watchdog timer count clock selection bit 1
TCL2.TCL20        0  Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC50            0xFF48   16-bit timer mode control register 50
TMC50.TOD50       7   Timer output data
TMC50.TOF50       6   Overflow flag set
TMC50.CPT501      5   Capture edge selection bit 1
TMC50.CPT500      4   Capture edge selection bit 0
TMC50.TOC50       3   Timer output data inverse control
TMC50.TCL501      2   16-bit timer 50 count clock selection bit 1
TMC50.TCL500      1   16-bit timer 50 count clock selection bit 0
TMC50.TOE50       0   16-bit timer 50 output control
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
CMPRM0           0xFF4E   Comparator mode register 0
CMPRM0.CMPON0     3   Comparator power supply on/off control
CMPRM0.SELCMP0    2   Clock output control
CMPRM0.OPDR0      1   Open-drain output selection
CMPRM0.CMPOUT0    0   The comparator output is read
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer counter 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   Operation control of 8-bit timer counter 00
TMC00.TCL001      2   Count clock selection of 8-bit timer/event counter 00 bit 1
TMC00.TCL000      1   Count clock selection of 8-bit timer/event counter 00 bit 0
CR01             0xFF54   8-bit compare register 01
TM01             0xFF55   8-bit timer counter 01
RESERVEDFF56     0xFF56   RESERVED
TMC01            0xFF57   8-bit timer mode control register 01
TMC01.TCE01       7   Operation control of 8-bit timer counter 01                
TMC01.TCL011      2   Count clock selection of 8-bit timer/event counter 01 bit 1
TMC01.TCL010      1   Count clock selection of 8-bit timer/event counter 01 bit 0
CR02             0xFF58   8-bit compare register 02
TM02             0xFF59   8-bit timer counter 02
RESERVEDFF5A     0xFF5A   RESERVED
TMC02            0xFF5B   8-bit timer mode control register 02
TMC02.TCE02       7   Operation control of 8-bit timer counter 02
TMC02.TCL021      2   Count clock selection of 8-bit timer 02 bit 1
TMC02.TCL020      1   Count clock selection of 8-bit timer 02 bit 0
TMC02.TOE02       0   Output control of 8-bit timer 02
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7   Transmit operation control
ASIM00.RXE00      6   Receive operation control
ASIM00.PS001      5   Parity bit specification bit 1
ASIM00.PS000      4   Parity bit specification bit 0
ASIM00.CL00       3   Character length specification
ASIM00.SL00       2   Transmit data stop bit length specification
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2   Parity error flag
ASIS00.FE00       1   Framing error flag
ASIS00.OVE00      0   Overrun error flag
CSIM00           0xFF72   Serial operation mode register 00
CSIM00.CSIE00     7   Operation control in 3-wire serial I/O mode
CSIM00.DIR00      2   Start bit specification
CSIM00.CSCK00     1   Clock selection in 3-wire serial I/O mode
BRGC00           0xFF73   Baud rate generator control register 00
BRGC00.TPS003     7   3-bit counter source clock selection bit 3
BRGC00.TPS002     6   3-bit counter source clock selection bit 2
BRGC00.TPS001     5   3-bit counter source clock selection bit 1
BRGC00.TPS000     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input select register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   Control of LCD display
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   LCD drive power supply selection
LCDM0.LCDM02      2   LCD controller/driver display mode selection bit 2
LCDM0.LCDM01      1   LCD controller/driver display mode selection bit 1
LCDM0.LCDM00      0   LCD controller/driver display mode selection bit 0
LPS0             0xFFB1   LCD port selector 0
LPS0.LPS05        5
LPS0.LPS04        4
LPS0.LPS03        3
LPS0.LPS02        2
LPS0.LPS01        1
LPS0.LPS00        0
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Selection of LCD source clock frequency bit 3
LCDC0.LCDC02      2   Selection of LCD source clock frequency bit 2
LCDC0.LCDC01      1   Selection of LCD clock (LCDCL) frequency bit 1
LCDC0.LCDC00      0   Selection of LCD clock (LCDCL) frequency bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF00        6   STIF00 - Interrupt request flag
IF0.SRIF00        5   SRIF00 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.CMPIF0        7   CMPIF0 - Interrupt request flag
IF1.ADIF0         6   ADIF0  - Interrupt request flag
IF1.KRIF00        5   KRIF00 - Interrupt request flag
IF1.TMIF50        4   TMIF50 - Interrupt request flag
IF1.TMIF02        3   TMIF02 - Interrupt request flag
IF1.TMIF01        2   TMIF01 - Interrupt request flag
IF1.TMIF00        1   TMIF00 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt servicing control
MK0.STMK00        6   STMK00 - Interrupt servicing control
MK0.SRMK00        5   SRMK00 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.CMPMK0        7   CMPMK0 - Interrupt servicing control
MK1.ADMK0         6   ADMK0  - Interrupt servicing control
MK1.KRMK00        5   KRMK00 - Interrupt servicing control
MK1.TMMK50        4   TMMK50 - Interrupt servicing control
MK1.TMMK02        3   TMMK02 - Interrupt servicing control
MK1.TMMK01        2   TMMK01 - Interrupt servicing control
MK1.TMMK00        1   TMMK00 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES61        7   INTCMP0 valid edge selection bit 1
INTM1.ES60        6   INTCMP0 valid edge selection bit 0
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
PU1              0xFFF3   Pull-up resistor option register 1
PU1.PU127         7   P2 on-chip pull-up resistor selection bit 7
PU1.PU126         6   P2 on-chip pull-up resistor selection bit 6
PU1.PU125         5   P2 on-chip pull-up resistor selection bit 5
PU1.PU124         4   P2 on-chip pull-up resistor selection bit 4
PU1.PU123         3   P2 on-chip pull-up resistor selection bit 3
PU1.PU122         2   P2 on-chip pull-up resistor selection bit 2
PU1.PU121         1   P2 on-chip pull-up resistor selection bit 1
PU1.PU120         0   P2 on-chip pull-up resistor selection bit 0
PU2              0xFFF4   Pull-up resistor option register 2
PU2.PU292         5   P9 on-chip pull-up resistor selection bit 2
PU2.PU290         4   P9 on-chip pull-up resistor selection bit 0
PU2.PU286         3   P8 on-chip pull-up resistor selection bit 6
PU2.PU284         2   P8 on-chip pull-up resistor selection bit 4
PU2.PU282         1   P8 on-chip pull-up resistor selection bit 2
PU2.PU280         0   P8 on-chip pull-up resistor selection bit 0
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM005      5   Key return signal detection selection bit 5
KRM00.KRM004      4   Key return signal detection selection bit 4
KRM00.KRM000      0   Key return signal detection selection bit 0
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P0 on-chip pull-up resistor selection bit 4
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   Selection of CPU clock (fCPU)
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789415A
; U13952EJ2V0UM00.PDF, U14024EJ2V0DS00.PDF, U15877EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x3000   Internal ROM
area BSS RESERVED   0x3000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA1C   RAM space for LCD data
area BSS RESERVED   0xFA1C:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFB0
area DATA FSR_2     0xFFB0:0xFFB3   Special Function Register
area BSS RESERVED   0xFFB3:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR00_INTCSI00  0x000E   INTSR00/INTCSI00
interrupt INTST00_          0x0010   INTST00
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM00_          0x0016   INTTM00
interrupt INTTM01_          0x0018   INTTM01
interrupt INTTM02_          0x001A   INTTM02
interrupt INTTM50_          0x001C   INTTM50
interrupt INTKR00_          0x001E   INTKR00
interrupt INTAD0_           0x0020   INTAD0
interrupt INTCMP0_          0x0022   INTCMP0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
RESERVEDFF01     0xFF01   RESERVED
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P4               0xFF04   Port 4
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
P9               0xFF09   Port 9
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
SIO00            0xFF10   Transmit shift / Receive buffer register 00
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR50             0xFF16   16-bit compare register 50
TM50             0xFF18   16-bit timer counter 50
TCP50            0xFF1A   16-bit capture register 50
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED 
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin I/O mode selection
PM0.PM02          2   P02 pin I/O mode selection
PM0.PM01          1   P01 pin I/O mode selection
PM0.PM00          0   P00 pin I/O mode selection
RESERVEDFF21     0xFF21   RESERVED
PM2              0xFF22   Port mode register 2
PM2.PM27          7   P27 pin I/O mode selection
PM2.PM26          6   P26 pin I/O mode selection
PM2.PM25          5   P25 pin I/O mode selection
PM2.PM24          4   P24 pin I/O mode selection
PM2.PM23          3   P23 pin I/O mode selection
PM2.PM22          2   P22 pin I/O mode selection
PM2.PM21          1   P21 pin I/O mode selection
PM2.PM20          0   P20 pin I/O mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 pin I/O mode selection
PM4.PM46          6   P46 pin I/O mode selection
PM4.PM45          5   P45 pin I/O mode selection
PM4.PM44          4   P44 pin I/O mode selection
PM4.PM43          3   P43 pin I/O mode selection
PM4.PM42          2   P42 pin I/O mode selection
PM4.PM41          1   P41 pin I/O mode selection
PM4.PM40          0   P40 pin I/O mode selection
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin I/O mode selection
PM5.PM52          2   P52 pin I/O mode selection
PM5.PM51          1   P51 pin I/O mode selection
PM5.PM50          0   P50 pin I/O mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28   Port mode register 8
PM8.PM87          7   P87 pin I/O mode selection
PM8.PM86          6   P86 pin I/O mode selection
PM8.PM85          5   P85 pin I/O mode selection
PM8.PM84          4   P84 pin I/O mode selection
PM8.PM83          3   P83 pin I/O mode selection
PM8.PM82          2   P82 pin I/O mode selection
PM8.PM81          1   P81 pin I/O mode selection
PM8.PM80          0   P80 pin I/O mode selection
PM9              0xFF29   Port mode register 9
PM9.PM93          3   P93 pin I/O mode selection
PM9.PM92          2   P92 pin I/O mode selection
PM9.PM91          1   P91 pin I/O mode selection
PM9.PM90          0   P90 pin I/O mode selection
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2  Watchdog timer count clock selection bit 2
TCL2.TCL21        1  Watchdog timer count clock selection bit 1
TCL2.TCL20        0  Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC50            0xFF48   16-bit timer mode control register 50
TMC50.TOD50       7   Timer output data
TMC50.TOF50       6   Overflow flag set
TMC50.CPT501      5   Capture edge selection bit 1
TMC50.CPT500      4   Capture edge selection bit 0
TMC50.TOC50       3   Timer output data inverse control
TMC50.TCL501      2   16-bit timer 50 count clock selection bit 1
TMC50.TCL500      1   16-bit timer 50 count clock selection bit 0
TMC50.TOE50       0   16-bit timer 50 output control
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
CMPRM0           0xFF4E   Comparator mode register 0
CMPRM0.CMPON0     3   Comparator power supply on/off control
CMPRM0.SELCMP0    2   Clock output control
CMPRM0.OPDR0      1   Open-drain output selection
CMPRM0.CMPOUT0    0   The comparator output is read
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer counter 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   Operation control of 8-bit timer counter 00
TMC00.TCL001      2   Count clock selection of 8-bit timer/event counter 00 bit 1
TMC00.TCL000      1   Count clock selection of 8-bit timer/event counter 00 bit 0
CR01             0xFF54   8-bit compare register 01
TM01             0xFF55   8-bit timer counter 01
RESERVEDFF56     0xFF56   RESERVED
TMC01            0xFF57   8-bit timer mode control register 01
TMC01.TCE01       7   Operation control of 8-bit timer counter 01                
TMC01.TCL011      2   Count clock selection of 8-bit timer/event counter 01 bit 1
TMC01.TCL010      1   Count clock selection of 8-bit timer/event counter 01 bit 0
CR02             0xFF58   8-bit compare register 02
TM02             0xFF59   8-bit timer counter 02
RESERVEDFF5A     0xFF5A   RESERVED
TMC02            0xFF5B   8-bit timer mode control register 02
TMC02.TCE02       7   Operation control of 8-bit timer counter 02
TMC02.TCL021      2   Count clock selection of 8-bit timer 02 bit 1
TMC02.TCL020      1   Count clock selection of 8-bit timer 02 bit 0
TMC02.TOE02       0   Output control of 8-bit timer 02
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7   Transmit operation control
ASIM00.RXE00      6   Receive operation control
ASIM00.PS001      5   Parity bit specification bit 1
ASIM00.PS000      4   Parity bit specification bit 0
ASIM00.CL00       3   Character length specification
ASIM00.SL00       2   Transmit data stop bit length specification
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2   Parity error flag
ASIS00.FE00       1   Framing error flag
ASIS00.OVE00      0   Overrun error flag
CSIM00           0xFF72   Serial operation mode register 00
CSIM00.CSIE00     7   Operation control in 3-wire serial I/O mode
CSIM00.DIR00      2   Start bit specification
CSIM00.CSCK00     1   Clock selection in 3-wire serial I/O mode
BRGC00           0xFF73   Baud rate generator control register 00
BRGC00.TPS003     7   3-bit counter source clock selection bit 3
BRGC00.TPS002     6   3-bit counter source clock selection bit 2
BRGC00.TPS001     5   3-bit counter source clock selection bit 1
BRGC00.TPS000     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input select register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   Control of LCD display
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   LCD drive power supply selection
LCDM0.LCDM02      2   LCD controller/driver display mode selection bit 2
LCDM0.LCDM01      1   LCD controller/driver display mode selection bit 1
LCDM0.LCDM00      0   LCD controller/driver display mode selection bit 0
LPS0             0xFFB1   LCD port selector 0
LPS0.LPS05        5
LPS0.LPS04        4
LPS0.LPS03        3
LPS0.LPS02        2
LPS0.LPS01        1
LPS0.LPS00        0
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Selection of LCD source clock frequency bit 3
LCDC0.LCDC02      2   Selection of LCD source clock frequency bit 2
LCDC0.LCDC01      1   Selection of LCD clock (LCDCL) frequency bit 1
LCDC0.LCDC00      0   Selection of LCD clock (LCDCL) frequency bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF00        6   STIF00 - Interrupt request flag
IF0.SRIF00        5   SRIF00 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.CMPIF0        7   CMPIF0 - Interrupt request flag
IF1.ADIF0         6   ADIF0  - Interrupt request flag
IF1.KRIF00        5   KRIF00 - Interrupt request flag
IF1.TMIF50        4   TMIF50 - Interrupt request flag
IF1.TMIF02        3   TMIF02 - Interrupt request flag
IF1.TMIF01        2   TMIF01 - Interrupt request flag
IF1.TMIF00        1   TMIF00 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt servicing control
MK0.STMK00        6   STMK00 - Interrupt servicing control
MK0.SRMK00        5   SRMK00 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.CMPMK0        7   CMPMK0 - Interrupt servicing control
MK1.ADMK0         6   ADMK0  - Interrupt servicing control
MK1.KRMK00        5   KRMK00 - Interrupt servicing control
MK1.TMMK50        4   TMMK50 - Interrupt servicing control
MK1.TMMK02        3   TMMK02 - Interrupt servicing control
MK1.TMMK01        2   TMMK01 - Interrupt servicing control
MK1.TMMK00        1   TMMK00 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES61        7   INTCMP0 valid edge selection bit 1
INTM1.ES60        6   INTCMP0 valid edge selection bit 0
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
PU1              0xFFF3   Pull-up resistor option register 1
PU1.PU127         7   P2 on-chip pull-up resistor selection bit 7
PU1.PU126         6   P2 on-chip pull-up resistor selection bit 6
PU1.PU125         5   P2 on-chip pull-up resistor selection bit 5
PU1.PU124         4   P2 on-chip pull-up resistor selection bit 4
PU1.PU123         3   P2 on-chip pull-up resistor selection bit 3
PU1.PU122         2   P2 on-chip pull-up resistor selection bit 2
PU1.PU121         1   P2 on-chip pull-up resistor selection bit 1
PU1.PU120         0   P2 on-chip pull-up resistor selection bit 0
PU2              0xFFF4   Pull-up resistor option register 2
PU2.PU292         5   P9 on-chip pull-up resistor selection bit 2
PU2.PU290         4   P9 on-chip pull-up resistor selection bit 0
PU2.PU286         3   P8 on-chip pull-up resistor selection bit 6
PU2.PU284         2   P8 on-chip pull-up resistor selection bit 4
PU2.PU282         1   P8 on-chip pull-up resistor selection bit 2
PU2.PU280         0   P8 on-chip pull-up resistor selection bit 0
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM005      5   Key return signal detection selection bit 5
KRM00.KRM004      4   Key return signal detection selection bit 4
KRM00.KRM000      0   Key return signal detection selection bit 0
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P0 on-chip pull-up resistor selection bit 4
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   Selection of CPU clock (fCPU)
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789416A
; U13952EJ2V0UM00.PDF, U14024EJ2V0DS00.PDF, U15877EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA1C   RAM space for LCD data
area BSS RESERVED   0xFA1C:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFB0
area DATA FSR_2     0xFFB0:0xFFB3   Special Function Register
area BSS RESERVED   0xFFB3:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR00_INTCSI00  0x000E   INTSR00/INTCSI00
interrupt INTST00_          0x0010   INTST00
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM00_          0x0016   INTTM00
interrupt INTTM01_          0x0018   INTTM01
interrupt INTTM02_          0x001A   INTTM02
interrupt INTTM50_          0x001C   INTTM50
interrupt INTKR00_          0x001E   INTKR00
interrupt INTAD0_           0x0020   INTAD0
interrupt INTCMP0_          0x0022   INTCMP0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
RESERVEDFF01     0xFF01   RESERVED
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P4               0xFF04   Port 4
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
P9               0xFF09   Port 9
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
SIO00            0xFF10   Transmit shift / Receive buffer register 00
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR50             0xFF16   16-bit compare register 50
TM50             0xFF18   16-bit timer counter 50
TCP50            0xFF1A   16-bit capture register 50
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED 
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin I/O mode selection
PM0.PM02          2   P02 pin I/O mode selection
PM0.PM01          1   P01 pin I/O mode selection
PM0.PM00          0   P00 pin I/O mode selection
RESERVEDFF21     0xFF21   RESERVED
PM2              0xFF22   Port mode register 2
PM2.PM27          7   P27 pin I/O mode selection
PM2.PM26          6   P26 pin I/O mode selection
PM2.PM25          5   P25 pin I/O mode selection
PM2.PM24          4   P24 pin I/O mode selection
PM2.PM23          3   P23 pin I/O mode selection
PM2.PM22          2   P22 pin I/O mode selection
PM2.PM21          1   P21 pin I/O mode selection
PM2.PM20          0   P20 pin I/O mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 pin I/O mode selection
PM4.PM46          6   P46 pin I/O mode selection
PM4.PM45          5   P45 pin I/O mode selection
PM4.PM44          4   P44 pin I/O mode selection
PM4.PM43          3   P43 pin I/O mode selection
PM4.PM42          2   P42 pin I/O mode selection
PM4.PM41          1   P41 pin I/O mode selection
PM4.PM40          0   P40 pin I/O mode selection
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin I/O mode selection
PM5.PM52          2   P52 pin I/O mode selection
PM5.PM51          1   P51 pin I/O mode selection
PM5.PM50          0   P50 pin I/O mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28   Port mode register 8
PM8.PM87          7   P87 pin I/O mode selection
PM8.PM86          6   P86 pin I/O mode selection
PM8.PM85          5   P85 pin I/O mode selection
PM8.PM84          4   P84 pin I/O mode selection
PM8.PM83          3   P83 pin I/O mode selection
PM8.PM82          2   P82 pin I/O mode selection
PM8.PM81          1   P81 pin I/O mode selection
PM8.PM80          0   P80 pin I/O mode selection
PM9              0xFF29   Port mode register 9
PM9.PM93          3   P93 pin I/O mode selection
PM9.PM92          2   P92 pin I/O mode selection
PM9.PM91          1   P91 pin I/O mode selection
PM9.PM90          0   P90 pin I/O mode selection
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2  Watchdog timer count clock selection bit 2
TCL2.TCL21        1  Watchdog timer count clock selection bit 1
TCL2.TCL20        0  Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC50            0xFF48   16-bit timer mode control register 50
TMC50.TOD50       7   Timer output data
TMC50.TOF50       6   Overflow flag set
TMC50.CPT501      5   Capture edge selection bit 1
TMC50.CPT500      4   Capture edge selection bit 0
TMC50.TOC50       3   Timer output data inverse control
TMC50.TCL501      2   16-bit timer 50 count clock selection bit 1
TMC50.TCL500      1   16-bit timer 50 count clock selection bit 0
TMC50.TOE50       0   16-bit timer 50 output control
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
CMPRM0           0xFF4E   Comparator mode register 0
CMPRM0.CMPON0     3   Comparator power supply on/off control
CMPRM0.SELCMP0    2   Clock output control
CMPRM0.OPDR0      1   Open-drain output selection
CMPRM0.CMPOUT0    0   The comparator output is read
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer counter 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   Operation control of 8-bit timer counter 00
TMC00.TCL001      2   Count clock selection of 8-bit timer/event counter 00 bit 1
TMC00.TCL000      1   Count clock selection of 8-bit timer/event counter 00 bit 0
CR01             0xFF54   8-bit compare register 01
TM01             0xFF55   8-bit timer counter 01
RESERVEDFF56     0xFF56   RESERVED
TMC01            0xFF57   8-bit timer mode control register 01
TMC01.TCE01       7   Operation control of 8-bit timer counter 01                
TMC01.TCL011      2   Count clock selection of 8-bit timer/event counter 01 bit 1
TMC01.TCL010      1   Count clock selection of 8-bit timer/event counter 01 bit 0
CR02             0xFF58   8-bit compare register 02
TM02             0xFF59   8-bit timer counter 02
RESERVEDFF5A     0xFF5A   RESERVED
TMC02            0xFF5B   8-bit timer mode control register 02
TMC02.TCE02       7   Operation control of 8-bit timer counter 02
TMC02.TCL021      2   Count clock selection of 8-bit timer 02 bit 1
TMC02.TCL020      1   Count clock selection of 8-bit timer 02 bit 0
TMC02.TOE02       0   Output control of 8-bit timer 02
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7   Transmit operation control
ASIM00.RXE00      6   Receive operation control
ASIM00.PS001      5   Parity bit specification bit 1
ASIM00.PS000      4   Parity bit specification bit 0
ASIM00.CL00       3   Character length specification
ASIM00.SL00       2   Transmit data stop bit length specification
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2   Parity error flag
ASIS00.FE00       1   Framing error flag
ASIS00.OVE00      0   Overrun error flag
CSIM00           0xFF72   Serial operation mode register 00
CSIM00.CSIE00     7   Operation control in 3-wire serial I/O mode
CSIM00.DIR00      2   Start bit specification
CSIM00.CSCK00     1   Clock selection in 3-wire serial I/O mode
BRGC00           0xFF73   Baud rate generator control register 00
BRGC00.TPS003     7   3-bit counter source clock selection bit 3
BRGC00.TPS002     6   3-bit counter source clock selection bit 2
BRGC00.TPS001     5   3-bit counter source clock selection bit 1
BRGC00.TPS000     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input select register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   Control of LCD display
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   LCD drive power supply selection
LCDM0.LCDM02      2   LCD controller/driver display mode selection bit 2
LCDM0.LCDM01      1   LCD controller/driver display mode selection bit 1
LCDM0.LCDM00      0   LCD controller/driver display mode selection bit 0
LPS0             0xFFB1   LCD port selector 0
LPS0.LPS05        5
LPS0.LPS04        4
LPS0.LPS03        3
LPS0.LPS02        2
LPS0.LPS01        1
LPS0.LPS00        0
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Selection of LCD source clock frequency bit 3
LCDC0.LCDC02      2   Selection of LCD source clock frequency bit 2
LCDC0.LCDC01      1   Selection of LCD clock (LCDCL) frequency bit 1
LCDC0.LCDC00      0   Selection of LCD clock (LCDCL) frequency bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF00        6   STIF00 - Interrupt request flag
IF0.SRIF00        5   SRIF00 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.CMPIF0        7   CMPIF0 - Interrupt request flag
IF1.ADIF0         6   ADIF0  - Interrupt request flag
IF1.KRIF00        5   KRIF00 - Interrupt request flag
IF1.TMIF50        4   TMIF50 - Interrupt request flag
IF1.TMIF02        3   TMIF02 - Interrupt request flag
IF1.TMIF01        2   TMIF01 - Interrupt request flag
IF1.TMIF00        1   TMIF00 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt servicing control
MK0.STMK00        6   STMK00 - Interrupt servicing control
MK0.SRMK00        5   SRMK00 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.CMPMK0        7   CMPMK0 - Interrupt servicing control
MK1.ADMK0         6   ADMK0  - Interrupt servicing control
MK1.KRMK00        5   KRMK00 - Interrupt servicing control
MK1.TMMK50        4   TMMK50 - Interrupt servicing control
MK1.TMMK02        3   TMMK02 - Interrupt servicing control
MK1.TMMK01        2   TMMK01 - Interrupt servicing control
MK1.TMMK00        1   TMMK00 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES61        7   INTCMP0 valid edge selection bit 1
INTM1.ES60        6   INTCMP0 valid edge selection bit 0
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
PU1              0xFFF3   Pull-up resistor option register 1
PU1.PU127         7   P2 on-chip pull-up resistor selection bit 7
PU1.PU126         6   P2 on-chip pull-up resistor selection bit 6
PU1.PU125         5   P2 on-chip pull-up resistor selection bit 5
PU1.PU124         4   P2 on-chip pull-up resistor selection bit 4
PU1.PU123         3   P2 on-chip pull-up resistor selection bit 3
PU1.PU122         2   P2 on-chip pull-up resistor selection bit 2
PU1.PU121         1   P2 on-chip pull-up resistor selection bit 1
PU1.PU120         0   P2 on-chip pull-up resistor selection bit 0
PU2              0xFFF4   Pull-up resistor option register 2
PU2.PU292         5   P9 on-chip pull-up resistor selection bit 2
PU2.PU290         4   P9 on-chip pull-up resistor selection bit 0
PU2.PU286         3   P8 on-chip pull-up resistor selection bit 6
PU2.PU284         2   P8 on-chip pull-up resistor selection bit 4
PU2.PU282         1   P8 on-chip pull-up resistor selection bit 2
PU2.PU280         0   P8 on-chip pull-up resistor selection bit 0
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM005      5   Key return signal detection selection bit 5
KRM00.KRM004      4   Key return signal detection selection bit 4
KRM00.KRM000      0   Key return signal detection selection bit 0
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P0 on-chip pull-up resistor selection bit 4
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   Selection of CPU clock (fCPU)
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789417A
; U13952EJ2V0UM00.PDF, U14024EJ2V0DS00.PDF, U15877EE1V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x6000   Internal ROM
area BSS RESERVED   0x6000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA1C   RAM space for LCD data
area BSS RESERVED   0xFA1C:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFB0
area DATA FSR_2     0xFFB0:0xFFB3   Special Function Register
area BSS RESERVED   0xFFB3:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR00_INTCSI00  0x000E   INTSR00/INTCSI00
interrupt INTST00_          0x0010   INTST00
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM00_          0x0016   INTTM00
interrupt INTTM01_          0x0018   INTTM01
interrupt INTTM02_          0x001A   INTTM02
interrupt INTTM50_          0x001C   INTTM50
interrupt INTKR00_          0x001E   INTKR00
interrupt INTAD0_           0x0020   INTAD0
interrupt INTCMP0_          0x0022   INTCMP0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
RESERVEDFF01     0xFF01   RESERVED
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P4               0xFF04   Port 4
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
P9               0xFF09   Port 9
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
SIO00            0xFF10   Transmit shift / Receive buffer register 00
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR50             0xFF16   16-bit compare register 50
TM50             0xFF18   16-bit timer counter 50
TCP50            0xFF1A   16-bit capture register 50
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED 
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin I/O mode selection
PM0.PM02          2   P02 pin I/O mode selection
PM0.PM01          1   P01 pin I/O mode selection
PM0.PM00          0   P00 pin I/O mode selection
RESERVEDFF21     0xFF21   RESERVED
PM2              0xFF22   Port mode register 2
PM2.PM27          7   P27 pin I/O mode selection
PM2.PM26          6   P26 pin I/O mode selection
PM2.PM25          5   P25 pin I/O mode selection
PM2.PM24          4   P24 pin I/O mode selection
PM2.PM23          3   P23 pin I/O mode selection
PM2.PM22          2   P22 pin I/O mode selection
PM2.PM21          1   P21 pin I/O mode selection
PM2.PM20          0   P20 pin I/O mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 pin I/O mode selection
PM4.PM46          6   P46 pin I/O mode selection
PM4.PM45          5   P45 pin I/O mode selection
PM4.PM44          4   P44 pin I/O mode selection
PM4.PM43          3   P43 pin I/O mode selection
PM4.PM42          2   P42 pin I/O mode selection
PM4.PM41          1   P41 pin I/O mode selection
PM4.PM40          0   P40 pin I/O mode selection
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin I/O mode selection
PM5.PM52          2   P52 pin I/O mode selection
PM5.PM51          1   P51 pin I/O mode selection
PM5.PM50          0   P50 pin I/O mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28   Port mode register 8
PM8.PM87          7   P87 pin I/O mode selection
PM8.PM86          6   P86 pin I/O mode selection
PM8.PM85          5   P85 pin I/O mode selection
PM8.PM84          4   P84 pin I/O mode selection
PM8.PM83          3   P83 pin I/O mode selection
PM8.PM82          2   P82 pin I/O mode selection
PM8.PM81          1   P81 pin I/O mode selection
PM8.PM80          0   P80 pin I/O mode selection
PM9              0xFF29   Port mode register 9
PM9.PM93          3   P93 pin I/O mode selection
PM9.PM92          2   P92 pin I/O mode selection
PM9.PM91          1   P91 pin I/O mode selection
PM9.PM90          0   P90 pin I/O mode selection
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2  Watchdog timer count clock selection bit 2
TCL2.TCL21        1  Watchdog timer count clock selection bit 1
TCL2.TCL20        0  Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC50            0xFF48   16-bit timer mode control register 50
TMC50.TOD50       7   Timer output data
TMC50.TOF50       6   Overflow flag set
TMC50.CPT501      5   Capture edge selection bit 1
TMC50.CPT500      4   Capture edge selection bit 0
TMC50.TOC50       3   Timer output data inverse control
TMC50.TCL501      2   16-bit timer 50 count clock selection bit 1
TMC50.TCL500      1   16-bit timer 50 count clock selection bit 0
TMC50.TOE50       0   16-bit timer 50 output control
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
CMPRM0           0xFF4E   Comparator mode register 0
CMPRM0.CMPON0     3   Comparator power supply on/off control
CMPRM0.SELCMP0    2   Clock output control
CMPRM0.OPDR0      1   Open-drain output selection
CMPRM0.CMPOUT0    0   The comparator output is read
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer counter 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   Operation control of 8-bit timer counter 00
TMC00.TCL001      2   Count clock selection of 8-bit timer/event counter 00 bit 1
TMC00.TCL000      1   Count clock selection of 8-bit timer/event counter 00 bit 0
CR01             0xFF54   8-bit compare register 01
TM01             0xFF55   8-bit timer counter 01
RESERVEDFF56     0xFF56   RESERVED
TMC01            0xFF57   8-bit timer mode control register 01
TMC01.TCE01       7   Operation control of 8-bit timer counter 01                
TMC01.TCL011      2   Count clock selection of 8-bit timer/event counter 01 bit 1
TMC01.TCL010      1   Count clock selection of 8-bit timer/event counter 01 bit 0
CR02             0xFF58   8-bit compare register 02
TM02             0xFF59   8-bit timer counter 02
RESERVEDFF5A     0xFF5A   RESERVED
TMC02            0xFF5B   8-bit timer mode control register 02
TMC02.TCE02       7   Operation control of 8-bit timer counter 02
TMC02.TCL021      2   Count clock selection of 8-bit timer 02 bit 1
TMC02.TCL020      1   Count clock selection of 8-bit timer 02 bit 0
TMC02.TOE02       0   Output control of 8-bit timer 02
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7   Transmit operation control
ASIM00.RXE00      6   Receive operation control
ASIM00.PS001      5   Parity bit specification bit 1
ASIM00.PS000      4   Parity bit specification bit 0
ASIM00.CL00       3   Character length specification
ASIM00.SL00       2   Transmit data stop bit length specification
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2   Parity error flag
ASIS00.FE00       1   Framing error flag
ASIS00.OVE00      0   Overrun error flag
CSIM00           0xFF72   Serial operation mode register 00
CSIM00.CSIE00     7   Operation control in 3-wire serial I/O mode
CSIM00.DIR00      2   Start bit specification
CSIM00.CSCK00     1   Clock selection in 3-wire serial I/O mode
BRGC00           0xFF73   Baud rate generator control register 00
BRGC00.TPS003     7   3-bit counter source clock selection bit 3
BRGC00.TPS002     6   3-bit counter source clock selection bit 2
BRGC00.TPS001     5   3-bit counter source clock selection bit 1
BRGC00.TPS000     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input select register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   Control of LCD display
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   LCD drive power supply selection
LCDM0.LCDM02      2   LCD controller/driver display mode selection bit 2
LCDM0.LCDM01      1   LCD controller/driver display mode selection bit 1
LCDM0.LCDM00      0   LCD controller/driver display mode selection bit 0
LPS0             0xFFB1   LCD port selector 0
LPS0.LPS05        5
LPS0.LPS04        4
LPS0.LPS03        3
LPS0.LPS02        2
LPS0.LPS01        1
LPS0.LPS00        0
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Selection of LCD source clock frequency bit 3
LCDC0.LCDC02      2   Selection of LCD source clock frequency bit 2
LCDC0.LCDC01      1   Selection of LCD clock (LCDCL) frequency bit 1
LCDC0.LCDC00      0   Selection of LCD clock (LCDCL) frequency bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF00        6   STIF00 - Interrupt request flag
IF0.SRIF00        5   SRIF00 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.CMPIF0        7   CMPIF0 - Interrupt request flag
IF1.ADIF0         6   ADIF0  - Interrupt request flag
IF1.KRIF00        5   KRIF00 - Interrupt request flag
IF1.TMIF50        4   TMIF50 - Interrupt request flag
IF1.TMIF02        3   TMIF02 - Interrupt request flag
IF1.TMIF01        2   TMIF01 - Interrupt request flag
IF1.TMIF00        1   TMIF00 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt servicing control
MK0.STMK00        6   STMK00 - Interrupt servicing control
MK0.SRMK00        5   SRMK00 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.CMPMK0        7   CMPMK0 - Interrupt servicing control
MK1.ADMK0         6   ADMK0  - Interrupt servicing control
MK1.KRMK00        5   KRMK00 - Interrupt servicing control
MK1.TMMK50        4   TMMK50 - Interrupt servicing control
MK1.TMMK02        3   TMMK02 - Interrupt servicing control
MK1.TMMK01        2   TMMK01 - Interrupt servicing control
MK1.TMMK00        1   TMMK00 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES61        7   INTCMP0 valid edge selection bit 1
INTM1.ES60        6   INTCMP0 valid edge selection bit 0
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
PU1              0xFFF3   Pull-up resistor option register 1
PU1.PU127         7   P2 on-chip pull-up resistor selection bit 7
PU1.PU126         6   P2 on-chip pull-up resistor selection bit 6
PU1.PU125         5   P2 on-chip pull-up resistor selection bit 5
PU1.PU124         4   P2 on-chip pull-up resistor selection bit 4
PU1.PU123         3   P2 on-chip pull-up resistor selection bit 3
PU1.PU122         2   P2 on-chip pull-up resistor selection bit 2
PU1.PU121         1   P2 on-chip pull-up resistor selection bit 1
PU1.PU120         0   P2 on-chip pull-up resistor selection bit 0
PU2              0xFFF4   Pull-up resistor option register 2
PU2.PU292         5   P9 on-chip pull-up resistor selection bit 2
PU2.PU290         4   P9 on-chip pull-up resistor selection bit 0
PU2.PU286         3   P8 on-chip pull-up resistor selection bit 6
PU2.PU284         2   P8 on-chip pull-up resistor selection bit 4
PU2.PU282         1   P8 on-chip pull-up resistor selection bit 2
PU2.PU280         0   P8 on-chip pull-up resistor selection bit 0
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM005      5   Key return signal detection selection bit 5
KRM00.KRM004      4   Key return signal detection selection bit 4
KRM00.KRM000      0   Key return signal detection selection bit 0
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P0 on-chip pull-up resistor selection bit 4
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   Selection of CPU clock (fCPU)
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78F9418A
; U13952EJ2V0UM00.PDF, U15877EE1V0PL00.PDF, U12321EJ1V0PM00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x8000   Flash memory
area BSS RESERVED   0x8000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA1C   RAM space for LCD data
area BSS RESERVED   0xFA1C:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFB0
area DATA FSR_2     0xFFB0:0xFFB3   Special Function Register
area BSS RESERVED   0xFFB3:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR00_INTCSI00  0x000E   INTSR00/INTCSI00
interrupt INTST00_          0x0010   INTST00
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM00_          0x0016   INTTM00
interrupt INTTM01_          0x0018   INTTM01
interrupt INTTM02_          0x001A   INTTM02
interrupt INTTM50_          0x001C   INTTM50
interrupt INTKR00_          0x001E   INTKR00
interrupt INTAD0_           0x0020   INTAD0
interrupt INTCMP0_          0x0022   INTCMP0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
RESERVEDFF01     0xFF01   RESERVED
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
P4               0xFF04   Port 4
P5               0xFF05   Port 5
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
P9               0xFF09   Port 9
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
SIO00            0xFF10   Transmit shift / Receive buffer register 00
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR50             0xFF16   16-bit compare register 50
TM50             0xFF18   16-bit timer counter 50
TCP50            0xFF1A   16-bit capture register 50
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED 
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin I/O mode selection
PM0.PM02          2   P02 pin I/O mode selection
PM0.PM01          1   P01 pin I/O mode selection
PM0.PM00          0   P00 pin I/O mode selection
RESERVEDFF21     0xFF21   RESERVED
PM2              0xFF22   Port mode register 2
PM2.PM27          7   P27 pin I/O mode selection
PM2.PM26          6   P26 pin I/O mode selection
PM2.PM25          5   P25 pin I/O mode selection
PM2.PM24          4   P24 pin I/O mode selection
PM2.PM23          3   P23 pin I/O mode selection
PM2.PM22          2   P22 pin I/O mode selection
PM2.PM21          1   P21 pin I/O mode selection
PM2.PM20          0   P20 pin I/O mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 pin I/O mode selection
PM4.PM46          6   P46 pin I/O mode selection
PM4.PM45          5   P45 pin I/O mode selection
PM4.PM44          4   P44 pin I/O mode selection
PM4.PM43          3   P43 pin I/O mode selection
PM4.PM42          2   P42 pin I/O mode selection
PM4.PM41          1   P41 pin I/O mode selection
PM4.PM40          0   P40 pin I/O mode selection
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin I/O mode selection
PM5.PM52          2   P52 pin I/O mode selection
PM5.PM51          1   P51 pin I/O mode selection
PM5.PM50          0   P50 pin I/O mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28   Port mode register 8
PM8.PM87          7   P87 pin I/O mode selection
PM8.PM86          6   P86 pin I/O mode selection
PM8.PM85          5   P85 pin I/O mode selection
PM8.PM84          4   P84 pin I/O mode selection
PM8.PM83          3   P83 pin I/O mode selection
PM8.PM82          2   P82 pin I/O mode selection
PM8.PM81          1   P81 pin I/O mode selection
PM8.PM80          0   P80 pin I/O mode selection
PM9              0xFF29   Port mode register 9
PM9.PM93          3   P93 pin I/O mode selection
PM9.PM92          2   P92 pin I/O mode selection
PM9.PM91          1   P91 pin I/O mode selection
PM9.PM90          0   P90 pin I/O mode selection
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2  Watchdog timer count clock selection bit 2
TCL2.TCL21        1  Watchdog timer count clock selection bit 1
TCL2.TCL20        0  Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC50            0xFF48   16-bit timer mode control register 50
TMC50.TOD50       7   Timer output data
TMC50.TOF50       6   Overflow flag set
TMC50.CPT501      5   Capture edge selection bit 1
TMC50.CPT500      4   Capture edge selection bit 0
TMC50.TOC50       3   Timer output data inverse control
TMC50.TCL501      2   16-bit timer 50 count clock selection bit 1
TMC50.TCL500      1   16-bit timer 50 count clock selection bit 0
TMC50.TOE50       0   16-bit timer 50 output control
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
CMPRM0           0xFF4E   Comparator mode register 0
CMPRM0.CMPON0     3   Comparator power supply on/off control
CMPRM0.SELCMP0    2   Clock output control
CMPRM0.OPDR0      1   Open-drain output selection
CMPRM0.CMPOUT0    0   The comparator output is read
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer counter 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   Operation control of 8-bit timer counter 00
TMC00.TCL001      2   Count clock selection of 8-bit timer/event counter 00 bit 1
TMC00.TCL000      1   Count clock selection of 8-bit timer/event counter 00 bit 0
CR01             0xFF54   8-bit compare register 01
TM01             0xFF55   8-bit timer counter 01
RESERVEDFF56     0xFF56   RESERVED
TMC01            0xFF57   8-bit timer mode control register 01
TMC01.TCE01       7   Operation control of 8-bit timer counter 01                
TMC01.TCL011      2   Count clock selection of 8-bit timer/event counter 01 bit 1
TMC01.TCL010      1   Count clock selection of 8-bit timer/event counter 01 bit 0
CR02             0xFF58   8-bit compare register 02
TM02             0xFF59   8-bit timer counter 02
RESERVEDFF5A     0xFF5A   RESERVED
TMC02            0xFF5B   8-bit timer mode control register 02
TMC02.TCE02       7   Operation control of 8-bit timer counter 02
TMC02.TCL021      2   Count clock selection of 8-bit timer 02 bit 1
TMC02.TCL020      1   Count clock selection of 8-bit timer 02 bit 0
TMC02.TOE02       0   Output control of 8-bit timer 02
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7   Transmit operation control
ASIM00.RXE00      6   Receive operation control
ASIM00.PS001      5   Parity bit specification bit 1
ASIM00.PS000      4   Parity bit specification bit 0
ASIM00.CL00       3   Character length specification
ASIM00.SL00       2   Transmit data stop bit length specification
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2   Parity error flag
ASIS00.FE00       1   Framing error flag
ASIS00.OVE00      0   Overrun error flag
CSIM00           0xFF72   Serial operation mode register 00
CSIM00.CSIE00     7   Operation control in 3-wire serial I/O mode
CSIM00.DIR00      2   Start bit specification
CSIM00.CSCK00     1   Clock selection in 3-wire serial I/O mode
BRGC00           0xFF73   Baud rate generator control register 00
BRGC00.TPS003     7   3-bit counter source clock selection bit 3
BRGC00.TPS002     6   3-bit counter source clock selection bit 2
BRGC00.TPS001     5   3-bit counter source clock selection bit 1
BRGC00.TPS000     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input select register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   Control of LCD display
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   LCD drive power supply selection
LCDM0.LCDM02      2   LCD controller/driver display mode selection bit 2
LCDM0.LCDM01      1   LCD controller/driver display mode selection bit 1
LCDM0.LCDM00      0   LCD controller/driver display mode selection bit 0
LPS0             0xFFB1   LCD port selector 0
LPS0.LPS05        5
LPS0.LPS04        4
LPS0.LPS03        3
LPS0.LPS02        2
LPS0.LPS01        1
LPS0.LPS00        0
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Selection of LCD source clock frequency bit 3
LCDC0.LCDC02      2   Selection of LCD source clock frequency bit 2
LCDC0.LCDC01      1   Selection of LCD clock (LCDCL) frequency bit 1
LCDC0.LCDC00      0   Selection of LCD clock (LCDCL) frequency bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF   - Interrupt request flag
IF0.STIF00        6   STIF00 - Interrupt request flag
IF0.SRIF00        5   SRIF00 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.CMPIF0        7   CMPIF0 - Interrupt request flag
IF1.ADIF0         6   ADIF0  - Interrupt request flag
IF1.KRIF00        5   KRIF00 - Interrupt request flag
IF1.TMIF50        4   TMIF50 - Interrupt request flag
IF1.TMIF02        3   TMIF02 - Interrupt request flag
IF1.TMIF01        2   TMIF01 - Interrupt request flag
IF1.TMIF00        1   TMIF00 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK   - Interrupt servicing control
MK0.STMK00        6   STMK00 - Interrupt servicing control
MK0.SRMK00        5   SRMK00 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.CMPMK0        7   CMPMK0 - Interrupt servicing control
MK1.ADMK0         6   ADMK0  - Interrupt servicing control
MK1.KRMK00        5   KRMK00 - Interrupt servicing control
MK1.TMMK50        4   TMMK50 - Interrupt servicing control
MK1.TMMK02        3   TMMK02 - Interrupt servicing control
MK1.TMMK01        2   TMMK01 - Interrupt servicing control
MK1.TMMK00        1   TMMK00 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES61        7   INTCMP0 valid edge selection bit 1
INTM1.ES60        6   INTCMP0 valid edge selection bit 0
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
PU1              0xFFF3   Pull-up resistor option register 1
PU1.PU127         7   P2 on-chip pull-up resistor selection bit 7
PU1.PU126         6   P2 on-chip pull-up resistor selection bit 6
PU1.PU125         5   P2 on-chip pull-up resistor selection bit 5
PU1.PU124         4   P2 on-chip pull-up resistor selection bit 4
PU1.PU123         3   P2 on-chip pull-up resistor selection bit 3
PU1.PU122         2   P2 on-chip pull-up resistor selection bit 2
PU1.PU121         1   P2 on-chip pull-up resistor selection bit 1
PU1.PU120         0   P2 on-chip pull-up resistor selection bit 0
PU2              0xFFF4   Pull-up resistor option register 2
PU2.PU292         5   P9 on-chip pull-up resistor selection bit 2
PU2.PU290         4   P9 on-chip pull-up resistor selection bit 0
PU2.PU286         3   P8 on-chip pull-up resistor selection bit 6
PU2.PU284         2   P8 on-chip pull-up resistor selection bit 4
PU2.PU282         1   P8 on-chip pull-up resistor selection bit 2
PU2.PU280         0   P8 on-chip pull-up resistor selection bit 0
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM005      5   Key return signal detection selection bit 5
KRM00.KRM004      4   Key return signal detection selection bit 4
KRM00.KRM000      0   Key return signal detection selection bit 0
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P0 on-chip pull-up resistor selection bit 4
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Control of main system clock oscillator operation
PCC.PCC1          1   Selection of CPU clock (fCPU)
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789425
; U14493EJ1V0DS00.PDF, U15075EJ1V1UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x3000   Internal ROM
area BSS RESERVED   0x3000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA05   LCD display RAM
area BSS RESERVED   0xFA05:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM90_          0x0016   INTTM90
interrupt INTTM50_          0x0018   INTTM50
interrupt INTTM60_          0x001A   INTTM60
interrupt INTAD0_           0x001C   INTAD0
interrupt INTWT_            0x001E   INTWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
P7               0xFF07   Port 7
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR60             0xFF0C   8-bit compare register 60
CR50             0xFF0D   8-bit compare register 50
TM60             0xFF0E   8-bit timer counter 60
TM50             0xFF0F   8-bit timer counter 50
SIO20            0xFF10   Transmit shift / Receive buffer register 20
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
PM7              0xFF27   Port mode register 7
PM7.PM72          2   P72 pin input/output mode selection
PM7.PM71          1   P71 pin input/output mode selection
PM7.PM70          0   P70 pin input/output mode selection
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
PUB7             0xFF37   Pull-up resistor option register B7
PUB7.PUB72        2   P72 on-chip pull-up resistor selection
PUB7.PUB71        1   P71 on-chip pull-up resistor selection
PUB7.PUB70        0   P70 on-chip pull-up resistor selection
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Watchdog timer count clock selection bit 2
WDCS.WDCS1        1   Watchdog timer count clock selection bit 1
WDCS.WDCS0        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH60            0xFF4C   8-bit compare register H60
TMC50            0xFF4D   8-bit timer mode control register 50
TMC60            0xFF4E   8-bit timer mode control register 60
TCA60            0xFF4F   Carrier generator output control register 60
TCA60.RMC60       2   Control of remote control output
TCA60.NRZB60      1   next data to be output to NRZ60
TCA60.NRZ60       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6   SS20 pin selection
CSIM20.DAP20      3   3-wire serial I/O mode data phase selection
CSIM20.DIR20      2   First-bit specification
CSIM20.CSCK20     1   3-wire serial I/O mode clock selection
CSIM20.CKP20      0   3-wire serial I/O mode clock phase selection
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
RESERVEDFFA0     0xFFA0   RESERVED
RESERVEDFFA1     0xFFA1   RESERVED
RESERVEDFFA2     0xFFA2   RESERVED
RESERVEDFFA3     0xFFA3   RESERVED
RESERVEDFFA4     0xFFA4   RESERVED
RESERVEDFFA5     0xFFA5   RESERVED
RESERVEDFFA6     0xFFA6   RESERVED
RESERVEDFFA7     0xFFA7   RESERVED
RESERVEDFFA8     0xFFA8   RESERVED
RESERVEDFFA9     0xFFA9   RESERVED
RESERVEDFFAA     0xFFAA   RESERVED
RESERVEDFFAB     0xFFAB   RESERVED
RESERVEDFFAC     0xFFAC   RESERVED
RESERVEDFFAD     0xFFAD   RESERVED
RESERVEDFFAE     0xFFAE   RESERVED
RESERVEDFFAF     0xFFAF   RESERVED
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fLCD) selection bit 3
LCDC0.LCDC02      2   Internal clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection bit 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Reference voltage (VLC2) level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.ADIF0         4   ADIF0  - Interrupt request flag
IF1.TMIF60        3   TMIF60 - Interrupt request flag
IF1.TMIF50        2   TMIF50 - Interrupt request flag
IF1.TMIF90        1   TMIF90 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20 - Interrupt servicing control
MK0.SRMK20        5   SRMK20 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.ADMK0         4   ADMK0  - Interrupt servicing control
MK1.TMMK60        3   TMMK60 - Interrupt servicing control
MK1.TMMK50        2   TMMK50 - Interrupt servicing control
MK1.TMMK90        1   TMMK90 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 1
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 0
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC0          7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789426
; U14493EJ1V0DS00.PDF, U15075EJ1V1UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA05   LCD display RAM
area BSS RESERVED   0xFA05:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM90_          0x0016   INTTM90
interrupt INTTM50_          0x0018   INTTM50
interrupt INTTM60_          0x001A   INTTM60
interrupt INTAD0_           0x001C   INTAD0
interrupt INTWT_            0x001E   INTWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
P7               0xFF07   Port 7
P8               0xFF08   Port 8 (789426 and 789436 Subseries)
P9               0xFF09   Port 9 (789426 and 789436 Subseries)
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR60             0xFF0C   8-bit compare register 60
CR50             0xFF0D   8-bit compare register 50
TM60             0xFF0E   8-bit timer counter 60
TM50             0xFF0F   8-bit timer counter 50
SIO20            0xFF10   Transmit shift / Receive buffer register 20
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
PM7              0xFF27   Port mode register 7
PM7.PM72          2   P72 pin input/output mode selection
PM7.PM71          1   P71 pin input/output mode selection
PM7.PM70          0   P70 pin input/output mode selection
PM8              0xFF28   Port mode register 8 (789426 and 789436 Subseries)
PM8.PM81          1   P81 pin input/output mode selection
PM8.PM80          0   P80 pin input/output mode selection
PM9              0xFF29   Port mode register 9 (789426 and 789436 Subseries)
PM9.PM97          6   P97 pin input/output mode selection
PM9.PM96          6   P96 pin input/output mode selection
PM9.PM95          5   P95 pin input/output mode selection
PM9.PM94          4   P94 pin input/output mode selection
PM9.PM93          3   P93 pin input/output mode selection
PM9.PM92          2   P92 pin input/output mode selection
PM9.PM91          1   P91 pin input/output mode selection
PM9.PM90          0   P90 pin input/output mode selection
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
PUB7             0xFF37   Pull-up resistor option register B7
PUB7.PUB72        2   P72 on-chip pull-up resistor selection
PUB7.PUB71        1   P71 on-chip pull-up resistor selection
PUB7.PUB70        0   P70 on-chip pull-up resistor selection
PUB8             0xFF38   Pull-up resistor option register B8 (789426 and 789436 Subseries)
PUB8.PUB81        1   P81 on-chip pull-up resistor selection
PUB8.PUB80        0   P80 on-chip pull-up resistor selection
PUB9             0xFF39   Pull-up resistor option register B9 (789426 and 789436 Subseries)
PUB9.PUB97        7   P97 on-chip pull-up resistor selection
PUB9.PUB96        6   P96 on-chip pull-up resistor selection
PUB9.PUB95        5   P95 on-chip pull-up resistor selection
PUB9.PUB94        4   P94 on-chip pull-up resistor selection
PUB9.PUB93        3   P93 on-chip pull-up resistor selection
PUB9.PUB92        2   P92 on-chip pull-up resistor selection
PUB9.PUB91        1   P91 on-chip pull-up resistor selection
PUB9.PUB90        0   P90 on-chip pull-up resistor selection
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Watchdog timer count clock selection bit 2
WDCS.WDCS1        1   Watchdog timer count clock selection bit 1
WDCS.WDCS0        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH60            0xFF4C   8-bit compare register H60
TMC50            0xFF4D   8-bit timer mode control register 50
TMC60            0xFF4E   8-bit timer mode control register 60
TCA60            0xFF4F   Carrier generator output control register 60
TCA60.RMC60       2   Control of remote control output
TCA60.NRZB60      1   next data to be output to NRZ60
TCA60.NRZ60       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6   SS20 pin selection
CSIM20.DAP20      3   3-wire serial I/O mode data phase selection
CSIM20.DIR20      2   First-bit specification
CSIM20.CSCK20     1   3-wire serial I/O mode clock selection
CSIM20.CKP20      0   3-wire serial I/O mode clock phase selection
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
RESERVEDFFA0     0xFFA0   RESERVED
RESERVEDFFA1     0xFFA1   RESERVED
RESERVEDFFA2     0xFFA2   RESERVED
RESERVEDFFA3     0xFFA3   RESERVED
RESERVEDFFA4     0xFFA4   RESERVED
RESERVEDFFA5     0xFFA5   RESERVED
RESERVEDFFA6     0xFFA6   RESERVED
RESERVEDFFA7     0xFFA7   RESERVED
RESERVEDFFA8     0xFFA8   RESERVED
RESERVEDFFA9     0xFFA9   RESERVED
RESERVEDFFAA     0xFFAA   RESERVED
RESERVEDFFAB     0xFFAB   RESERVED
RESERVEDFFAC     0xFFAC   RESERVED
RESERVEDFFAD     0xFFAD   RESERVED
RESERVEDFFAE     0xFFAE   RESERVED
RESERVEDFFAF     0xFFAF   RESERVED
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fLCD) selection bit 3
LCDC0.LCDC02      2   Internal clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection bit 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Reference voltage (VLC2) level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.ADIF0         4   ADIF0  - Interrupt request flag
IF1.TMIF60        3   TMIF60 - Interrupt request flag
IF1.TMIF50        2   TMIF50 - Interrupt request flag
IF1.TMIF90        1   TMIF90 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20 - Interrupt servicing control
MK0.SRMK20        5   SRMK20 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.ADMK0         4   ADMK0  - Interrupt servicing control
MK1.TMMK60        3   TMMK60 - Interrupt servicing control
MK1.TMMK50        2   TMMK50 - Interrupt servicing control
MK1.TMMK90        1   TMMK90 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 1
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 0
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC0          7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789435
; U14493EJ1V0DS00.PDF, U15075EJ1V1UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x3000   Internal ROM
area BSS RESERVED   0x3000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA05   LCD display RAM
area BSS RESERVED   0xFA05:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM90_          0x0016   INTTM90
interrupt INTTM50_          0x0018   INTTM50
interrupt INTTM60_          0x001A   INTTM60
interrupt INTAD0_           0x001C   INTAD0
interrupt INTWT_            0x001E   INTWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
P7               0xFF07   Port 7
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR60             0xFF0C   8-bit compare register 60
CR50             0xFF0D   8-bit compare register 50
TM60             0xFF0E   8-bit timer counter 60
TM50             0xFF0F   8-bit timer counter 50
SIO20            0xFF10   Transmit shift / Receive buffer register 20
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
PM7              0xFF27   Port mode register 7
PM7.PM72          2   P72 pin input/output mode selection
PM7.PM71          1   P71 pin input/output mode selection
PM7.PM70          0   P70 pin input/output mode selection
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
PUB7             0xFF37   Pull-up resistor option register B7
PUB7.PUB72        2   P72 on-chip pull-up resistor selection
PUB7.PUB71        1   P71 on-chip pull-up resistor selection
PUB7.PUB70        0   P70 on-chip pull-up resistor selection
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Watchdog timer count clock selection bit 2
WDCS.WDCS1        1   Watchdog timer count clock selection bit 1
WDCS.WDCS0        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH60            0xFF4C   8-bit compare register H60
TMC50            0xFF4D   8-bit timer mode control register 50
TMC60            0xFF4E   8-bit timer mode control register 60
TCA60            0xFF4F   Carrier generator output control register 60
TCA60.RMC60       2   Control of remote control output
TCA60.NRZB60      1   next data to be output to NRZ60
TCA60.NRZ60       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6   SS20 pin selection
CSIM20.DAP20      3   3-wire serial I/O mode data phase selection
CSIM20.DIR20      2   First-bit specification
CSIM20.CSCK20     1   3-wire serial I/O mode clock selection
CSIM20.CKP20      0   3-wire serial I/O mode clock phase selection
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
RESERVEDFFA0     0xFFA0   RESERVED
RESERVEDFFA1     0xFFA1   RESERVED
RESERVEDFFA2     0xFFA2   RESERVED
RESERVEDFFA3     0xFFA3   RESERVED
RESERVEDFFA4     0xFFA4   RESERVED
RESERVEDFFA5     0xFFA5   RESERVED
RESERVEDFFA6     0xFFA6   RESERVED
RESERVEDFFA7     0xFFA7   RESERVED
RESERVEDFFA8     0xFFA8   RESERVED
RESERVEDFFA9     0xFFA9   RESERVED
RESERVEDFFAA     0xFFAA   RESERVED
RESERVEDFFAB     0xFFAB   RESERVED
RESERVEDFFAC     0xFFAC   RESERVED
RESERVEDFFAD     0xFFAD   RESERVED
RESERVEDFFAE     0xFFAE   RESERVED
RESERVEDFFAF     0xFFAF   RESERVED
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fLCD) selection bit 3
LCDC0.LCDC02      2   Internal clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection bit 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Reference voltage (VLC2) level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.ADIF0         4   ADIF0  - Interrupt request flag
IF1.TMIF60        3   TMIF60 - Interrupt request flag
IF1.TMIF50        2   TMIF50 - Interrupt request flag
IF1.TMIF90        1   TMIF90 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20 - Interrupt servicing control
MK0.SRMK20        5   SRMK20 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.ADMK0         4   ADMK0  - Interrupt servicing control
MK1.TMMK60        3   TMMK60 - Interrupt servicing control
MK1.TMMK50        2   TMMK50 - Interrupt servicing control
MK1.TMMK90        1   TMMK90 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 1
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 0
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC0          7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789436
; U14493EJ1V0DS00.PDF, U15075EJ1V1UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA05   LCD display RAM
area BSS RESERVED   0xFA05:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM90_          0x0016   INTTM90
interrupt INTTM50_          0x0018   INTTM50
interrupt INTTM60_          0x001A   INTTM60
interrupt INTAD0_           0x001C   INTAD0
interrupt INTWT_            0x001E   INTWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
P7               0xFF07   Port 7
P8               0xFF08   Port 8 (789426 and 789436 Subseries)
P9               0xFF09   Port 9 (789426 and 789436 Subseries)
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR60             0xFF0C   8-bit compare register 60
CR50             0xFF0D   8-bit compare register 50
TM60             0xFF0E   8-bit timer counter 60
TM50             0xFF0F   8-bit timer counter 50
SIO20            0xFF10   Transmit shift / Receive buffer register 20
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
PM7              0xFF27   Port mode register 7
PM7.PM72          2   P72 pin input/output mode selection
PM7.PM71          1   P71 pin input/output mode selection
PM7.PM70          0   P70 pin input/output mode selection
PM8              0xFF28   Port mode register 8 (789426 and 789436 Subseries)
PM8.PM81          1   P81 pin input/output mode selection
PM8.PM80          0   P80 pin input/output mode selection
PM9              0xFF29   Port mode register 9 (789426 and 789436 Subseries)
PM9.PM97          6   P97 pin input/output mode selection
PM9.PM96          6   P96 pin input/output mode selection
PM9.PM95          5   P95 pin input/output mode selection
PM9.PM94          4   P94 pin input/output mode selection
PM9.PM93          3   P93 pin input/output mode selection
PM9.PM92          2   P92 pin input/output mode selection
PM9.PM91          1   P91 pin input/output mode selection
PM9.PM90          0   P90 pin input/output mode selection
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
PUB7             0xFF37   Pull-up resistor option register B7
PUB7.PUB72        2   P72 on-chip pull-up resistor selection
PUB7.PUB71        1   P71 on-chip pull-up resistor selection
PUB7.PUB70        0   P70 on-chip pull-up resistor selection
PUB8             0xFF38   Pull-up resistor option register B8 (789426 and 789436 Subseries)
PUB8.PUB81        1   P81 on-chip pull-up resistor selection
PUB8.PUB80        0   P80 on-chip pull-up resistor selection
PUB9             0xFF39   Pull-up resistor option register B9 (789426 and 789436 Subseries)
PUB9.PUB97        7   P97 on-chip pull-up resistor selection
PUB9.PUB96        6   P96 on-chip pull-up resistor selection
PUB9.PUB95        5   P95 on-chip pull-up resistor selection
PUB9.PUB94        4   P94 on-chip pull-up resistor selection
PUB9.PUB93        3   P93 on-chip pull-up resistor selection
PUB9.PUB92        2   P92 on-chip pull-up resistor selection
PUB9.PUB91        1   P91 on-chip pull-up resistor selection
PUB9.PUB90        0   P90 on-chip pull-up resistor selection
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Watchdog timer count clock selection bit 2
WDCS.WDCS1        1   Watchdog timer count clock selection bit 1
WDCS.WDCS0        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH60            0xFF4C   8-bit compare register H60
TMC50            0xFF4D   8-bit timer mode control register 50
TMC60            0xFF4E   8-bit timer mode control register 60
TCA60            0xFF4F   Carrier generator output control register 60
TCA60.RMC60       2   Control of remote control output
TCA60.NRZB60      1   next data to be output to NRZ60
TCA60.NRZ60       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6   SS20 pin selection
CSIM20.DAP20      3   3-wire serial I/O mode data phase selection
CSIM20.DIR20      2   First-bit specification
CSIM20.CSCK20     1   3-wire serial I/O mode clock selection
CSIM20.CKP20      0   3-wire serial I/O mode clock phase selection
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
RESERVEDFFA0     0xFFA0   RESERVED
RESERVEDFFA1     0xFFA1   RESERVED
RESERVEDFFA2     0xFFA2   RESERVED
RESERVEDFFA3     0xFFA3   RESERVED
RESERVEDFFA4     0xFFA4   RESERVED
RESERVEDFFA5     0xFFA5   RESERVED
RESERVEDFFA6     0xFFA6   RESERVED
RESERVEDFFA7     0xFFA7   RESERVED
RESERVEDFFA8     0xFFA8   RESERVED
RESERVEDFFA9     0xFFA9   RESERVED
RESERVEDFFAA     0xFFAA   RESERVED
RESERVEDFFAB     0xFFAB   RESERVED
RESERVEDFFAC     0xFFAC   RESERVED
RESERVEDFFAD     0xFFAD   RESERVED
RESERVEDFFAE     0xFFAE   RESERVED
RESERVEDFFAF     0xFFAF   RESERVED
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fLCD) selection bit 3
LCDC0.LCDC02      2   Internal clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection bit 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Reference voltage (VLC2) level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.ADIF0         4   ADIF0  - Interrupt request flag
IF1.TMIF60        3   TMIF60 - Interrupt request flag
IF1.TMIF50        2   TMIF50 - Interrupt request flag
IF1.TMIF90        1   TMIF90 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20 - Interrupt servicing control
MK0.SRMK20        5   SRMK20 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.ADMK0         4   ADMK0  - Interrupt servicing control
MK1.TMMK60        3   TMMK60 - Interrupt servicing control
MK1.TMMK50        2   TMMK50 - Interrupt servicing control
MK1.TMMK90        1   TMMK90 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 1
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 0
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC0          7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78F9436
; U15379EJ1V0DS00.PDF, U15075EJ1V1UM00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x4000   Flash memory
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA05   LCD display RAM
area BSS RESERVED   0xFA05:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM90_          0x0016   INTTM90
interrupt INTTM50_          0x0018   INTTM50
interrupt INTTM60_          0x001A   INTTM60
interrupt INTAD0_           0x001C   INTAD0
interrupt INTWT_            0x001E   INTWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
P7               0xFF07   Port 7
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR60             0xFF0C   8-bit compare register 60
CR50             0xFF0D   8-bit compare register 50
TM60             0xFF0E   8-bit timer counter 60
TM50             0xFF0F   8-bit timer counter 50
SIO20            0xFF10   Transmit shift / Receive buffer register 20
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
PM7              0xFF27   Port mode register 7
PM7.PM72          2   P72 pin input/output mode selection
PM7.PM71          1   P71 pin input/output mode selection
PM7.PM70          0   P70 pin input/output mode selection
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
PUB7             0xFF37   Pull-up resistor option register B7
PUB7.PUB72        2   P72 on-chip pull-up resistor selection
PUB7.PUB71        1   P71 on-chip pull-up resistor selection
PUB7.PUB70        0   P70 on-chip pull-up resistor selection
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Watchdog timer count clock selection bit 2
WDCS.WDCS1        1   Watchdog timer count clock selection bit 1
WDCS.WDCS0        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH60            0xFF4C   8-bit compare register H60
TMC50            0xFF4D   8-bit timer mode control register 50
TMC60            0xFF4E   8-bit timer mode control register 60
TCA60            0xFF4F   Carrier generator output control register 60
TCA60.RMC60       2   Control of remote control output
TCA60.NRZB60      1   next data to be output to NRZ60
TCA60.NRZ60       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6   SS20 pin selection
CSIM20.DAP20      3   3-wire serial I/O mode data phase selection
CSIM20.DIR20      2   First-bit specification
CSIM20.CSCK20     1   3-wire serial I/O mode clock selection
CSIM20.CKP20      0   3-wire serial I/O mode clock phase selection
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
RESERVEDFFA0     0xFFA0   RESERVED
RESERVEDFFA1     0xFFA1   RESERVED
RESERVEDFFA2     0xFFA2   RESERVED
RESERVEDFFA3     0xFFA3   RESERVED
RESERVEDFFA4     0xFFA4   RESERVED
RESERVEDFFA5     0xFFA5   RESERVED
RESERVEDFFA6     0xFFA6   RESERVED
RESERVEDFFA7     0xFFA7   RESERVED
RESERVEDFFA8     0xFFA8   RESERVED
RESERVEDFFA9     0xFFA9   RESERVED
RESERVEDFFAA     0xFFAA   RESERVED
RESERVEDFFAB     0xFFAB   RESERVED
RESERVEDFFAC     0xFFAC   RESERVED
RESERVEDFFAD     0xFFAD   RESERVED
RESERVEDFFAE     0xFFAE   RESERVED
RESERVEDFFAF     0xFFAF   RESERVED
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fLCD) selection bit 3
LCDC0.LCDC02      2   Internal clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection bit 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Reference voltage (VLC2) level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.ADIF0         4   ADIF0  - Interrupt request flag
IF1.TMIF60        3   TMIF60 - Interrupt request flag
IF1.TMIF50        2   TMIF50 - Interrupt request flag
IF1.TMIF90        1   TMIF90 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20 - Interrupt servicing control
MK0.SRMK20        5   SRMK20 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.ADMK0         4   ADMK0  - Interrupt servicing control
MK1.TMMK60        3   TMMK60 - Interrupt servicing control
MK1.TMMK50        2   TMMK50 - Interrupt servicing control
MK1.TMMK90        1   TMMK90 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 1
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 0
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC0          7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789445
; U14493EJ1V0DS00.PDF, U15075EJ1V1UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x3000   Internal ROM
area BSS RESERVED   0x3000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA0F   LCD display RAM
area BSS RESERVED   0xFA0F:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM90_          0x0016   INTTM90
interrupt INTTM50_          0x0018   INTTM50
interrupt INTTM60_          0x001A   INTTM60
interrupt INTAD0_           0x001C   INTAD0
interrupt INTWT_            0x001E   INTWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
P7               0xFF07   Port 7
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR60             0xFF0C   8-bit compare register 60
CR50             0xFF0D   8-bit compare register 50
TM60             0xFF0E   8-bit timer counter 60
TM50             0xFF0F   8-bit timer counter 50
SIO20            0xFF10   Transmit shift / Receive buffer register 20
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
PM7              0xFF27   Port mode register 7
PM7.PM72          2   P72 pin input/output mode selection
PM7.PM71          1   P71 pin input/output mode selection
PM7.PM70          0   P70 pin input/output mode selection
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
PUB7             0xFF37   Pull-up resistor option register B7
PUB7.PUB72        2   P72 on-chip pull-up resistor selection
PUB7.PUB71        1   P71 on-chip pull-up resistor selection
PUB7.PUB70        0   P70 on-chip pull-up resistor selection
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Watchdog timer count clock selection bit 2
WDCS.WDCS1        1   Watchdog timer count clock selection bit 1
WDCS.WDCS0        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH60            0xFF4C   8-bit compare register H60
TMC50            0xFF4D   8-bit timer mode control register 50
TMC60            0xFF4E   8-bit timer mode control register 60
TCA60            0xFF4F   Carrier generator output control register 60
TCA60.RMC60       2   Control of remote control output
TCA60.NRZB60      1   next data to be output to NRZ60
TCA60.NRZ60       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6   SS20 pin selection
CSIM20.DAP20      3   3-wire serial I/O mode data phase selection
CSIM20.DIR20      2   First-bit specification
CSIM20.CSCK20     1   3-wire serial I/O mode clock selection
CSIM20.CKP20      0   3-wire serial I/O mode clock phase selection
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
RESERVEDFFA0     0xFFA0   RESERVED
RESERVEDFFA1     0xFFA1   RESERVED
RESERVEDFFA2     0xFFA2   RESERVED
RESERVEDFFA3     0xFFA3   RESERVED
RESERVEDFFA4     0xFFA4   RESERVED
RESERVEDFFA5     0xFFA5   RESERVED
RESERVEDFFA6     0xFFA6   RESERVED
RESERVEDFFA7     0xFFA7   RESERVED
RESERVEDFFA8     0xFFA8   RESERVED
RESERVEDFFA9     0xFFA9   RESERVED
RESERVEDFFAA     0xFFAA   RESERVED
RESERVEDFFAB     0xFFAB   RESERVED
RESERVEDFFAC     0xFFAC   RESERVED
RESERVEDFFAD     0xFFAD   RESERVED
RESERVEDFFAE     0xFFAE   RESERVED
RESERVEDFFAF     0xFFAF   RESERVED
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fLCD) selection bit 3
LCDC0.LCDC02      2   Internal clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection bit 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Reference voltage (VLC2) level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.ADIF0         4   ADIF0  - Interrupt request flag
IF1.TMIF60        3   TMIF60 - Interrupt request flag
IF1.TMIF50        2   TMIF50 - Interrupt request flag
IF1.TMIF90        1   TMIF90 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20 - Interrupt servicing control
MK0.SRMK20        5   SRMK20 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.ADMK0         4   ADMK0  - Interrupt servicing control
MK1.TMMK60        3   TMMK60 - Interrupt servicing control
MK1.TMMK50        2   TMMK50 - Interrupt servicing control
MK1.TMMK90        1   TMMK90 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 1
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 0
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC0          7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789446
; U14493EJ1V0DS00.PDF, U15075EJ1V1UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA0F   LCD display RAM
area BSS RESERVED   0xFA0F:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM90_          0x0016   INTTM90
interrupt INTTM50_          0x0018   INTTM50
interrupt INTTM60_          0x001A   INTTM60
interrupt INTAD0_           0x001C   INTAD0
interrupt INTWT_            0x001E   INTWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
P7               0xFF07   Port 7
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR60             0xFF0C   8-bit compare register 60
CR50             0xFF0D   8-bit compare register 50
TM60             0xFF0E   8-bit timer counter 60
TM50             0xFF0F   8-bit timer counter 50
SIO20            0xFF10   Transmit shift / Receive buffer register 20
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
PM7              0xFF27   Port mode register 7
PM7.PM72          2   P72 pin input/output mode selection
PM7.PM71          1   P71 pin input/output mode selection
PM7.PM70          0   P70 pin input/output mode selection
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
PUB7             0xFF37   Pull-up resistor option register B7
PUB7.PUB72        2   P72 on-chip pull-up resistor selection
PUB7.PUB71        1   P71 on-chip pull-up resistor selection
PUB7.PUB70        0   P70 on-chip pull-up resistor selection
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Watchdog timer count clock selection bit 2
WDCS.WDCS1        1   Watchdog timer count clock selection bit 1
WDCS.WDCS0        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH60            0xFF4C   8-bit compare register H60
TMC50            0xFF4D   8-bit timer mode control register 50
TMC60            0xFF4E   8-bit timer mode control register 60
TCA60            0xFF4F   Carrier generator output control register 60
TCA60.RMC60       2   Control of remote control output
TCA60.NRZB60      1   next data to be output to NRZ60
TCA60.NRZ60       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6   SS20 pin selection
CSIM20.DAP20      3   3-wire serial I/O mode data phase selection
CSIM20.DIR20      2   First-bit specification
CSIM20.CSCK20     1   3-wire serial I/O mode clock selection
CSIM20.CKP20      0   3-wire serial I/O mode clock phase selection
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
RESERVEDFFA0     0xFFA0   RESERVED
RESERVEDFFA1     0xFFA1   RESERVED
RESERVEDFFA2     0xFFA2   RESERVED
RESERVEDFFA3     0xFFA3   RESERVED
RESERVEDFFA4     0xFFA4   RESERVED
RESERVEDFFA5     0xFFA5   RESERVED
RESERVEDFFA6     0xFFA6   RESERVED
RESERVEDFFA7     0xFFA7   RESERVED
RESERVEDFFA8     0xFFA8   RESERVED
RESERVEDFFA9     0xFFA9   RESERVED
RESERVEDFFAA     0xFFAA   RESERVED
RESERVEDFFAB     0xFFAB   RESERVED
RESERVEDFFAC     0xFFAC   RESERVED
RESERVEDFFAD     0xFFAD   RESERVED
RESERVEDFFAE     0xFFAE   RESERVED
RESERVEDFFAF     0xFFAF   RESERVED
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fLCD) selection bit 3
LCDC0.LCDC02      2   Internal clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection bit 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Reference voltage (VLC2) level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.ADIF0         4   ADIF0  - Interrupt request flag
IF1.TMIF60        3   TMIF60 - Interrupt request flag
IF1.TMIF50        2   TMIF50 - Interrupt request flag
IF1.TMIF90        1   TMIF90 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20 - Interrupt servicing control
MK0.SRMK20        5   SRMK20 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.ADMK0         4   ADMK0  - Interrupt servicing control
MK1.TMMK60        3   TMMK60 - Interrupt servicing control
MK1.TMMK50        2   TMMK50 - Interrupt servicing control
MK1.TMMK90        1   TMMK90 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 1
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 0
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC0          7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789455
; U14493EJ1V0DS00.PDF, U15075EJ1V1UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x3000   Internal ROM
area BSS RESERVED   0x3000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA0F   LCD display RAM
area BSS RESERVED   0xFA0F:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM90_          0x0016   INTTM90
interrupt INTTM50_          0x0018   INTTM50
interrupt INTTM60_          0x001A   INTTM60
interrupt INTAD0_           0x001C   INTAD0
interrupt INTWT_            0x001E   INTWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
P7               0xFF07   Port 7
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR60             0xFF0C   8-bit compare register 60
CR50             0xFF0D   8-bit compare register 50
TM60             0xFF0E   8-bit timer counter 60
TM50             0xFF0F   8-bit timer counter 50
SIO20            0xFF10   Transmit shift / Receive buffer register 20
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
PM7              0xFF27   Port mode register 7
PM7.PM72          2   P72 pin input/output mode selection
PM7.PM71          1   P71 pin input/output mode selection
PM7.PM70          0   P70 pin input/output mode selection
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
PUB7             0xFF37   Pull-up resistor option register B7
PUB7.PUB72        2   P72 on-chip pull-up resistor selection
PUB7.PUB71        1   P71 on-chip pull-up resistor selection
PUB7.PUB70        0   P70 on-chip pull-up resistor selection
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Watchdog timer count clock selection bit 2
WDCS.WDCS1        1   Watchdog timer count clock selection bit 1
WDCS.WDCS0        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH60            0xFF4C   8-bit compare register H60
TMC50            0xFF4D   8-bit timer mode control register 50
TMC60            0xFF4E   8-bit timer mode control register 60
TCA60            0xFF4F   Carrier generator output control register 60
TCA60.RMC60       2   Control of remote control output
TCA60.NRZB60      1   next data to be output to NRZ60
TCA60.NRZ60       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6   SS20 pin selection
CSIM20.DAP20      3   3-wire serial I/O mode data phase selection
CSIM20.DIR20      2   First-bit specification
CSIM20.CSCK20     1   3-wire serial I/O mode clock selection
CSIM20.CKP20      0   3-wire serial I/O mode clock phase selection
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
RESERVEDFFA0     0xFFA0   RESERVED
RESERVEDFFA1     0xFFA1   RESERVED
RESERVEDFFA2     0xFFA2   RESERVED
RESERVEDFFA3     0xFFA3   RESERVED
RESERVEDFFA4     0xFFA4   RESERVED
RESERVEDFFA5     0xFFA5   RESERVED
RESERVEDFFA6     0xFFA6   RESERVED
RESERVEDFFA7     0xFFA7   RESERVED
RESERVEDFFA8     0xFFA8   RESERVED
RESERVEDFFA9     0xFFA9   RESERVED
RESERVEDFFAA     0xFFAA   RESERVED
RESERVEDFFAB     0xFFAB   RESERVED
RESERVEDFFAC     0xFFAC   RESERVED
RESERVEDFFAD     0xFFAD   RESERVED
RESERVEDFFAE     0xFFAE   RESERVED
RESERVEDFFAF     0xFFAF   RESERVED
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fLCD) selection bit 3
LCDC0.LCDC02      2   Internal clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection bit 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Reference voltage (VLC2) level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.ADIF0         4   ADIF0  - Interrupt request flag
IF1.TMIF60        3   TMIF60 - Interrupt request flag
IF1.TMIF50        2   TMIF50 - Interrupt request flag
IF1.TMIF90        1   TMIF90 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20 - Interrupt servicing control
MK0.SRMK20        5   SRMK20 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.ADMK0         4   ADMK0  - Interrupt servicing control
MK1.TMMK60        3   TMMK60 - Interrupt servicing control
MK1.TMMK50        2   TMMK50 - Interrupt servicing control
MK1.TMMK90        1   TMMK90 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 1
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 0
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC0          7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789456
; U14493EJ1V0DS00.PDF, U15075EJ1V1UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA0F   LCD display RAM
area BSS RESERVED   0xFA0F:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM90_          0x0016   INTTM90
interrupt INTTM50_          0x0018   INTTM50
interrupt INTTM60_          0x001A   INTTM60
interrupt INTAD0_           0x001C   INTAD0
interrupt INTWT_            0x001E   INTWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
P7               0xFF07   Port 7
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR60             0xFF0C   8-bit compare register 60
CR50             0xFF0D   8-bit compare register 50
TM60             0xFF0E   8-bit timer counter 60
TM50             0xFF0F   8-bit timer counter 50
SIO20            0xFF10   Transmit shift / Receive buffer register 20
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
PM7              0xFF27   Port mode register 7
PM7.PM72          2   P72 pin input/output mode selection
PM7.PM71          1   P71 pin input/output mode selection
PM7.PM70          0   P70 pin input/output mode selection
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
PUB7             0xFF37   Pull-up resistor option register B7
PUB7.PUB72        2   P72 on-chip pull-up resistor selection
PUB7.PUB71        1   P71 on-chip pull-up resistor selection
PUB7.PUB70        0   P70 on-chip pull-up resistor selection
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Watchdog timer count clock selection bit 2
WDCS.WDCS1        1   Watchdog timer count clock selection bit 1
WDCS.WDCS0        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH60            0xFF4C   8-bit compare register H60
TMC50            0xFF4D   8-bit timer mode control register 50
TMC60            0xFF4E   8-bit timer mode control register 60
TCA60            0xFF4F   Carrier generator output control register 60
TCA60.RMC60       2   Control of remote control output
TCA60.NRZB60      1   next data to be output to NRZ60
TCA60.NRZ60       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6   SS20 pin selection
CSIM20.DAP20      3   3-wire serial I/O mode data phase selection
CSIM20.DIR20      2   First-bit specification
CSIM20.CSCK20     1   3-wire serial I/O mode clock selection
CSIM20.CKP20      0   3-wire serial I/O mode clock phase selection
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
RESERVEDFFA0     0xFFA0   RESERVED
RESERVEDFFA1     0xFFA1   RESERVED
RESERVEDFFA2     0xFFA2   RESERVED
RESERVEDFFA3     0xFFA3   RESERVED
RESERVEDFFA4     0xFFA4   RESERVED
RESERVEDFFA5     0xFFA5   RESERVED
RESERVEDFFA6     0xFFA6   RESERVED
RESERVEDFFA7     0xFFA7   RESERVED
RESERVEDFFA8     0xFFA8   RESERVED
RESERVEDFFA9     0xFFA9   RESERVED
RESERVEDFFAA     0xFFAA   RESERVED
RESERVEDFFAB     0xFFAB   RESERVED
RESERVEDFFAC     0xFFAC   RESERVED
RESERVEDFFAD     0xFFAD   RESERVED
RESERVEDFFAE     0xFFAE   RESERVED
RESERVEDFFAF     0xFFAF   RESERVED
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fLCD) selection bit 3
LCDC0.LCDC02      2   Internal clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection bit 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Reference voltage (VLC2) level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.ADIF0         4   ADIF0  - Interrupt request flag
IF1.TMIF60        3   TMIF60 - Interrupt request flag
IF1.TMIF50        2   TMIF50 - Interrupt request flag
IF1.TMIF90        1   TMIF90 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20 - Interrupt servicing control
MK0.SRMK20        5   SRMK20 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.ADMK0         4   ADMK0  - Interrupt servicing control
MK1.TMMK60        3   TMMK60 - Interrupt servicing control
MK1.TMMK50        2   TMMK50 - Interrupt servicing control
MK1.TMMK90        1   TMMK90 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 1
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 0
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC0          7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78F9456
; U15379EJ1V0DS00.PDF, U15075EJ1V1UM00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x4000   Flash memory
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA0E   LCD display RAM
area BSS RESERVED   0xFA0E:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x000E   INTSR20/INTCSI20
interrupt INTST20_          0x0012   INTST20
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM90_          0x0016   INTTM90
interrupt INTTM50_          0x0018   INTTM50
interrupt INTTM60_          0x001A   INTTM60
interrupt INTAD0_           0x001C   INTAD0
interrupt INTWT_            0x001E   INTWT
interrupt INTKR00_          0x0020   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
P7               0xFF07   Port 7
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
CR60             0xFF0C   8-bit compare register 60
CR50             0xFF0D   8-bit compare register 50
TM60             0xFF0E   8-bit timer counter 60
TM50             0xFF0F   8-bit timer counter 50
SIO20            0xFF10   Transmit shift / Receive buffer register 20
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
ADCR0            0xFF14   A/D conversion result register 0
CR90             0xFF16   16-bit compare register 90
TM90             0xFF18   16-bit timer counter 90
TCP90            0xFF1A   16-bit capture register 90
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF24     0xFF24   RESERVED
PM5              0xFF25   Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
PM7              0xFF27   Port mode register 7
PM7.PM72          2   P72 pin input/output mode selection
PM7.PM71          1   P71 pin input/output mode selection
PM7.PM70          0   P70 pin input/output mode selection
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB26        6   P26 on-chip pull-up resistor selection
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33   Pull-up resistor option register B3
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
PUB7             0xFF37   Pull-up resistor option register B7
PUB7.PUB72        2   P72 on-chip pull-up resistor selection
PUB7.PUB71        1   P71 on-chip pull-up resistor selection
PUB7.PUB70        0   P70 on-chip pull-up resistor selection
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Watchdog timer count clock selection bit 2
WDCS.WDCS1        1   Watchdog timer count clock selection bit 1
WDCS.WDCS0        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC90            0xFF48   16-bit timer mode control register 90
TMC90.TOD90       7   Timer output data
TMC90.TOF90       6   Overflow flag control
TMC90.CPT901      5   Capture edge selection bit 1
TMC90.CPT900      4   Capture edge selection bit 0
TMC90.TOC90       3   Timer output data inversion control
TMC90.TCL901      2   16-bit timer counter 90 count clock selection bit 1
TMC90.TCL900      1   16-bit timer counter 90 count clock selection bit 0
TMC90.TOE90       0   16-bit timer counter 90 output control
BZC90            0xFF49   Buzzer output control register 90
BZC90.BCS902      3   Buzzer frequency bit 2
BZC90.BCS901      2   Buzzer frequency bit 1
BZC90.BCS900      1   Buzzer frequency bit 0
BZC90.BZOE90      0   Buzzer port output control
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock selection
WTM.WTM6          6   Prescaler interval selection bit 6
WTM.WTM5          5   Prescaler interval selection bit 5
WTM.WTM4          4   Prescaler interval selection bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation
RESERVEDFF4B     0xFF4B   RESERVED
CRH60            0xFF4C   8-bit compare register H60
TMC50            0xFF4D   8-bit timer mode control register 50
TMC60            0xFF4E   8-bit timer mode control register 60
TCA60            0xFF4F   Carrier generator output control register 60
TCA60.RMC60       2   Control of remote control output
TCA60.NRZB60      1   next data to be output to NRZ60
TCA60.NRZ60       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous serial interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous serial interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Flaming error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.SSE20      6   SS20 pin selection
CSIM20.DAP20      3   3-wire serial I/O mode data phase selection
CSIM20.DIR20      2   First-bit specification
CSIM20.CSCK20     1   3-wire serial I/O mode clock selection
CSIM20.CKP20      0   3-wire serial I/O mode clock phase selection
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
RESERVEDFFA0     0xFFA0   RESERVED
RESERVEDFFA1     0xFFA1   RESERVED
RESERVEDFFA2     0xFFA2   RESERVED
RESERVEDFFA3     0xFFA3   RESERVED
RESERVEDFFA4     0xFFA4   RESERVED
RESERVEDFFA5     0xFFA5   RESERVED
RESERVEDFFA6     0xFFA6   RESERVED
RESERVEDFFA7     0xFFA7   RESERVED
RESERVEDFFA8     0xFFA8   RESERVED
RESERVEDFFA9     0xFFA9   RESERVED
RESERVEDFFAA     0xFFAA   RESERVED
RESERVEDFFAB     0xFFAB   RESERVED
RESERVEDFFAC     0xFFAC   RESERVED
RESERVEDFFAD     0xFFAD   RESERVED
RESERVEDFFAE     0xFFAE   RESERVED
RESERVEDFFAF     0xFFAF   RESERVED
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control bit
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fLCD) selection bit 3
LCDC0.LCDC02      2   Internal clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection bit 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Reference voltage (VLC2) level selection
IF0              0xFFE0   Interrupt request flag register 0
IF0.STIF20        7   STIF20 - Interrupt request flag
IF0.SRIF20        5   SRIF20 - Interrupt request flag
IF0.PIF3          4   PIF3   - Interrupt request flag
IF0.PIF2          3   PIF2   - Interrupt request flag
IF0.PIF1          2   PIF1   - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.KRIF00        6   KRIF00 - Interrupt request flag
IF1.WTIF          5   WTIF   - Interrupt request flag
IF1.ADIF0         4   ADIF0  - Interrupt request flag
IF1.TMIF60        3   TMIF60 - Interrupt request flag
IF1.TMIF50        2   TMIF50 - Interrupt request flag
IF1.TMIF90        1   TMIF90 - Interrupt request flag
IF1.WTIIF         0   WTIIF  - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.STMK20        7   STMK20 - Interrupt servicing control
MK0.SRMK20        5   SRMK20 - Interrupt servicing control
MK0.PMK3          4   PMK3   - Interrupt servicing control
MK0.PMK2          3   PMK2   - Interrupt servicing control
MK0.PMK1          2   PMK1   - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.KRMK00        6   KRMK00 - Interrupt servicing control
MK1.WTMK          5   WTMK   - Interrupt servicing control
MK1.ADMK0         4   ADMK0  - Interrupt servicing control
MK1.TMMK60        3   TMMK60 - Interrupt servicing control
MK1.TMMK50        2   TMMK50 - Interrupt servicing control
MK1.TMMK90        1   TMMK90 - Interrupt servicing control
MK1.WTIMK         0   WTIMK  - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Suboscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   P0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 1
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 0
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC0          7   Control of main system clock oscillator operation
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789462
; U14788EJ1V0PM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x1000   Internal ROM
area BSS RESERVED   0x1000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA17   LCD display RAM
area BSS RESERVED   0xFA17:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFB0
area DATA FSR_2     0xFFB0:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   Watchdog timer overflow
interrupt INTP0_            0x0006   Pin input edge detection
interrupt INTAD0_           0x0008   Signal indicating end of A/D conversion
interrupt INTWT_            0x000A   Watch timer interrupt
interrupt INTTM30_          0x000C   Generation of 8-bit timer 30 match signal
interrupt INTTM40_          0x000E   Generation of 8-bit timer 40 match signal
interrupt INTKR00_          0x0010   Key return signal detection
interrupt INTWTI_           0x0012   Watch timer interval timer interrupt


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
RESERVEDFF02     0xFF02   RESERVED
P4               0xFF03   port 4
RESERVEDFF04     0xFF04   RESERVED
P6               0xFF05   Port 6
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
ADCR0            0xFF15   A/D conversion result register
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
RESERVEDFF22     0xFF22   RESERVED
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM43          3   P43 pin input/output mode selection
PM4.PM42          2   P42 pin input/output mode selection
PM4.PM41          1   P41 pin input/output mode selection
PM4.PM40          0   P40 pin input/output mode selection
RESERVEDFF25     0xFF25   RESERVED
PM6              0xFF26   Port mode register 6
PM6.PM61          1   P61 pin input/output mode selection
PM6.PM60          0   P60 pin input/output mode selection
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock selection resister
WDCS.WDCS2        2   Wachdog timer count clock selection bit 2
WDCS.WDCS1        1   Wachdog timer count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock (fW) selection
WTM.WTM6          6   Prescaler interval time selection bit 6
WTM.WTM5          5   Prescaler interval time selection bit 5
WTM.WTM4          4   Prescaler interval time selection bit 4
WTM.WTM1          1   5-bit counter operation control
WTM.WTM0          0   Watch timer operation enable
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
PF8              0xFF58   Port function register 8
PF8.PF85          5   Port function of P85
PF8.PF84          4   Port function of P84
PF8.PF83          3   Port function of P83
PF8.PF82          2   Port function of P82
PF8.PF81          1   Port function of P81
PF8.PF80          0   Port function of P80
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
CR30             0xFF63   8-bit compare register 30
TM30             0xFF64   8-bit timer counter 30
TMC30            0xFF65   8-bit timer mode control register 30
TMC30.TCE30       7   TM30 count control operation
TMC30.TCL301      4   Timer 30 count clock selection bit 1
TMC30.TCL300      3   Timer 30 count clock selection bit 0
TMC30.TMD300      1   Timer 30 operation mode selection
CR40             0xFF66   8-bit compare register 40
CRH40            0xFF67   8-bit H width compare register 40
TM40             0xFF68   8-bit timer counter 40
TMC40            0xFF69   8-bit timer mode control register 40
TMC40.TCE40       7   TM40 count control operation
TMC40.TCL402      5   Timer 40 count clock selection bit 2
TMC40.TCL401      4   Timer 40 count clock selection bit 1
TMC40.TCL400      3   Timer 40 count clock selection bit 0
TMC40.TMD401      2   Timer 40 operation mode selection bit 1
TMC40.TMD400      1   Timer 40 operation mode selection bit 0
TMC40.TOE40       0   Timer output control
TCA40            0xFF6A   Carrier generator output control register 40
TCA40.RMC40       2   Remote controller output control
TCA40.NRZB40      1   
TCA40.NRZ40       0   A low level is output
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
RESERVEDFF70     0xFF70   RESERVED
RESERVEDFF71     0xFF71   RESERVED
RESERVEDFF72     0xFF72   RESERVED
RESERVEDFF73     0xFF73   RESERVED
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS00        0   Port function of P61
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Supply of power for LCD drive
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fCLK) selection bit 3
LCDC0.LCDC02      2   Internal clock (fCLK) selection bit 2
LCDC0.LCDC01      1   LCD clock (fLCD) selection bit 1
LCDC0.LCDC00      0   LCD clock (fLCD) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Selection of voltage amplification level
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIIF         7   WTIIF  - Interrupt request flag
IF0.KRIF00        6   KRIF00 - Interrupt request flag
IF0.TMIF40        5   TMIF40 - Interrupt request flag
IF0.TMIF30        4   TMIF30 - Interrupt request flag
IF0.WTIF          3   WTIF   - Interrupt request flag
IF0.ADIF0         2   ADIF0  - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTIMK         7   WTIMK  - Interrupt servicing control
MK0.KRMK00        6   KRMK00 - Interrupt servicing control
MK0.TMMK40        5   TMMK40 - Interrupt servicing control
MK0.TMMK30        4   TMMK30 - Interrupt servicing control
MK0.WTMK          3   WTMK   - Interrupt servicing control
MK0.ADMK0         2   ADMK0  - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Subclock oscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operating status
CSS.CSS0          4   Selection of main system clock or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   Port 0 on-chip pull-up resistor selection bit 4
PU0.PU01          1   Port 0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   Port 0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Main system clock oscillator operation control
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789464
; U14788EJ1V0PM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x2000   Internal ROM
area BSS RESERVED   0x2000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA17   LCD display RAM
area BSS RESERVED   0xFA17:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFB0
area DATA FSR_2     0xFFB0:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   Watchdog timer overflow
interrupt INTP0_            0x0006   Pin input edge detection
interrupt INTAD0_           0x0008   Signal indicating end of A/D conversion
interrupt INTWT_            0x000A   Watch timer interrupt
interrupt INTTM30_          0x000C   Generation of 8-bit timer 30 match signal
interrupt INTTM40_          0x000E   Generation of 8-bit timer 40 match signal
interrupt INTKR00_          0x0010   Key return signal detection
interrupt INTWTI_           0x0012   Watch timer interval timer interrupt


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
RESERVEDFF02     0xFF02   RESERVED
P4               0xFF03   port 4
RESERVEDFF04     0xFF04   RESERVED
P6               0xFF05   Port 6
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
ADCR0            0xFF15   A/D conversion result register
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
RESERVEDFF22     0xFF22   RESERVED
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM43          3   P43 pin input/output mode selection
PM4.PM42          2   P42 pin input/output mode selection
PM4.PM41          1   P41 pin input/output mode selection
PM4.PM40          0   P40 pin input/output mode selection
RESERVEDFF25     0xFF25   RESERVED
PM6              0xFF26   Port mode register 6
PM6.PM61          1   P61 pin input/output mode selection
PM6.PM60          0   P60 pin input/output mode selection
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock selection resister
WDCS.WDCS2        2   Wachdog timer count clock selection bit 2
WDCS.WDCS1        1   Wachdog timer count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock (fW) selection
WTM.WTM6          6   Prescaler interval time selection bit 6
WTM.WTM5          5   Prescaler interval time selection bit 5
WTM.WTM4          4   Prescaler interval time selection bit 4
WTM.WTM1          1   5-bit counter operation control
WTM.WTM0          0   Watch timer operation enable
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
PF8              0xFF58   Port function register 8
PF8.PF85          5   Port function of P85
PF8.PF84          4   Port function of P84
PF8.PF83          3   Port function of P83
PF8.PF82          2   Port function of P82
PF8.PF81          1   Port function of P81
PF8.PF80          0   Port function of P80
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
CR30             0xFF63   8-bit compare register 30
TM30             0xFF64   8-bit timer counter 30
TMC30            0xFF65   8-bit timer mode control register 30
TMC30.TCE30       7   TM30 count control operation
TMC30.TCL301      4   Timer 30 count clock selection bit 1
TMC30.TCL300      3   Timer 30 count clock selection bit 0
TMC30.TMD300      1   Timer 30 operation mode selection
CR40             0xFF66   8-bit compare register 40
CRH40            0xFF67   8-bit H width compare register 40
TM40             0xFF68   8-bit timer counter 40
TMC40            0xFF69   8-bit timer mode control register 40
TMC40.TCE40       7   TM40 count control operation
TMC40.TCL402      5   Timer 40 count clock selection bit 2
TMC40.TCL401      4   Timer 40 count clock selection bit 1
TMC40.TCL400      3   Timer 40 count clock selection bit 0
TMC40.TMD401      2   Timer 40 operation mode selection bit 1
TMC40.TMD400      1   Timer 40 operation mode selection bit 0
TMC40.TOE40       0   Timer output control
TCA40            0xFF6A   Carrier generator output control register 40
TCA40.RMC40       2   Remote controller output control
TCA40.NRZB40      1   
TCA40.NRZ40       0   A low level is output
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
RESERVEDFF70     0xFF70   RESERVED
RESERVEDFF71     0xFF71   RESERVED
RESERVEDFF72     0xFF72   RESERVED
RESERVEDFF73     0xFF73   RESERVED
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS00        0   Port function of P61
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Supply of power for LCD drive
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fCLK) selection bit 3
LCDC0.LCDC02      2   Internal clock (fCLK) selection bit 2
LCDC0.LCDC01      1   LCD clock (fLCD) selection bit 1
LCDC0.LCDC00      0   LCD clock (fLCD) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Selection of voltage amplification level
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIIF         7   WTIIF  - Interrupt request flag
IF0.KRIF00        6   KRIF00 - Interrupt request flag
IF0.TMIF40        5   TMIF40 - Interrupt request flag
IF0.TMIF30        4   TMIF30 - Interrupt request flag
IF0.WTIF          3   WTIF   - Interrupt request flag
IF0.ADIF0         2   ADIF0  - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTIMK         7   WTIMK  - Interrupt servicing control
MK0.KRMK00        6   KRMK00 - Interrupt servicing control
MK0.TMMK40        5   TMMK40 - Interrupt servicing control
MK0.TMMK30        4   TMMK30 - Interrupt servicing control
MK0.WTMK          3   WTMK   - Interrupt servicing control
MK0.ADMK0         2   ADMK0  - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Subclock oscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operating status
CSS.CSS0          4   Selection of main system clock or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   Port 0 on-chip pull-up resistor selection bit 4
PU0.PU01          1   Port 0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   Port 0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Main system clock oscillator operation control
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789466
; U14788EJ1V0PM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA17   LCD display RAM
area BSS RESERVED   0xFA17:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFB0
area DATA FSR_2     0xFFB0:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   Watchdog timer overflow
interrupt INTP0_            0x0006   Pin input edge detection
interrupt INTAD0_           0x0008   Signal indicating end of A/D conversion
interrupt INTWT_            0x000A   Watch timer interrupt
interrupt INTTM30_          0x000C   Generation of 8-bit timer 30 match signal
interrupt INTTM40_          0x000E   Generation of 8-bit timer 40 match signal
interrupt INTKR00_          0x0010   Key return signal detection
interrupt INTWTI_           0x0012   Watch timer interval timer interrupt


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
RESERVEDFF02     0xFF02   RESERVED
P4               0xFF03   port 4
RESERVEDFF04     0xFF04   RESERVED
P6               0xFF05   Port 6
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
ADCR0            0xFF15   A/D conversion result register
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
RESERVEDFF22     0xFF22   RESERVED
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM43          3   P43 pin input/output mode selection
PM4.PM42          2   P42 pin input/output mode selection
PM4.PM41          1   P41 pin input/output mode selection
PM4.PM40          0   P40 pin input/output mode selection
RESERVEDFF25     0xFF25   RESERVED
PM6              0xFF26   Port mode register 6
PM6.PM61          1   P61 pin input/output mode selection
PM6.PM60          0   P60 pin input/output mode selection
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock selection resister
WDCS.WDCS2        2   Wachdog timer count clock selection bit 2
WDCS.WDCS1        1   Wachdog timer count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock (fW) selection
WTM.WTM6          6   Prescaler interval time selection bit 6
WTM.WTM5          5   Prescaler interval time selection bit 5
WTM.WTM4          4   Prescaler interval time selection bit 4
WTM.WTM1          1   5-bit counter operation control
WTM.WTM0          0   Watch timer operation enable
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
PF8              0xFF58   Port function register 8
PF8.PF85          5   Port function of P85
PF8.PF84          4   Port function of P84
PF8.PF83          3   Port function of P83
PF8.PF82          2   Port function of P82
PF8.PF81          1   Port function of P81
PF8.PF80          0   Port function of P80
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
CR30             0xFF63   8-bit compare register 30
TM30             0xFF64   8-bit timer counter 30
TMC30            0xFF65   8-bit timer mode control register 30
TMC30.TCE30       7   TM30 count control operation
TMC30.TCL301      4   Timer 30 count clock selection bit 1
TMC30.TCL300      3   Timer 30 count clock selection bit 0
TMC30.TMD300      1   Timer 30 operation mode selection
CR40             0xFF66   8-bit compare register 40
CRH40            0xFF67   8-bit H width compare register 40
TM40             0xFF68   8-bit timer counter 40
TMC40            0xFF69   8-bit timer mode control register 40
TMC40.TCE40       7   TM40 count control operation
TMC40.TCL402      5   Timer 40 count clock selection bit 2
TMC40.TCL401      4   Timer 40 count clock selection bit 1
TMC40.TCL400      3   Timer 40 count clock selection bit 0
TMC40.TMD401      2   Timer 40 operation mode selection bit 1
TMC40.TMD400      1   Timer 40 operation mode selection bit 0
TMC40.TOE40       0   Timer output control
TCA40            0xFF6A   Carrier generator output control register 40
TCA40.RMC40       2   Remote controller output control
TCA40.NRZB40      1   
TCA40.NRZ40       0   A low level is output
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
RESERVEDFF70     0xFF70   RESERVED
RESERVEDFF71     0xFF71   RESERVED
RESERVEDFF72     0xFF72   RESERVED
RESERVEDFF73     0xFF73   RESERVED
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS00        0   Port function of P61
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Supply of power for LCD drive
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fCLK) selection bit 3
LCDC0.LCDC02      2   Internal clock (fCLK) selection bit 2
LCDC0.LCDC01      1   LCD clock (fLCD) selection bit 1
LCDC0.LCDC00      0   LCD clock (fLCD) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Selection of voltage amplification level
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIIF         7   WTIIF  - Interrupt request flag
IF0.KRIF00        6   KRIF00 - Interrupt request flag
IF0.TMIF40        5   TMIF40 - Interrupt request flag
IF0.TMIF30        4   TMIF30 - Interrupt request flag
IF0.WTIF          3   WTIF   - Interrupt request flag
IF0.ADIF0         2   ADIF0  - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTIMK         7   WTIMK  - Interrupt servicing control
MK0.KRMK00        6   KRMK00 - Interrupt servicing control
MK0.TMMK40        5   TMMK40 - Interrupt servicing control
MK0.TMMK30        4   TMMK30 - Interrupt servicing control
MK0.WTMK          3   WTMK   - Interrupt servicing control
MK0.ADMK0         2   ADMK0  - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Subclock oscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operating status
CSS.CSS0          4   Selection of main system clock or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   Port 0 on-chip pull-up resistor selection bit 4
PU0.PU01          1   Port 0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   Port 0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Main system clock oscillator operation control
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789467
; U14788EJ1V0PM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x6000   Internal ROM
area BSS RESERVED   0x6000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA17   LCD display RAM
area BSS RESERVED   0xFA17:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFB0
area DATA FSR_2     0xFFB0:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   Watchdog timer overflow
interrupt INTP0_            0x0006   Pin input edge detection
interrupt INTAD0_           0x0008   Signal indicating end of A/D conversion
interrupt INTWT_            0x000A   Watch timer interrupt
interrupt INTTM30_          0x000C   Generation of 8-bit timer 30 match signal
interrupt INTTM40_          0x000E   Generation of 8-bit timer 40 match signal
interrupt INTKR00_          0x0010   Key return signal detection
interrupt INTWTI_           0x0012   Watch timer interval timer interrupt


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
RESERVEDFF02     0xFF02   RESERVED
P4               0xFF03   port 4
RESERVEDFF04     0xFF04   RESERVED
P6               0xFF05   Port 6
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
ADCR0            0xFF15   A/D conversion result register
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
RESERVEDFF22     0xFF22   RESERVED
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM43          3   P43 pin input/output mode selection
PM4.PM42          2   P42 pin input/output mode selection
PM4.PM41          1   P41 pin input/output mode selection
PM4.PM40          0   P40 pin input/output mode selection
RESERVEDFF25     0xFF25   RESERVED
PM6              0xFF26   Port mode register 6
PM6.PM61          1   P61 pin input/output mode selection
PM6.PM60          0   P60 pin input/output mode selection
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock selection resister
WDCS.WDCS2        2   Wachdog timer count clock selection bit 2
WDCS.WDCS1        1   Wachdog timer count clock selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock (fW) selection
WTM.WTM6          6   Prescaler interval time selection bit 6
WTM.WTM5          5   Prescaler interval time selection bit 5
WTM.WTM4          4   Prescaler interval time selection bit 4
WTM.WTM1          1   5-bit counter operation control
WTM.WTM0          0   Watch timer operation enable
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
PF8              0xFF58   Port function register 8
PF8.PF85          5   Port function of P85
PF8.PF84          4   Port function of P84
PF8.PF83          3   Port function of P83
PF8.PF82          2   Port function of P82
PF8.PF81          1   Port function of P81
PF8.PF80          0   Port function of P80
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
CR30             0xFF63   8-bit compare register 30
TM30             0xFF64   8-bit timer counter 30
TMC30            0xFF65   8-bit timer mode control register 30
TMC30.TCE30       7   TM30 count control operation
TMC30.TCL301      4   Timer 30 count clock selection bit 1
TMC30.TCL300      3   Timer 30 count clock selection bit 0
TMC30.TMD300      1   Timer 30 operation mode selection
CR40             0xFF66   8-bit compare register 40
CRH40            0xFF67   8-bit H width compare register 40
TM40             0xFF68   8-bit timer counter 40
TMC40            0xFF69   8-bit timer mode control register 40
TMC40.TCE40       7   TM40 count control operation
TMC40.TCL402      5   Timer 40 count clock selection bit 2
TMC40.TCL401      4   Timer 40 count clock selection bit 1
TMC40.TCL400      3   Timer 40 count clock selection bit 0
TMC40.TMD401      2   Timer 40 operation mode selection bit 1
TMC40.TMD400      1   Timer 40 operation mode selection bit 0
TMC40.TOE40       0   Timer output control
TCA40            0xFF6A   Carrier generator output control register 40
TCA40.RMC40       2   Remote controller output control
TCA40.NRZB40      1   
TCA40.NRZ40       0   A low level is output
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
RESERVEDFF70     0xFF70   RESERVED
RESERVEDFF71     0xFF71   RESERVED
RESERVEDFF72     0xFF72   RESERVED
RESERVEDFF73     0xFF73   RESERVED
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS00        0   Port function of P61
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Supply of power for LCD drive
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fCLK) selection bit 3
LCDC0.LCDC02      2   Internal clock (fCLK) selection bit 2
LCDC0.LCDC01      1   LCD clock (fLCD) selection bit 1
LCDC0.LCDC00      0   LCD clock (fLCD) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Selection of voltage amplification level
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIIF         7   WTIIF  - Interrupt request flag
IF0.KRIF00        6   KRIF00 - Interrupt request flag
IF0.TMIF40        5   TMIF40 - Interrupt request flag
IF0.TMIF30        4   TMIF30 - Interrupt request flag
IF0.WTIF          3   WTIF   - Interrupt request flag
IF0.ADIF0         2   ADIF0  - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTIMK         7   WTIMK  - Interrupt servicing control
MK0.KRMK00        6   KRMK00 - Interrupt servicing control
MK0.TMMK40        5   TMMK40 - Interrupt servicing control
MK0.TMMK30        4   TMMK30 - Interrupt servicing control
MK0.WTMK          3   WTMK   - Interrupt servicing control
MK0.ADMK0         2   ADMK0  - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Subclock oscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operating status
CSS.CSS0          4   Selection of main system clock or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   Port 0 on-chip pull-up resistor selection bit 4
PU0.PU01          1   Port 0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   Port 0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Main system clock oscillator operation control
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78F9468
; U14558EJ1V0PM00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x8000   Flash memory
area BSS RESERVED   0x8000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA17   LCD display RAM
area BSS RESERVED   0xFA17:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF85   Special Function Register
area BSS RESERVED   0xFF85:0xFFB0
area DATA FSR_2     0xFFB0:0xFFB4   Special Function Register
area BSS RESERVED   0xFFB4:0xFFDD
area DATA FSR_3     0xFFDD:0xFFDE   Special Function Register
area BSS RESERVED   0xFFDE:0xFFE0
area DATA FSR_4     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   Watchdog timer overflow
interrupt INTP0_            0x0006   Pin input edge detection
interrupt INTAD0_           0x0008   Signal indicating end of A/D conversion
interrupt INTWT_            0x000A   Watch timer interrupt
interrupt INTTM30_          0x000C   Generation of 8-bit timer 30 match signal
interrupt INTTM40_          0x000E   Generation of 8-bit timer 40 match signal
interrupt INTKR00_          0x0010   Key return signal detection
interrupt INTWTI_           0x0012   Watch timer interval timer interrupt


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
RESERVEDFF02     0xFF02   RESERVED
P4               0xFF03   port 4
RESERVEDFF04     0xFF04   RESERVED
P6               0xFF05   Port 6
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
P8               0xFF08   Port 8
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
RESERVEDFF10     0xFF10   RESERVED
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
ADCR0            0xFF15   A/D conversion result register
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
RESERVEDFF22     0xFF22   RESERVED
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM43          3   P43 pin input/output mode selection
PM4.PM42          2   P42 pin input/output mode selection
PM4.PM41          1   P41 pin input/output mode selection
PM4.PM40          0   P40 pin input/output mode selection
RESERVEDFF25     0xFF25   RESERVED
PM6              0xFF26   Port mode register 6
PM6.PM61          1   P61 pin input/output mode selection
PM6.PM60          0   P60 pin input/output mode selection
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28   Port mode register 8
PM8.PM85          5   P85 pin input/output mode selection bit
PM8.PM84          4   P84 pin input/output mode selection bit
PM8.PM83          3   P83 pin input/output mode selection bit
PM8.PM82          2   P82 pin input/output mode selection bit
PM8.PM81          1   P81 pin input/output mode selection bit
PM8.PM80          0   P80 pin input/output mode selection bit
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
RESERVEDFF42     0xFF42   RESERVED
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Watch timer count clock (fW) selection
WTM.WTM6          6   Prescaler interval time selection bit 6
WTM.WTM5          5   Prescaler interval time selection bit 5
WTM.WTM4          4   Prescaler interval time selection bit 4
WTM.WTM1          1   5-bit counter operation control
WTM.WTM0          0   Watch timer operation enable
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
PF8              0xFF58   Port function register 8
PF8.PF85          5   Port function of P85
PF8.PF84          4   Port function of P84
PF8.PF83          3   Port function of P83
PF8.PF82          2   Port function of P82
PF8.PF81          1   Port function of P81
PF8.PF80          0   Port function of P80
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
CR30             0xFF63   8-bit compare register 30
TM30             0xFF64   8-bit timer counter 30
TMC30            0xFF65   8-bit timer mode control register 30
TMC30.TCE30       7   TM30 count control operation
TMC30.TCL301      4   Timer 30 count clock selection bit 1
TMC30.TCL300      3   Timer 30 count clock selection bit 0
TMC30.TMD300      1   Timer 30 operation mode selection
CR40             0xFF66   8-bit compare register 40
CRH40            0xFF67   8-bit H width compare register 40
TM40             0xFF68   8-bit timer counter 40
TMC40            0xFF69   8-bit timer mode control register 40
TMC40.TCE40       7   TM40 count control operation
TMC40.TCL402      5   Timer 40 count clock selection bit 2
TMC40.TCL401      4   Timer 40 count clock selection bit 1
TMC40.TCL400      3   Timer 40 count clock selection bit 0
TMC40.TMD401      2   Timer 40 operation mode selection bit 1
TMC40.TMD400      1   Timer 40 operation mode selection bit 0
TMC40.TOE40       0   Timer output control
TCA40            0xFF6A   Carrier generator output control register 40
TCA40.RMC40       2   Remote controller output control
TCA40.NRZB40      1   
TCA40.NRZ40       0   A low level is output
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
RESERVEDFF70     0xFF70   RESERVED
RESERVEDFF71     0xFF71   RESERVED
RESERVEDFF72     0xFF72   RESERVED
RESERVEDFF73     0xFF73   RESERVED
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM0             0xFF80   A/D converter mode register 0
ADM0.ADCS0        7   A/D conversion control
ADM0.FR02         5   A/D conversion time selection bit 2
ADM0.FR01         4   A/D conversion time selection bit 1
ADM0.FR00         3   A/D conversion time selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   A/D input selection register 0
ADS0.ADS00        0   Port function of P61
LCDM0            0xFFB0   LCD display mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Supply of power for LCD drive
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   Internal clock (fCLK) selection bit 3
LCDC0.LCDC02      2   Internal clock (fCLK) selection bit 2
LCDC0.LCDC01      1   LCD clock (fLCD) selection bit 1
LCDC0.LCDC00      0   LCD clock (fLCD) selection bit 0
LCDVA0           0xFFB3   LCD voltage amplification control register 0
LCDVA0.GAIN       0   Selection of voltage amplification level
POCF1            0xFFDD   Power-on-clear register 1
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIIF         7   WTIIF  - Interrupt request flag
IF0.KRIF00        6   KRIF00 - Interrupt request flag
IF0.TMIF40        5   TMIF40 - Interrupt request flag
IF0.TMIF30        4   TMIF30 - Interrupt request flag
IF0.WTIF          3   WTIF   - Interrupt request flag
IF0.ADIF0         2   ADIF0  - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.WDTIF         0   WDTIF  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTIMK         7   WTIMK  - Interrupt servicing control
MK0.KRMK00        6   KRMK00 - Interrupt servicing control
MK0.TMMK40        5   TMMK40 - Interrupt servicing control
MK0.TMMK30        4   TMMK30 - Interrupt servicing control
MK0.WTMK          3   WTMK   - Interrupt servicing control
MK0.ADMK0         2   ADMK0  - Interrupt servicing control
MK0.PMK0          1   PMK0   - Interrupt servicing control
MK0.WDTMK         0   WDTMK  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Subclock oscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operating status
CSS.CSS0          4   Selection of main system clock or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM000      0   Key return signal detection control
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   Port 0 on-chip pull-up resistor selection bit 4
PU0.PU01          1   Port 0 on-chip pull-up resistor selection bit 1
PU0.PU00          0   Port 0 on-chip pull-up resistor selection bit 0
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Main system clock oscillator operation control
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789488
; U14883EJ1V0PM00.PDF, U15331EJ1V0UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x8000   Internal ROM
area BSS RESERVED   0x8000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA1C   LCD display RAM
area BSS RESERVED   0xFA1C:0xFB00
area DATA RAM_      0xFB00:0xFF00   Internal High-Speed RAM
area DATA FSR_      0xFF00:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x0010   INTSR20/INTCSI20
interrupt INTCSI10_         0x0012   INTCSI10
interrupt INTST20_          0x0014   INTST20
interrupt INTWTI_           0x0016   INTWTI
interrupt INTTM20_          0x0018   INTTM20
interrupt INTTM50_          0x001A   INTTM50
interrupt INTTM60_          0x001C   INTTM60
interrupt INTTM61_          0x001E   INTTM61
interrupt INTAD0_           0x0020   INTAD0
interrupt INTWT_            0x0022   INTWT
interrupt INTKR00_          0x0024   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
P7               0xFF07   Port 7
P8               0xFF08   Port 8
RESERVEDFF09     0xFF09   RESERVED
CR61             0xFF0A   8-bit compare register 61
TM61             0xFF0B   8-bit timer counter 61
CR60             0xFF0C   8-bit compare register 60
CR50             0xFF0D   8-bit compare register 50
TM60             0xFF0E   8-bit timer counter 60
TM50             0xFF0F   8-bit timer counter 50
RESERVEDFF10     0xFF10   RESERVED
SIO1A0           0xFF11   Serial I/O shift register 1A0
MUL0L            0xFF12   16-bit multiplication result store register L
MUL0H            0xFF13   16-bit multiplication result store register H
ADCRL0           0xFF14   A/D conversion result register 0
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 pin input/output mode selection
PM0.PM06          6   P06 pin input/output mode selection
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM34          4   P34 pin input/output mode selection
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF22     0xFF22   RESERVED
PM5              0xFF25    Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28    Port mode register 8
PM8.PM87          7   P87 pin input/output mode selection
PM8.PM86          6   P86 pin input/output mode selection
PM8.PM85          5   P85 pin input/output mode selection
PM8.PM84          4   P84 pin input/output mode selection
PM8.PM83          3   P83 pin input/output mode selection
PM8.PM82          2   P82 pin input/output mode selection
PM8.PM81          1   P81 pin input/output mode selection
PM8.PM80          0   P80 pin input/output mode selection
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
PUB0             0xFF30    Pull-up resistor option register B0
PUB0.PUB07        7   P07 on-chip pull-up resistor selection
PUB0.PUB06        6   P06 on-chip pull-up resistor selection
PUB0.PUB05        5   P05 on-chip pull-up resistor selection
PUB0.PUB04        4   P04 on-chip pull-up resistor selection
PUB0.PUB03        3   P03 on-chip pull-up resistor selection
PUB0.PUB02        2   P02 on-chip pull-up resistor selection
PUB0.PUB01        1   P01 on-chip pull-up resistor selection
PUB0.PUB00        0   P00 on-chip pull-up resistor selection
PUB1             0xFF31    Pull-up resistor option register B1
PUB1.PUB11        1   P11 on-chip pull-up resistor selection
PUB1.PUB10        0   P10 on-chip pull-up resistor selection
PUB2             0xFF32    Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33    Pull-up resistor option register B3
PUB3.PUB34        4   P34 on-chip pull-up resistor selection
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
CRH61            0xFF40   8-bit H width compare register 61
TMC61            0xFF41   8-bit timer mode control register 61
TMC61.TCE61       7   Control of TM61 count operation
TMC61.TCL612      5   Selection of timer 61 count clock bit 2
TMC61.TCL611      4   Selection of timer 61 count clock bit 1
TMC61.TCL610      3   Selection of timer 61 count clock bit 0
TMC61.TMD611      2   Selection of operation mode for timer 61 bit 1
TMC61.TMD610      1   Selection of operation mode for timer 61 bit 0
TMC61.TOE61       0   Control of timer output
WDCS             0xFF42   Watchdog timer clock selection register
WDCS.WDCS2        2   Selection of count clock bit 2
WDCS.WDCS1        1   Selection of count clock bit 1
WDCS.WDCS0        0   Selection of count clock bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Selection of watch timer count clock (fW)
WTM.WTM6          6   Selection of prescaler interval time bit 6
WTM.WTM5          5   Selection of prescaler interval time bit 5
WTM.WTM4          4   Selection of prescaler interval time bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation enable/disable
WTIM             0xFF4B   Watch timer interrupt time selection register
WTIM.WTS          0   Selection of watch timer interrupt time
CRH60            0xFF4C   8-bit H width compare register 60
TMC50            0xFF4D   8-bit timer mode control register 50
TMC50.TCE50       7   Control of TM50 count operation
TMC50.TEG50       6   Selection of valid edge of TM50 count clock
TMC50.TCL502      5   Selection of timer 50 count clock bit 2
TMC50.TCL501      4   Selection of timer 50 count clock bit 1
TMC50.TCL500      3   Selection of timer 50 count clock bit 0
TMC50.TMD501      2   Selection of operation mode for timer 50 bit 1
TMC50.TMD500      1   Selection of operation mode for timer 50 bit 0
TMC50.TOE50       0   Control of timer output
TMC60            0xFF4E   8-bit timer mode control register 60
TMC60.TCE60       7   Control of TM60 count operation
TMC60.TCL602      5   Selection of timer 60 count clock bit 2
TMC60.TCL601      4   Selection of timer 60 count clock bit 1
TMC60.TCL600      3   Selection of timer 60 count clock bit 0
TMC60.TMD601      2   Selection of operation mode for timer 60 bit 1
TMC60.TMD600      1   Selection of operation mode for timer 60 bit 0
TMC60.TOE60       0   Control of timer output
TCA60            0xFF4F   Carrier generator output control register 60
TCA60.RMC60       2   Control of remote control output
TCA60.NRZB60      1   
TCA60.NRZ60       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Framing error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.DIR20      2   First-bit specification
CSIM20.CSCK20     1   3-wire serial I/O mode clock selection
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmission shift / Reception buffer register 20
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
CSIM1A0          0xFF78   Serial operation mode register 1A0
CSIM1A0.CSIE10    7   Specification of operation enable/disable
CSIM1A0.DIR10     6   Specification of first bit of serial transfer data
CSIM1A0.ATE0      5   Selection of operation mode
CSIM1A0.LSCK10    4   Chip enable control of SCK10 pin
CSIM1A0.SCL101    1   Selection of serial clock (fSCK) bit 1
CSIM1A0.SCL100    0   Selection of serial clock (fSCK) bit 0
ADTC0            0xFF79   Automatic data transmission/reception control register 0
ADTC0.RE0         7   Control of reception of automatic transmit/receive function
ADTC0.ARLD0       6   Selection of operation mode for automatic transmit/receive function
ADTC0.TRF0        3   Status of automatic transmission/reception function
ADTP0            0xFF7A   Automatic data transmission/reception address pointer 0
ADTI0            0xFF7B   Automatic data transmission/reception interval specification register 0
ADTI0.ADTI07      7   Data transfer interval control bit 7
ADTI0.ADTI04      4   Data transfer interval control bit 4
ADTI0.ADTI03      3   Data transfer interval control bit 3
ADTI0.ADTI02      2   Data transfer interval control bit 2
ADTI0.ADTI01      1   Data transfer interval control bit 1
ADTI0.ADTI00      0   Data transfer interval control bit 0
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADML0            0xFF80   A/D converter mode register 0
ADML0.ADCS0       7   A/D conversion control
ADML0.FR02        5   A/D conversion time selection bit 2
ADML0.FR01        4   A/D conversion time selection bit 1
ADML0.FR00        3   A/D conversion time selection bit 0
ADML0.ADCE0       0   Control of band-gap circuit
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
RESERVEDFF83     0xFF83   RESERVED
RESERVEDFF84     0xFF84   RESERVED
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
SBMEM0           0xFFA0   Serial interface buffer memory 0
SBMEM1           0xFFA1   Serial interface buffer memory 1
SBMEM2           0xFFA2   Serial interface buffer memory 2
SBMEM3           0xFFA3   Serial interface buffer memory 3
SBMEM4           0xFFA4   Serial interface buffer memory 4
SBMEM5           0xFFA5   Serial interface buffer memory 5
SBMEM6           0xFFA6   Serial interface buffer memory 6
SBMEM7           0xFFA7   Serial interface buffer memory 7
SBMEM8           0xFFA8   Serial interface buffer memory 8
SBMEM9           0xFFA9   Serial interface buffer memory 9
SBMEMA           0xFFAA   Serial interface buffer memory A
SBMEMB           0xFFAB   Serial interface buffer memory B
SBMEMC           0xFFAC   Serial interface buffer memory C
SBMEMD           0xFFAD   Serial interface buffer memory D
SBMEME           0xFFAE   Serial interface buffer memory E
SBMEMF           0xFFAF   Serial interface buffer memory F
LCDM0            0xFFB0   LCD mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   LCD source clock (fLCD) selection bit 3
LCDC0.LCDC02      2   LCD source clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection bit 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection bit 0
LCDVA0           0xFFB3   LCD voltage boost control register 0
LCDVA0.GAIN       0   Reference voltage (VLC2) level selection
RESERVEDFFB4     0xFFB4   RESERVED
RESERVEDFFB5     0xFFB5   RESERVED
RESERVEDFFB6     0xFFB6   RESERVED
RESERVEDFFB7     0xFFB7   RESERVED
RESERVEDFFB8     0xFFB8   RESERVED
RESERVEDFFB9     0xFFB9   RESERVED
RESERVEDFFBA     0xFFBA   RESERVED
RESERVEDFFBB     0xFFBB   RESERVED
RESERVEDFFBC     0xFFBC   RESERVED
RESERVEDFFBD     0xFFBD   RESERVED
RESERVEDFFBE     0xFFBE   RESERVED
RESERVEDFFBF     0xFFBF   RESERVED
RESERVEDFFC0     0xFFC0   RESERVED
RESERVEDFFC1     0xFFC1   RESERVED
RESERVEDFFC2     0xFFC2   RESERVED
RESERVEDFFC3     0xFFC3   RESERVED
RESERVEDFFC4     0xFFC4   RESERVED
RESERVEDFFC5     0xFFC5   RESERVED
RESERVEDFFC6     0xFFC6   RESERVED
RESERVEDFFC7     0xFFC7   RESERVED
RESERVEDFFC8     0xFFC8   RESERVED
RESERVEDFFC9     0xFFC9   RESERVED
RESERVEDFFCA     0xFFCA   RESERVED
RESERVEDFFCB     0xFFCB   RESERVED
RESERVEDFFCC     0xFFCC   RESERVED
RESERVEDFFCD     0xFFCD   RESERVED
RESERVEDFFCE     0xFFCE   RESERVED
RESERVEDFFCF     0xFFCF   RESERVED
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.CSIIF10       7   CSIIF10 - Interrupt request flag
IF0.SRIF20        6   SRIF20  - Interrupt request flag
IF0.PIF3          4   PIF3    - Interrupt request flag
IF0.PIF2          3   PIF2    - Interrupt request flag
IF0.PIF1          2   PIF1    - Interrupt request flag
IF0.PIF0          1   PIF0    - Interrupt request flag
IF0.WDTIF         0   WDTIF   - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.WTIF          7   WTIF   - Interrupt request flag
IF1.ADIF0         6   ADIF0  - Interrupt request flag
IF1.TMIF61        5   TMIF61 - Interrupt request flag
IF1.TMIF60        4   TMIF60 - Interrupt request flag
IF1.TMIF50        3   TMIF50 - Interrupt request flag
IF1.TMIF20        2   TMIF20 - Interrupt request flag
IF1.WTIIF         1   WTIIF  - Interrupt request flag
IF1.STIF20        0   STIF20 - Interrupt request flag
IF2              0xFFE2   Interrupt request flag register 2
IF2.KRIF00        0   Interrupt request flag
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.CSIMK10       7   CSIMK10 - Interrupt servicing control
MK0.SRMK20        6   SRMK20  - Interrupt servicing control
MK0.PMK3          4   PMK3    - Interrupt servicing control
MK0.PMK2          3   PMK2    - Interrupt servicing control
MK0.PMK1          2   PMK1    - Interrupt servicing control
MK0.PMK0          1   PMK0    - Interrupt servicing control
MK0.WDTMK         0   WDTMK   - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.WTMK          7   WTMK   - Interrupt servicing control
MK1.ADMK0         6   ADMK0  - Interrupt servicing control
MK1.TMMK61        5   TMMK61 - Interrupt servicing control
MK1.TMMK60        4   TMMK60 - Interrupt servicing control
MK1.TMMK50        3   TMMK50 - Interrupt servicing control
MK1.TMMK20        2   TMMK20 - Interrupt servicing control
MK1.WTIMK         1   WTIMK  - Interrupt servicing control
MK1.STMK20        0   STMK20 - Interrupt servicing control
MK2              0xFFE6   Interrupt mask flag register 2
MK2.KRMK00        0   Interrupt servicing control
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Subclock oscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM007      7   Control of key return signal detection bit 7
KRM00.KRM006      6   Control of key return signal detection bit 6
KRM00.KRM005      5   Control of key return signal detection bit 5
KRM00.KRM004      4   Control of key return signal detection bit 4
KRM00.KRM000      0   Control of key return signal detection
RESERVEDFFF6     0xFFF6   RESERVED
RESERVEDFFF7     0xFFF7   RESERVED
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Main system clock oscillator operation control
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78F9488
; U15331EJ1V0UM00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x8000   Flash memory
area BSS RESERVED   0x8000:0xFA00
area DATA LCD_RAM   0xFA00:0xFA1C   LCD display RAM
area BSS RESERVED   0xFA1C:0xFB00
area DATA RAM_      0xFB00:0xFF00   Internal High-Speed RAM
area DATA FSR_      0xFF00:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTP2_            0x000A   INTP2
interrupt INTP3_            0x000C   INTP3
interrupt INTSR20_INTCSI20  0x0010   INTSR20/INTCSI20
interrupt INTCSI10_         0x0012   INTCSI10
interrupt INTST20_          0x0014   INTST20
interrupt INTWTI_           0x0016   INTWTI
interrupt INTTM20_          0x0018   INTTM20
interrupt INTTM50_          0x001A   INTTM50
interrupt INTTM60_          0x001C   INTTM60
interrupt INTTM61_          0x001E   INTTM61
interrupt INTAD0_           0x0020   INTAD0
interrupt INTWT_            0x0022   INTWT
interrupt INTKR00_          0x0024   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
P3               0xFF03   Port 3
RESERVEDFF04     0xFF04   RESERVED
P5               0xFF05   Port 5
P6               0xFF06   Port 6
P7               0xFF07   Port 7
P8               0xFF08   Port 8
RESERVEDFF09     0xFF09   RESERVED
CR61             0xFF0A   8-bit compare register 61
TM61             0xFF0B   8-bit timer counter 61
CR60             0xFF0C   8-bit compare register 60
CR50             0xFF0D   8-bit compare register 50
TM60             0xFF0E   8-bit timer counter 60
TM50             0xFF0F   8-bit timer counter 50
RESERVEDFF10     0xFF10   RESERVED
SIO1A0           0xFF11   Serial I/O shift register 1A0
MUL0L            0xFF12   16-bit multiplication result store register L
MUL0H            0xFF13   16-bit multiplication result store register H
ADCRL0           0xFF14   A/D conversion result register 0
CR20             0xFF16   16-bit compare register 20
TM20             0xFF18   16-bit timer counter 20
TCP20            0xFF1A   16-bit capture register 20
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 pin input/output mode selection
PM0.PM06          6   P06 pin input/output mode selection
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
PM3              0xFF23   Port mode register 3
PM3.PM34          4   P34 pin input/output mode selection
PM3.PM33          3   P33 pin input/output mode selection
PM3.PM32          2   P32 pin input/output mode selection
PM3.PM31          1   P31 pin input/output mode selection
PM3.PM30          0   P30 pin input/output mode selection
RESERVEDFF22     0xFF22   RESERVED
PM5              0xFF25    Port mode register 5
PM5.PM53          3   P53 pin input/output mode selection
PM5.PM52          2   P52 pin input/output mode selection
PM5.PM51          1   P51 pin input/output mode selection
PM5.PM50          0   P50 pin input/output mode selection
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
PM8              0xFF28    Port mode register 8
PM8.PM87          7   P87 pin input/output mode selection
PM8.PM86          6   P86 pin input/output mode selection
PM8.PM85          5   P85 pin input/output mode selection
PM8.PM84          4   P84 pin input/output mode selection
PM8.PM83          3   P83 pin input/output mode selection
PM8.PM82          2   P82 pin input/output mode selection
PM8.PM81          1   P81 pin input/output mode selection
PM8.PM80          0   P80 pin input/output mode selection
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
PUB0             0xFF30    Pull-up resistor option register B0
PUB0.PUB07        7   P07 on-chip pull-up resistor selection
PUB0.PUB06        6   P06 on-chip pull-up resistor selection
PUB0.PUB05        5   P05 on-chip pull-up resistor selection
PUB0.PUB04        4   P04 on-chip pull-up resistor selection
PUB0.PUB03        3   P03 on-chip pull-up resistor selection
PUB0.PUB02        2   P02 on-chip pull-up resistor selection
PUB0.PUB01        1   P01 on-chip pull-up resistor selection
PUB0.PUB00        0   P00 on-chip pull-up resistor selection
PUB1             0xFF31    Pull-up resistor option register B1
PUB1.PUB11        1   P11 on-chip pull-up resistor selection
PUB1.PUB10        0   P10 on-chip pull-up resistor selection
PUB2             0xFF32    Pull-up resistor option register B2
PUB2.PUB25        5   P25 on-chip pull-up resistor selection
PUB2.PUB24        4   P24 on-chip pull-up resistor selection
PUB2.PUB23        3   P23 on-chip pull-up resistor selection
PUB2.PUB22        2   P22 on-chip pull-up resistor selection
PUB2.PUB21        1   P21 on-chip pull-up resistor selection
PUB2.PUB20        0   P20 on-chip pull-up resistor selection
PUB3             0xFF33    Pull-up resistor option register B3
PUB3.PUB34        4   P34 on-chip pull-up resistor selection
PUB3.PUB33        3   P33 on-chip pull-up resistor selection
PUB3.PUB32        2   P32 on-chip pull-up resistor selection
PUB3.PUB31        1   P31 on-chip pull-up resistor selection
PUB3.PUB30        0   P30 on-chip pull-up resistor selection
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
CRH61            0xFF40   8-bit H width compare register 61
TMC61            0xFF41   8-bit timer mode control register 61
TMC61.TCE61       7   Control of TM61 count operation
TMC61.TCL612      5   Selection of timer 61 count clock bit 2
TMC61.TCL611      4   Selection of timer 61 count clock bit 1
TMC61.TCL610      3   Selection of timer 61 count clock bit 0
TMC61.TMD611      2   Selection of operation mode for timer 61 bit 1
TMC61.TMD610      1   Selection of operation mode for timer 61 bit 0
TMC61.TOE61       0   Control of timer output
WDCS             0xFF42   Watchdog timer clock selection register
WDCS.WDCS2        2   Selection of count clock bit 2
WDCS.WDCS1        1   Selection of count clock bit 1
WDCS.WDCS0        0   Selection of count clock bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
TMC20            0xFF48   16-bit timer mode control register 20
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM7          7   Selection of watch timer count clock (fW)
WTM.WTM6          6   Selection of prescaler interval time bit 6
WTM.WTM5          5   Selection of prescaler interval time bit 5
WTM.WTM4          4   Selection of prescaler interval time bit 4
WTM.WTM1          1   Control of 5-bit counter operation
WTM.WTM0          0   Watch timer operation enable/disable
WTIM             0xFF4B   Watch timer interrupt time selection register
WTIM.WTS          0   Selection of watch timer interrupt time
CRH60            0xFF4C   8-bit H width compare register 60
TMC50            0xFF4D   8-bit timer mode control register 50
TMC50.TCE50       7   Control of TM50 count operation
TMC50.TEG50       6   Selection of valid edge of TM50 count clock
TMC50.TCL502      5   Selection of timer 50 count clock bit 2
TMC50.TCL501      4   Selection of timer 50 count clock bit 1
TMC50.TCL500      3   Selection of timer 50 count clock bit 0
TMC50.TMD501      2   Selection of operation mode for timer 50 bit 1
TMC50.TMD500      1   Selection of operation mode for timer 50 bit 0
TMC50.TOE50       0   Control of timer output
TMC60            0xFF4E   8-bit timer mode control register 60
TMC60.TCE60       7   Control of TM60 count operation
TMC60.TCL602      5   Selection of timer 60 count clock bit 2
TMC60.TCL601      4   Selection of timer 60 count clock bit 1
TMC60.TCL600      3   Selection of timer 60 count clock bit 0
TMC60.TMD601      2   Selection of operation mode for timer 60 bit 1
TMC60.TMD600      1   Selection of operation mode for timer 60 bit 0
TMC60.TOE60       0   Control of timer output
TCA60            0xFF4F   Carrier generator output control register 60
TCA60.RMC60       2   Control of remote control output
TCA60.NRZB60      1   
TCA60.NRZ60       0   No return zero data
RESERVEDFF50     0xFF50   RESERVED
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM20           0xFF70   Asynchronous interface mode register 20
ASIM20.TXE20      7   Transmit operation control
ASIM20.RXE20      6   Receive operation control
ASIM20.PS201      5   Parity bit specification bit 1
ASIM20.PS200      4   Parity bit specification bit 0
ASIM20.CL20       3   Transmit data character length specification
ASIM20.SL20       2   Transmit data stop bit length
ASIS20           0xFF71   Asynchronous interface status register 20
ASIS20.PE20       2   Parity error flag
ASIS20.FE20       1   Framing error flag
ASIS20.OVE20      0   Overrun error flag
CSIM20           0xFF72   Serial operation mode register 20
CSIM20.CSIE20     7   Operation control in 3-wire serial I/O mode
CSIM20.DIR20      2   First-bit specification
CSIM20.CSCK20     1   3-wire serial I/O mode clock selection
BRGC20           0xFF73   Baud rate generator control register 20
BRGC20.TPS203     7   3-bit counter source clock selection bit 3
BRGC20.TPS202     6   3-bit counter source clock selection bit 2
BRGC20.TPS201     5   3-bit counter source clock selection bit 1
BRGC20.TPS200     4   3-bit counter source clock selection bit 0
SIO20            0xFF74   Transmission shift / Reception buffer register 20
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
CSIM1A0          0xFF78   Serial operation mode register 1A0
CSIM1A0.CSIE10    7   Specification of operation enable/disable
CSIM1A0.DIR10     6   Specification of first bit of serial transfer data
CSIM1A0.ATE0      5   Selection of operation mode
CSIM1A0.LSCK10    4   Chip enable control of SCK10 pin
CSIM1A0.SCL101    1   Selection of serial clock (fSCK) bit 1
CSIM1A0.SCL100    0   Selection of serial clock (fSCK) bit 0
ADTC0            0xFF79   Automatic data transmission/reception control register 0
ADTC0.RE0         7   Control of reception of automatic transmit/receive function
ADTC0.ARLD0       6   Selection of operation mode for automatic transmit/receive function
ADTC0.TRF0        3   Status of automatic transmission/reception function
ADTP0            0xFF7A   Automatic data transmission/reception address pointer 0
ADTI0            0xFF7B   Automatic data transmission/reception interval specification register 0
ADTI0.ADTI07      7   Data transfer interval control bit 7
ADTI0.ADTI04      4   Data transfer interval control bit 4
ADTI0.ADTI03      3   Data transfer interval control bit 3
ADTI0.ADTI02      2   Data transfer interval control bit 2
ADTI0.ADTI01      1   Data transfer interval control bit 1
ADTI0.ADTI00      0   Data transfer interval control bit 0
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADML0            0xFF80   A/D converter mode register 0
ADML0.ADCS0       7   A/D conversion control
ADML0.FR02        5   A/D conversion time selection bit 2
ADML0.FR01        4   A/D conversion time selection bit 1
ADML0.FR00        3   A/D conversion time selection bit 0
ADML0.ADCE0       0   Control of band-gap circuit
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS0             0xFF84   Analog input channel specification register 0
ADS0.ADS02        2   Analog input channel specification bit 2
ADS0.ADS01        1   Analog input channel specification bit 1
ADS0.ADS00        0   Analog input channel specification bit 0
RESERVEDFF83     0xFF83   RESERVED
RESERVEDFF84     0xFF84   RESERVED
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
SBMEM0           0xFFA0   Serial interface buffer memory 0
SBMEM1           0xFFA1   Serial interface buffer memory 1
SBMEM2           0xFFA2   Serial interface buffer memory 2
SBMEM3           0xFFA3   Serial interface buffer memory 3
SBMEM4           0xFFA4   Serial interface buffer memory 4
SBMEM5           0xFFA5   Serial interface buffer memory 5
SBMEM6           0xFFA6   Serial interface buffer memory 6
SBMEM7           0xFFA7   Serial interface buffer memory 7
SBMEM8           0xFFA8   Serial interface buffer memory 8
SBMEM9           0xFFA9   Serial interface buffer memory 9
SBMEMA           0xFFAA   Serial interface buffer memory A
SBMEMB           0xFFAB   Serial interface buffer memory B
SBMEMC           0xFFAC   Serial interface buffer memory C
SBMEMD           0xFFAD   Serial interface buffer memory D
SBMEME           0xFFAE   Serial interface buffer memory E
SBMEMF           0xFFAF   Serial interface buffer memory F
LCDM0            0xFFB0   LCD mode register 0
LCDM0.LCDON0      7   LCD display enable/disable
LCDM0.VAON0       6   LCD controller/driver operation mode
LCDM0.LIPS0       4   Segment pin/common pin output control
LCDM0.LCDM00      0   LCD controller/driver display mode selection
RESERVEDFFB1     0xFFB1   RESERVED
LCDC0            0xFFB2   LCD clock control register 0
LCDC0.LCDC03      3   LCD source clock (fLCD) selection bit 3
LCDC0.LCDC02      2   LCD source clock (fLCD) selection bit 2
LCDC0.LCDC01      1   LCD clock (LCDCL) selection bit 1
LCDC0.LCDC00      0   LCD clock (LCDCL) selection bit 0
LCDVA0           0xFFB3   LCD voltage boost control register 0
LCDVA0.GAIN       0   Reference voltage (VLC2) level selection
RESERVEDFFB4     0xFFB4   RESERVED
RESERVEDFFB5     0xFFB5   RESERVED
RESERVEDFFB6     0xFFB6   RESERVED
RESERVEDFFB7     0xFFB7   RESERVED
RESERVEDFFB8     0xFFB8   RESERVED
RESERVEDFFB9     0xFFB9   RESERVED
RESERVEDFFBA     0xFFBA   RESERVED
RESERVEDFFBB     0xFFBB   RESERVED
RESERVEDFFBC     0xFFBC   RESERVED
RESERVEDFFBD     0xFFBD   RESERVED
RESERVEDFFBE     0xFFBE   RESERVED
RESERVEDFFBF     0xFFBF   RESERVED
RESERVEDFFC0     0xFFC0   RESERVED
RESERVEDFFC1     0xFFC1   RESERVED
RESERVEDFFC2     0xFFC2   RESERVED
RESERVEDFFC3     0xFFC3   RESERVED
RESERVEDFFC4     0xFFC4   RESERVED
RESERVEDFFC5     0xFFC5   RESERVED
RESERVEDFFC6     0xFFC6   RESERVED
RESERVEDFFC7     0xFFC7   RESERVED
RESERVEDFFC8     0xFFC8   RESERVED
RESERVEDFFC9     0xFFC9   RESERVED
RESERVEDFFCA     0xFFCA   RESERVED
RESERVEDFFCB     0xFFCB   RESERVED
RESERVEDFFCC     0xFFCC   RESERVED
RESERVEDFFCD     0xFFCD   RESERVED
RESERVEDFFCE     0xFFCE   RESERVED
RESERVEDFFCF     0xFFCF   RESERVED
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier operation start control bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.CSIIF10       7   CSIIF10 - Interrupt request flag
IF0.SRIF20        6   SRIF20  - Interrupt request flag
IF0.PIF3          4   PIF3    - Interrupt request flag
IF0.PIF2          3   PIF2    - Interrupt request flag
IF0.PIF1          2   PIF1    - Interrupt request flag
IF0.PIF0          1   PIF0    - Interrupt request flag
IF0.WDTIF         0   WDTIF   - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.WTIF          7   WTIF   - Interrupt request flag
IF1.ADIF0         6   ADIF0  - Interrupt request flag
IF1.TMIF61        5   TMIF61 - Interrupt request flag
IF1.TMIF60        4   TMIF60 - Interrupt request flag
IF1.TMIF50        3   TMIF50 - Interrupt request flag
IF1.TMIF20        2   TMIF20 - Interrupt request flag
IF1.WTIIF         1   WTIIF  - Interrupt request flag
IF1.STIF20        0   STIF20 - Interrupt request flag
IF2              0xFFE2   Interrupt request flag register 2
IF2.KRIF00        0   Interrupt request flag
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.CSIMK10       7   CSIMK10 - Interrupt servicing control
MK0.SRMK20        6   SRMK20  - Interrupt servicing control
MK0.PMK3          4   PMK3    - Interrupt servicing control
MK0.PMK2          3   PMK2    - Interrupt servicing control
MK0.PMK1          2   PMK1    - Interrupt servicing control
MK0.PMK0          1   PMK0    - Interrupt servicing control
MK0.WDTMK         0   WDTMK   - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.WTMK          7   WTMK   - Interrupt servicing control
MK1.ADMK0         6   ADMK0  - Interrupt servicing control
MK1.TMMK61        5   TMMK61 - Interrupt servicing control
MK1.TMMK60        4   TMMK60 - Interrupt servicing control
MK1.TMMK50        3   TMMK50 - Interrupt servicing control
MK1.TMMK20        2   TMMK20 - Interrupt servicing control
MK1.WTIMK         1   WTIMK  - Interrupt servicing control
MK1.STMK20        0   STMK20 - Interrupt servicing control
MK2              0xFFE6   Interrupt mask flag register 2
MK2.KRMK00        0   Interrupt servicing control
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES21        7   INTP2 valid edge selection bit 1
INTM0.ES20        6   INTP2 valid edge selection bit 0
INTM0.ES11        5   INTP1 valid edge selection bit 1
INTM0.ES10        4   INTP1 valid edge selection bit 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
INTM1            0xFFED   External interrupt mode register 1
INTM1.ES31        1   INTP3 valid edge selection bit 1
INTM1.ES30        0   INTP3 valid edge selection bit 0
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
SCKM             0xFFF0   Subclock oscillation mode register
SCKM.FRC          1   Feedback resistor selection
SCKM.SCC          0   Control of subsystem clock oscillator operation
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subclock control register
CSS.CLS           5   CPU clock operation status
CSS.CSS0          4   Selection of the main system or subsystem clock oscillator
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM007      7   Control of key return signal detection bit 7
KRM00.KRM006      6   Control of key return signal detection bit 6
KRM00.KRM005      5   Control of key return signal detection bit 5
KRM00.KRM004      4   Control of key return signal detection bit 4
KRM00.KRM000      0   Control of key return signal detection
RESERVEDFFF6     0xFFF6   RESERVED
RESERVEDFFF7     0xFFF7   RESERVED
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Main system clock oscillator operation control
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789800
; U12627EJ3V0DS00.PDF, U12978EJ2V1UM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x2000   Internal ROM
area BSS RESERVED   0x2000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF73   Special Function Register
area BSS RESERVED   0xFF73:0xFFA1
area DATA FSR_2     0xFFA1:0xFFB8   Special Function Register
area BSS RESERVED   0xFFB8:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTUSBTM_         0x0006   INTUSBTM
interrupt INTUSBRT_         0x0008   INTUSBRT
interrupt INTUSBRD_         0x000A   INTUSBRD
interrupt INTUSBST_         0x000C   INTUSBST
interrupt INTUSBRE_         0x000E   INTUSBRE
interrupt INTP0_            0x0010   INTP0
interrupt INTCSI10_         0x0012   INTCSI10
interrupt INTTM00_          0x0014   INTTM00
interrupt INTTM01_          0x0016   INTTM01
interrupt INTKR00_          0x0018   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
P4               0xFF04   Port 4
RESERVEDFF05     0xFF05   RESERVED
RESERVEDFF06     0xFF06   RESERVED
USBRD            0xFF07   Receive data PID
USBR0            0xFF08   Receive data address 0
USBR1            0xFF09   Receive data address 1
USBR2            0xFF0A   Receive data address 2
USBR3            0xFF0B   Receive data address 3
USBR4            0xFF0C   Receive data address 4
USBR5            0xFF0D   Receive data address 5
USBR6            0xFF0E   Receive data address 6
USBR7            0xFF0F   Receive data address 7
SIO10            0xFF10   Transmit/receive shift register 10
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
HTXRSV           0xFF14   Handshake packet send reservation register
HTXRSV.E1STEN     7   STALL packet send reservation flag for Endpoint1 after IN packet
HTXRSV.E0STEN     6   STALL packet send reservation flag for Endpoint0 after IN packet
HTXRSV.DSTEN      5   STALL packet send reservation flag for data packet receive byte length error
HTXRSV.STALEN     4   STALL packet send reservation flag after data packet
HTXRSV.E1NAEN     3   NAK packet send reservation flag for Endpoint1 after IN packet
HTXRSV.E0NAEN     2   NAK packet send reservation flag for Endpoint0 after IN packet
HTXRSV.DNAEN      1   NAK packet send reservation flag after data packet reception
HTXRSV.ACKEN      0   ACK packet send reservation flag after data packet reception
DTXRSV           0xFF15   Data packet send reservation register
DTXRSV.DT11EN     3   Send reservation flag for send bank 1 (Endpoint1)
DTXRSV.DT10EN     2   Send reservation flag for send bank 1 (Endpoint0)
DTXRSV.DT01EN     1   Send reservation flag for send buffer 0 (Endpoint1)
DTXRSV.DT00EN     0   Send reservation flag for send buffer 0 (Endpoint0)
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 pin input/output mode selection
PM0.PM06          6   P06 pin input/output mode selection
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM17          7   P17 pin input/output mode selection
PM1.PM16          6   P16 pin input/output mode selection
PM1.PM15          5   P15 pin input/output mode selection
PM1.PM14          4   P14 pin input/output mode selection
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 pin input/output mode selection
PM4.PM46          6   P46 pin input/output mode selection
PM4.PM45          5   P45 pin input/output mode selection
PM4.PM44          4   P44 pin input/output mode selection
PM4.PM43          3   P43 pin input/output mode selection
PM4.PM42          2   P42 pin input/output mode selection
PM4.PM41          1   P41 pin input/output mode selection
PM4.PM40          0   P40 pin input/output mode selection
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
POM0             0xFF30   Port output mode register 0
POM0.POM01        1   P1 output mode selection
POM0.POM00        0   P0 output mode selection
POM1             0xFF31   Port output mode register 1
POM1.POM126       6   Output mode selection for bit n of port 2 bit 6
POM1.POM125       5   Output mode selection for bit n of port 2 bit 5
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer register 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   8-bit timer register 00 operation control
TMC00.TCL000      1   8-bit timer counter 00 count clock selection
CR01             0xFF54   8-bit compare register 01
TM01             0xFF55   8-bit timer register 01
RESERVEDFF56     0xFF57   RESERVED
TMC01            0xFF57   8-bit timer mode control register 01
TMC01.TCE01       7   8-bit timer register 01 operation control
TMC01.TCL011      2   8-bit timer/event counter 01 count clock selection bit 1
TMC01.TCL010      1   8-bit timer/event counter 01 count clock selection bit 0
TMC01.TOE01       0   8-bit timer/event counter 01 output control
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
TIDCMP           0xFF60   Token PID compare register
ADRCMP           0xFF61   Token address compare register
TRXRSL           0xFF62   Token packet receive result store register
TRXRSL.CRC5ER     7   CRC error detection (5-bit mode)
TRXRSL.TBITER     6   Bit stuff error detection
TRXRSL.TBYER      5   Received token packet length error detection
TRXRSL.END1RX     4   Endpoint1 reception detection
TRXRSL.END0RX     3   Endpoint0 reception detection
TRXRSL.ADRRST     2   Token packet address compare result
TRXRSL.TIDRST     1   Token packet ID compare result detection
TRXRSL.SETRX      0   Setup token packet reception detection
DIDCMP           0xFF63   Data/handshake PID compare register
DRXCON           0xFF64   Data/handshake packet receive byte number counter
DRXRSL           0xFF65   Data/handshake packet receive result store register
DRXRSL.CR16ER     7   CRC error detection (16-bit mode)
DRXRSL.DBITER     6   Bit stuff error detection
DRXRSL.DBYER      5   Received data/handshake packet length error detection
DRXRSL.DIDRST     1   Data/handshake packet ID comparison result
URXMOD           0xFF66   Data/handshake packet receive mode register
URXMOD.RESMOD     2   USB reset signal detection mode setting
URXMOD.DINTEN     1   Data/handshake packet receive interrupt enable flag
URXMOD.DWRMSK     0   Data/handshake packet write disable setting
RXSTAT           0xFF67   Packet receive status register
RXSTAT.UWDERR     7   USB timer inadvertent program loop detection
RXSTAT.RESMRX     6   Resume signal receive status
RXSTAT.SE0RX      5   Single-ended 0 signal detection status
RXSTAT.URESRX     4   USB reset signal detection status
RXSTAT.EOPRX      3   EOP detection status
RXSTAT.HSSTAT     2   Handshake packet receive status
RXSTAT.DASTAT     1   Data packet receive status
RXSTAT.TOSTAT     0   Token packet receive status
DTXCO0           0xFF68   Data packet send byte number counter 0
DTXCO1           0xFF69   Data packet send byte number counter 1
REMWUP           0xFF6A   Remote wake-up control register
REMWUP.PULLDM     3   D- lead low/high fixed output setting
REMWUP.PULLDP     2   D+ lead low/high fixed output setting
REMWUP.PULLEN     1   D+/D- lead fixed output enable
REMWUP.WAKEUP     0   Wake-up signal output
USBPOW           0xFF6B   Send/receive pointer
USBTCL           0xFF6C   USB timer start reservation control register
USBTCL.DATATX     1   USB timer start reservation after data packet send
USBTCL.SETORX     0   USB timer start reservation after SETUP/OUT token packet reception
USBMOD           0xFF6D   USB receiver enable register
USBMOD.RXEN       0   USB receiver operation control
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
RESERVEDFF70     0xFF70   RESERVED
RESERVEDFF71     0xFF71   RESERVED
CSIM10           0xFF72   Serial operation mode register 10
CSIM10.CSIE10     7   Operation control in 3-wired serial I/O mode
CSIM10.TPS100     4   Count clock selection during operation enabled in 3-wired serial I/O mode
CSIM10.DIR10      2   Start bit specification
CSIM10.CSCK10     1   Clock selection in 3-wired serial I/O mode
USBTD0           0xFFA1   Send data PID bank 0
USBT00           0xFFA2   Send data bank 0 address 00
USBT01           0xFFA3   Send data bank 0 address 01
USBT02           0xFFA4   Send data bank 0 address 02
USBT03           0xFFA5   Send data bank 0 address 03
USBT04           0xFFA6   Send data bank 0 address 04
USBT05           0xFFA7   Send data bank 0 address 05
USBT06           0xFFA8   Send data bank 0 address 06
USBT07           0xFFA9   Send data bank 0 address 07
RESERVEDFFAA     0xFFAA   RESERVED
USBTD1           0xFFAB   Send data PID bank 1
USBT10           0xFFAC   Send data bank 1 address 10
USBT11           0xFFAD   Send data bank 1 address 11
USBT12           0xFFAE   Send data bank 1 address 12
USBT13           0xFFAF   Send data bank 1 address 13
USBT14           0xFFB0   Send data bank 1 address 14
USBT15           0xFFB1   Send data bank 1 address 15
USBT16           0xFFB2   Send data bank 1 address 16
USBT17           0xFFB3   Send data bank 1 address 17
RESERVEDFFB4     0xFFB4   RESERVED
USBRTP           0xFFB5   Receive token PID
USBRAL           0xFFB6   Receive token packet address L
USBRAH           0xFFB7   Receive token packet address H
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF01        7   TMIF01 - Interrupt request flag
IF0.TMIF00        6   TMIF00 - Interrupt request flag
IF0.CSIF10        5   CSIF10 - Interrupt request flag
IF0.KRIF00        4   KRIF00 - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.USBTMIF       6   USBTMIF - Interrupt request flag
IF1.USBRTIF       5   USBRTIF - Interrupt request flag
IF1.USBRDIF       4   USBRDIF - Interrupt request flag
IF1.USBSTIF       3   USBSTIF - Interrupt request flag
IF1.USBREIF       2   USBREIF - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK01        7   TMMK01  - Interrupt servicing control
MK0.TMMK00        6   TMMK00  - Interrupt servicing control
MK0.CSIMK10       5   CSIMK10 - Interrupt servicing control
MK0.KRMK00        4   KRMK00  - Interrupt servicing control
MK0.PMK0          1   PMK0    - Interrupt servicing control
MK0.TMMK4         0   TMMK4   - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.USBTMMK       6   USBTMMK - Interrupt servicing control
MK1.USBRTMK       5   USBRTMK - Interrupt servicing control
MK1.USBRDMK       4   USBRDMK - Interrupt servicing control
MK1.USBSTMK       3   USBSTMK - Interrupt servicing control
MK1.USBREIF       2   USBREIF - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM007      7   Key return signal detection selection for P47/KR07 pin
KRM00.KRM006      6   Key return signal detection selection for P46/KR06 pin
KRM00.KRM005      5   Key return signal detection selection for P45/KR05 pin
KRM00.KRM004      4   Key return signal detection selection for P44/KR04 pin
KRM00.KRM000      0
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P4 on-chip pull-up resistor selection
PU0.PU02          2   P2 on-chip pull-up resistor selection
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation settling time select register
OSTS.OSTS2        2   Oscillation settling time selection bit
OSTS.OSTS1        1   Oscillation settling time selection bit
OSTS.OSTS0        0   Oscillation settling time selection bit
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78F9801
; U12626EJ1V0DS00.PDF, U12978EJ2V1UM00.PDF


; MEMORY MAP
area DATA FLAH_     0x0000:0x4000   Flash memory
area BSS RESERVED   0x4000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF73   Special Function Register
area BSS RESERVED   0xFF73:0xFFA1
area DATA FSR_2     0xFFA1:0xFFB8   Special Function Register
area BSS RESERVED   0xFFB8:0xFFE0
area DATA FSR_3     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTUSBTM_         0x0006   INTUSBTM
interrupt INTUSBRT_         0x0008   INTUSBRT
interrupt INTUSBRD_         0x000A   INTUSBRD
interrupt INTUSBST_         0x000C   INTUSBST
interrupt INTUSBRE_         0x000E   INTUSBRE
interrupt INTP0_            0x0010   INTP0
interrupt INTCSI10_         0x0012   INTCSI10
interrupt INTTM00_          0x0014   INTTM00
interrupt INTTM01_          0x0016   INTTM01
interrupt INTKR00_          0x0018   INTKR00


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
P4               0xFF04   Port 4
RESERVEDFF05     0xFF05   RESERVED
RESERVEDFF06     0xFF06   RESERVED
USBRD            0xFF07   Receive data PID
USBR0            0xFF08   Receive data address 0
USBR1            0xFF09   Receive data address 1
USBR2            0xFF0A   Receive data address 2
USBR3            0xFF0B   Receive data address 3
USBR4            0xFF0C   Receive data address 4
USBR5            0xFF0D   Receive data address 5
USBR6            0xFF0E   Receive data address 6
USBR7            0xFF0F   Receive data address 7
SIO10            0xFF10   Transmit/receive shift register 10
RESERVEDFF11     0xFF11   RESERVED
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
HTXRSV           0xFF14   Handshake packet send reservation register
HTXRSV.E1STEN     7   STALL packet send reservation flag for Endpoint1 after IN packet
HTXRSV.E0STEN     6   STALL packet send reservation flag for Endpoint0 after IN packet
HTXRSV.DSTEN      5   STALL packet send reservation flag for data packet receive byte length error
HTXRSV.STALEN     4   STALL packet send reservation flag after data packet
HTXRSV.E1NAEN     3   NAK packet send reservation flag for Endpoint1 after IN packet
HTXRSV.E0NAEN     2   NAK packet send reservation flag for Endpoint0 after IN packet
HTXRSV.DNAEN      1   NAK packet send reservation flag after data packet reception
HTXRSV.ACKEN      0   ACK packet send reservation flag after data packet reception
DTXRSV           0xFF15   Data packet send reservation register
DTXRSV.DT11EN     3   Send reservation flag for send bank 1 (Endpoint1)
DTXRSV.DT10EN     2   Send reservation flag for send bank 1 (Endpoint0)
DTXRSV.DT01EN     1   Send reservation flag for send buffer 0 (Endpoint1)
DTXRSV.DT00EN     0   Send reservation flag for send buffer 0 (Endpoint0)
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 pin input/output mode selection
PM0.PM06          6   P06 pin input/output mode selection
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
PM1              0xFF21   Port mode register 1
PM1.PM17          7   P17 pin input/output mode selection
PM1.PM16          6   P16 pin input/output mode selection
PM1.PM15          5   P15 pin input/output mode selection
PM1.PM14          4   P14 pin input/output mode selection
PM1.PM13          3   P13 pin input/output mode selection
PM1.PM12          2   P12 pin input/output mode selection
PM1.PM11          1   P11 pin input/output mode selection
PM1.PM10          0   P10 pin input/output mode selection
PM2              0xFF22   Port mode register 2
PM2.PM26          6   P26 pin input/output mode selection
PM2.PM25          5   P25 pin input/output mode selection
PM2.PM24          4   P24 pin input/output mode selection
PM2.PM23          3   P23 pin input/output mode selection
PM2.PM22          2   P22 pin input/output mode selection
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
PM4              0xFF24   Port mode register 4
PM4.PM47          7   P47 pin input/output mode selection
PM4.PM46          6   P46 pin input/output mode selection
PM4.PM45          5   P45 pin input/output mode selection
PM4.PM44          4   P44 pin input/output mode selection
PM4.PM43          3   P43 pin input/output mode selection
PM4.PM42          2   P42 pin input/output mode selection
PM4.PM41          1   P41 pin input/output mode selection
PM4.PM40          0   P40 pin input/output mode selection
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
POM0             0xFF30   Port output mode register 0
POM0.POM01        1   P1 output mode selection
POM0.POM00        0   P0 output mode selection
POM1             0xFF31   Port output mode register 1
POM1.POM126       6   Output mode selection for bit n of port 2 bit 6
POM1.POM125       5   Output mode selection for bit n of port 2 bit 5
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock select register 2
TCL2.TCL22        2   Watchdog timer count clock selection bit 2
TCL2.TCL21        1   Watchdog timer count clock selection bit 1
TCL2.TCL20        0   Watchdog timer count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR00             0xFF50   8-bit compare register 00
TM00             0xFF51   8-bit timer register 00
RESERVEDFF52     0xFF52   RESERVED
TMC00            0xFF53   8-bit timer mode control register 00
TMC00.TCE00       7   8-bit timer register 00 operation control
TMC00.TCL000      1   8-bit timer counter 00 count clock selection
CR01             0xFF54   8-bit compare register 01
TM01             0xFF55   8-bit timer register 01
RESERVEDFF56     0xFF57   RESERVED
TMC01            0xFF57   8-bit timer mode control register 01
TMC01.TCE01       7   8-bit timer register 01 operation control
TMC01.TCL011      2   8-bit timer/event counter 01 count clock selection bit 1
TMC01.TCL010      1   8-bit timer/event counter 01 count clock selection bit 0
TMC01.TOE01       0   8-bit timer/event counter 01 output control
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
TIDCMP           0xFF60   Token PID compare register
ADRCMP           0xFF61   Token address compare register
TRXRSL           0xFF62   Token packet receive result store register
TRXRSL.CRC5ER     7   CRC error detection (5-bit mode)
TRXRSL.TBITER     6   Bit stuff error detection
TRXRSL.TBYER      5   Received token packet length error detection
TRXRSL.END1RX     4   Endpoint1 reception detection
TRXRSL.END0RX     3   Endpoint0 reception detection
TRXRSL.ADRRST     2   Token packet address compare result
TRXRSL.TIDRST     1   Token packet ID compare result detection
TRXRSL.SETRX      0   Setup token packet reception detection
DIDCMP           0xFF63   Data/handshake PID compare register
DRXCON           0xFF64   Data/handshake packet receive byte number counter
DRXRSL           0xFF65   Data/handshake packet receive result store register
DRXRSL.CR16ER     7   CRC error detection (16-bit mode)
DRXRSL.DBITER     6   Bit stuff error detection
DRXRSL.DBYER      5   Received data/handshake packet length error detection
DRXRSL.DIDRST     1   Data/handshake packet ID comparison result
URXMOD           0xFF66   Data/handshake packet receive mode register
URXMOD.RESMOD     2   USB reset signal detection mode setting
URXMOD.DINTEN     1   Data/handshake packet receive interrupt enable flag
URXMOD.DWRMSK     0   Data/handshake packet write disable setting
RXSTAT           0xFF67   Packet receive status register
RXSTAT.UWDERR     7   USB timer inadvertent program loop detection
RXSTAT.RESMRX     6   Resume signal receive status
RXSTAT.SE0RX      5   Single-ended 0 signal detection status
RXSTAT.URESRX     4   USB reset signal detection status
RXSTAT.EOPRX      3   EOP detection status
RXSTAT.HSSTAT     2   Handshake packet receive status
RXSTAT.DASTAT     1   Data packet receive status
RXSTAT.TOSTAT     0   Token packet receive status
DTXCO0           0xFF68   Data packet send byte number counter 0
DTXCO1           0xFF69   Data packet send byte number counter 1
REMWUP           0xFF6A   Remote wake-up control register
REMWUP.PULLDM     3   D- lead low/high fixed output setting
REMWUP.PULLDP     2   D+ lead low/high fixed output setting
REMWUP.PULLEN     1   D+/D- lead fixed output enable
REMWUP.WAKEUP     0   Wake-up signal output
USBPOW           0xFF6B   Send/receive pointer
USBTCL           0xFF6C   USB timer start reservation control register
USBTCL.DATATX     1   USB timer start reservation after data packet send
USBTCL.SETORX     0   USB timer start reservation after SETUP/OUT token packet reception
USBMOD           0xFF6D   USB receiver enable register
USBMOD.RXEN       0   USB receiver operation control
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
RESERVEDFF70     0xFF70   RESERVED
RESERVEDFF71     0xFF71   RESERVED
CSIM10           0xFF72   Serial operation mode register 10
CSIM10.CSIE10     7   Operation control in 3-wired serial I/O mode
CSIM10.TPS100     4   Count clock selection during operation enabled in 3-wired serial I/O mode
CSIM10.DIR10      2   Start bit specification
CSIM10.CSCK10     1   Clock selection in 3-wired serial I/O mode
USBTD0           0xFFA1   Send data PID bank 0
USBT00           0xFFA2   Send data bank 0 address 00
USBT01           0xFFA3   Send data bank 0 address 01
USBT02           0xFFA4   Send data bank 0 address 02
USBT03           0xFFA5   Send data bank 0 address 03
USBT04           0xFFA6   Send data bank 0 address 04
USBT05           0xFFA7   Send data bank 0 address 05
USBT06           0xFFA8   Send data bank 0 address 06
USBT07           0xFFA9   Send data bank 0 address 07
RESERVEDFFAA     0xFFAA   RESERVED
USBTD1           0xFFAB   Send data PID bank 1
USBT10           0xFFAC   Send data bank 1 address 10
USBT11           0xFFAD   Send data bank 1 address 11
USBT12           0xFFAE   Send data bank 1 address 12
USBT13           0xFFAF   Send data bank 1 address 13
USBT14           0xFFB0   Send data bank 1 address 14
USBT15           0xFFB1   Send data bank 1 address 15
USBT16           0xFFB2   Send data bank 1 address 16
USBT17           0xFFB3   Send data bank 1 address 17
RESERVEDFFB4     0xFFB4   RESERVED
USBRTP           0xFFB5   Receive token PID
USBRAL           0xFFB6   Receive token packet address L
USBRAH           0xFFB7   Receive token packet address H
IF0              0xFFE0   Interrupt request flag register 0
IF0.TMIF01        7   TMIF01 - Interrupt request flag
IF0.TMIF00        6   TMIF00 - Interrupt request flag
IF0.CSIF10        5   CSIF10 - Interrupt request flag
IF0.KRIF00        4   KRIF00 - Interrupt request flag
IF0.PIF0          1   PIF0   - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.USBTMIF       6   USBTMIF - Interrupt request flag
IF1.USBRTIF       5   USBRTIF - Interrupt request flag
IF1.USBRDIF       4   USBRDIF - Interrupt request flag
IF1.USBSTIF       3   USBSTIF - Interrupt request flag
IF1.USBREIF       2   USBREIF - Interrupt request flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.TMMK01        7   TMMK01  - Interrupt servicing control
MK0.TMMK00        6   TMMK00  - Interrupt servicing control
MK0.CSIMK10       5   CSIMK10 - Interrupt servicing control
MK0.KRMK00        4   KRMK00  - Interrupt servicing control
MK0.PMK0          1   PMK0    - Interrupt servicing control
MK0.TMMK4         0   TMMK4   - Interrupt servicing control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.USBTMMK       6   USBTMMK - Interrupt servicing control
MK1.USBRTMK       5   USBRTMK - Interrupt servicing control
MK1.USBRDMK       4   USBRDMK - Interrupt servicing control
MK1.USBSTMK       3   USBSTMK - Interrupt servicing control
MK1.USBREIF       2   USBREIF - Interrupt servicing control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES01        3   INTP0 valid edge selection bit 1
INTM0.ES00        2   INTP0 valid edge selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
KRM00            0xFFF5   Key return mode register 00
KRM00.KRM007      7   Key return signal detection selection for P47/KR07 pin
KRM00.KRM006      6   Key return signal detection selection for P46/KR06 pin
KRM00.KRM005      5   Key return signal detection selection for P45/KR05 pin
KRM00.KRM004      4   Key return signal detection selection for P44/KR04 pin
KRM00.KRM000      0
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU04          4   P4 on-chip pull-up resistor selection
PU0.PU02          2   P2 on-chip pull-up resistor selection
PU0.PU01          1   P1 on-chip pull-up resistor selection
PU0.PU00          0   P0 on-chip pull-up resistor selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Selection of operation of watchdog timer
WDTM.WDTM4        4   Selection of operation mode of watchdog timer bit 4
WDTM.WDTM3        3   Selection of operation mode of watchdog timer bit 3
OSTS             0xFFFA   Oscillation settling time select register
OSTS.OSTS2        2   Oscillation settling time selection bit
OSTS.OSTS1        1   Oscillation settling time selection bit
OSTS.OSTS0        0   Oscillation settling time selection bit
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789841
; U13776EJ2V0UM00.PDF, U13790EJ1V0PM00.PDF, U14852EE2V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x2000   Internal ROM
area BSS RESERVED   0x2000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFFAC   Special Function Register
area BSS RESERVED   0xFFAC:0xFFE0
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTP0_            0x0006   INTP0
interrupt INTP1_            0x0008   INTP1
interrupt INTTM7_           0x000A   INTTM7
interrupt INTSER00_         0x000C   INTSER00
interrupt INTSR00_          0x000E   INTSR00
interrupt INTST00_          0x0010   INTST00
interrupt INTWT_            0x0012   INTWT
interrupt INTWTI_           0x0014   INTWTI
interrupt INTTM80_          0x0016   INTTM80
interrupt INTTM81_          0x0018   INTTM81
interrupt INTTM82_          0x001A   INTTM82
interrupt INTAD_            0x001C   INTAD


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
RESERVEDFF05     0xFF05   RESERVED
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
BFCM0            0xFF08   10-bit buffer register 0
BFCM1            0xFF0A   10-bit buffer register 1
BFCM2            0xFF0C   10-bit buffer register 2
BFCM3            0xFF0E   10-bit buffer register 3
RESERVEDFF10     0xFF10   RESERVED
ADCRH            0xFF11   A/D conversion result register
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
CM0              0xFF14   10-bit compare register 0
CM1              0xFF16   10-bit compare register 1
CM2              0xFF18   10-bit compare register 2
CM3              0xFF1A   10-bit compare register 3
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 Pin I/O Mode Selection
PM0.PM06          6   P06 Pin I/O Mode Selection
PM0.PM05          5   P05 Pin I/O Mode Selection
PM0.PM04          4   P04 Pin I/O Mode Selection
PM0.PM03          3   P03 Pin I/O Mode Selection
PM0.PM02          2   P02 Pin I/O Mode Selection
PM0.PM01          1   P01 Pin I/O Mode Selection
PM0.PM00          0   P00 Pin I/O Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM17          7   P17 Pin I/O Mode Selection
PM1.PM16          6   P16 Pin I/O Mode Selection
PM1.PM15          5   P15 Pin I/O Mode Selection
PM1.PM14          4   P14 Pin I/O Mode Selection
PM1.PM13          3   P13 Pin I/O Mode Selection
PM1.PM12          2   P12 Pin I/O Mode Selection
PM1.PM11          1   P11 Pin I/O Mode Selection
PM1.PM10          0   P10 Pin I/O Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 Pin I/O Mode Selection
PM2.PM24          4   P24 Pin I/O Mode Selection
PM2.PM23          3   P23 Pin I/O Mode Selection
PM2.PM22          2   P22 Pin I/O Mode Selection
PM2.PM21          1   P21 Pin I/O Mode Selection
PM2.PM20          0   P20 Pin I/O Mode Selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 On-Chip Pull-Up Resistor Selection
PUB2.PUB24        4   P24 On-Chip Pull-Up Resistor Selection
PUB2.PUB23        3   P23 On-Chip Pull-Up Resistor Selection
PUB2.PUB22        2   P22 On-Chip Pull-Up Resistor Selection
PUB2.PUB21        1   P21 On-Chip Pull-Up Resistor Selection
PUB2.PUB20        0   P20 On-Chip Pull-Up Resistor Selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Watchdog Timer Count Clock Selection bit 2
TCL2.TCL21        1   Watchdog Timer Count Clock Selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM6          6   Prescaler Interval Selection bit 6
WTM.WTM5          5   Prescaler Interval Selection bit 5
WTM.WTM4          4   Prescaler Interval Selection bit 4
WTM.WTM1          1   Control of 5-Bit Counter Operation
WTM.WTM0          0   Watch Timer Operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE0        7   8-Bit Timer Counter 80 Operation Control
TMC80.TCL01       2   8-Bit Timer/Event Counter 80 Count Clock Selection bit 1
TMC80.TCL00       1   8-Bit Timer/Event Counter 80 Count Clock Selection bit 0
CR81             0xFF54   8-bit compare register 81
TM81             0xFF55   8-bit timer counter 81
RESERVEDFF56     0xFF56   RESERVED
TMC81            0xFF57   8-bit timer mode control register 81
TMC81.TCE1        7   8-Bit Timer Counter 81 Operation Control
TMC81.TCL11       2   8-Bit Timer/Event Counter 81 Count Clock Selection bit 1
TMC81.TCL10       1   8-Bit Timer/Event Counter 81 Count Clock Selection bit 0
CR82             0xFF58   8-bit compare register 82
TM82             0xFF59   8-bit timer counter 82
RESERVEDFF5A     0xFF5A   RESERVED
TMC82            0xFF5B   8-bit timer mode control register 82
TMC82.TCE2        7   8-Bit Timer Counter 82 Operation Control
TMC82.TCL21       2   8-Bit Timer Counter 82 Count Clock Selection bit 1
TMC82.TCL20       1   8-Bit Timer Counter 82 Count Clock Selection bit 0
TMC82.TOE2        0   8-Bit Timer 82 Output Control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7
ASIM00.RXE00      6
ASIM00.PS001      5   Parity Bit Specification bit 1
ASIM00.PS000      4   Parity Bit Specification bit 0
ASIM00.CL00       3   Character Length Specification
ASIM00.SL00       2   Transmission Data Stop Bit Length Specification
ASIM00.ISRM00     1   Reception Completion Interrupt Control at Error Occurrence
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2   Parity Error Flag
ASIS00.FE00       1   Framing Error Flag
ASIS00.OVE00      0   Overrun Error Flag
BRGC00           0xFF72   Baud rate generator control register 00
BRGC00.TPS002     6   5-Bit Counter Source Clock (fSCK) Selection bit 2
BRGC00.TPS001     5   5-Bit Counter Source Clock (fSCK) Selection bit 1
BRGC00.TPS000     4   5-Bit Counter Source Clock (fSCK) Selection bit 0
BRGC00.MDL003     3   Baud Rate Generator Input Clock Selection bit 3
BRGC00.MDL002     2   Baud Rate Generator Input Clock Selection bit 2
BRGC00.MDL001     1   Baud Rate Generator Input Clock Selection bit 1
BRGC00.MDL000     0   Baud Rate Generator Input Clock Selection bit 0
TXS00            0xFF73   Transmission shift register 00
RXB00            0xFF74   Reception buffer register 00
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM              0xFF80   A/D converter mode register
ADM.ADCS          7   A/D Conversion Control
ADM.FR2           5   A/D Conversion Time Selection bit 2
ADM.FR1           4   A/D Conversion Time Selection bit 1
ADM.FR0           3   A/D Conversion Time Selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS              0xFF84   A/D input selection register
ADS.ADS2          2   Analog Input Channel Specification bit 2
ADS.ADS1          1   Analog Input Channel Specification bit 1
ADS.ADS0          0   Analog Input Channel Specification bit 0
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
MULC1            0xFFA0   Multiplier control register 1
MULC1.MULSTA_MULSTS 0 Multiplier Operation Start Control Bit/Status of Multiplier
MRA1L            0xFFA1   10-bit multiplication data register A1L
MRA1L.MRA1L7      7
MRA1L.MRA1L6      6
MRA1L.MRA1L5      5
MRA1L.MRA1L4      4
MRA1L.MRA1L3      3
MRA1L.MRA1L2      2
MRA1L.MRA1L1      1
MRA1L.MRA1L0      0
MRA1H            0xFFA2   10-bit multiplication data register A1H
MRA1H.MRB1H1      1
MRA1H.MRB1H0      0
MRB1L            0xFFA3   10-bit multiplication data register B1L
MRB1L.MRB1L7      7
MRB1L.MRB1L6      6
MRB1L.MRB1L5      5
MRB1L.MRB1L4      4
MRB1L.MRB1L3      3
MRB1L.MRB1L2      2
MRB1L.MRB1L1      1
MRB1L.MRB1L0      0
MRB1H            0xFFA4   10-bit multiplication data register B1H
MRB1H.MRB1H1      1
MRB1H.MRB1H0      0
MUL1LL           0xFFA5   20-bit multiplication result register 1LL
MUL1LL.MUL1LL7    7
MUL1LL.MUL1LL6    6
MUL1LL.MUL1LL5    5
MUL1LL.MUL1LL4    4
MUL1LL.MUL1LL3    3
MUL1LL.MUL1LL2    2
MUL1LL.MUL1LL1    1
MUL1LL.MUL1LL0    0
MUL1LH           0xFFA6   20-bit multiplication result register 1LH
MUL1LH.MUL1LH7    7
MUL1LH.MUL1LH6    6
MUL1LH.MUL1LH5    5
MUL1LH.MUL1LH4    4
MUL1LH.MUL1LH3    3
MUL1LH.MUL1LH2    2
MUL1LH.MUL1LH1    1
MUL1LH.MUL1LH0    0
MUL1HL           0xFFA7   20-bit multiplication result register 1HL
MUL1HL.MUL1HL3    3
MUL1HL.MUL1HL2    2
MUL1HL.MUL1HL1    1
MUL1HL.MUL1HL0    0
TMC7             0xFFA8   Inverter timer control register 7
TMC7.CE7          7   Control of TM7, DTM0 to DTM2, RTM0
TMC7.TCL72        5   Count Clock Selection bit 2
TMC7.TCL71        4   Count Clock Selection bit 1
TMC7.TCL70        3   Count Clock Selection bit 0
TMC7.IDEV2        2   Selection of INTTM7 Generation Frequency bit 2
TMC7.IDEV1        1   Selection of INTTM7 Generation Frequency bit 1
TMC7.IDEV0        0   Selection of INTTM7 Generation Frequency bit 0
TMM7             0xFFA9   Inverter timer mode register 7
TMM7.PNOFFB       4   Flag Indicating Status of TM7 Output to TO70 to TO75
TMM7.ALV          3   Specification of Active Level of TO70 to TO75 Output
TMM7.TOEDG        2   Specification of Valid Edge of TOFF7
TMM7.TOSPP        1   Control of TO70 to TO75 Output Stop at Valid Edge
TMM7.TOSPW        0   Control of TO70 to TO75 Output Stop According to INTWDT
DTIME            0xFFAA   Dead time reload register
SWP0             0xFFAB   Swapping function register 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF    - Interrupt Request Flag
IF0.STIF00        6   STIF00  - Interrupt Request Flag
IF0.SRIF00        5   SRIF00  - Interrupt Request Flag
IF0.SERIF00       4   SERIF00 - Interrupt Request Flag
IF0.TMIF7         3   TMIF7   - Interrupt Request Flag
IF0.PIF1          2   PIF1    - Interrupt Request Flag
IF0.PIF0          1   PIF0    - Interrupt Request Flag
IF0.TMIF4         0   TMIF4   - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF          4   ADIF   - Interrupt Request Flag
IF1.TMIF82        3   TMIF82 - Interrupt Request Flag
IF1.TMIF81        2   TMIF81 - Interrupt Request Flag
IF1.TMIF80        1   TMIF80 - Interrupt Request Flag
IF1.WTIIF         0   WTIIF  - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK    - Interrupt Handling Control
MK0.STMK00        6   STMK00  - Interrupt Handling Control
MK0.SRMK00        5   SRMK00  - Interrupt Handling Control
MK0.SERMK00       4   SERMK00 - Interrupt Handling Control
MK0.TMMK7         3   TMMK7   - Interrupt Handling Control
MK0.PMK1          2   PMK1    - Interrupt Handling Control
MK0.PMK0          1   PMK0    - Interrupt Handling Control
MK0.TMMK4         0   TMMK4   - Interrupt Handling Control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK          4   ADMK   - Interrupt Handling Control
MK1.TMMK82        3   TMMK82 - Interrupt Handling Control
MK1.TMMK81        2   TMMK81 - Interrupt Handling Control
MK1.TMMK80        1   TMMK80 - Interrupt Handling Control
MK1.WTIMK         0   WTIMK  - Interrupt Handling Control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP0 Valid Edge Selection bit 1
INTM0.ES00        2   INTP0 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 On-Chip Pull-Up Resistor Selection
PU0.PU00          0   P0 On-Chip Pull-Up Resistor Selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog Timer Operation Selection
WDTM.WDTM4        4   Watchdog Timer Operation Mode Selection bit 4
WDTM.WDTM3        3   Watchdog Timer Operation Mode Selection bit 3
OSTS             0xFFFA   Oscillation settling time selection register
OSTS.OSTS2        2   Oscillation Stabilization Time Selection bit 2
OSTS.OSTS1        1   Oscillation Stabilization Time Selection bit 1
OSTS.OSTS0        0   Oscillation Stabilization Time Selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789842
; U13776EJ2V0UM00.PDF, U13790EJ1V0PM00.PDF, U14852EE2V0PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFFAC   Special Function Register
area BSS RESERVED   0xFFAC:0xFFE0
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT  
interrupt INTP0_            0x0006   INTP0   
interrupt INTP1_            0x0008   INTP1   
interrupt INTTM7_           0x000A   INTTM7  
interrupt INTSER00_         0x000C   INTSER00
interrupt INTSR00_          0x000E   INTSR00 
interrupt INTST00_          0x0010   INTST00 
interrupt INTWT_            0x0012   INTWT   
interrupt INTWTI_           0x0014   INTWTI  
interrupt INTTM80_          0x0016   INTTM80 
interrupt INTTM81_          0x0018   INTTM81 
interrupt INTTM82_          0x001A   INTTM82 
interrupt INTAD_            0x001C   INTAD   


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
RESERVEDFF05     0xFF05   RESERVED
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
BFCM0            0xFF08   10-bit buffer register 0
BFCM1            0xFF0A   10-bit buffer register 1
BFCM2            0xFF0C   10-bit buffer register 2
BFCM3            0xFF0E   10-bit buffer register 3
RESERVEDFF10     0xFF10   RESERVED
ADCRH            0xFF11   A/D conversion result register
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
CM0              0xFF14   10-bit compare register 0
CM1              0xFF16   10-bit compare register 1
CM2              0xFF18   10-bit compare register 2
CM3              0xFF1A   10-bit compare register 3
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 Pin I/O Mode Selection
PM0.PM06          6   P06 Pin I/O Mode Selection
PM0.PM05          5   P05 Pin I/O Mode Selection
PM0.PM04          4   P04 Pin I/O Mode Selection
PM0.PM03          3   P03 Pin I/O Mode Selection
PM0.PM02          2   P02 Pin I/O Mode Selection
PM0.PM01          1   P01 Pin I/O Mode Selection
PM0.PM00          0   P00 Pin I/O Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM17          7   P17 Pin I/O Mode Selection
PM1.PM16          6   P16 Pin I/O Mode Selection
PM1.PM15          5   P15 Pin I/O Mode Selection
PM1.PM14          4   P14 Pin I/O Mode Selection
PM1.PM13          3   P13 Pin I/O Mode Selection
PM1.PM12          2   P12 Pin I/O Mode Selection
PM1.PM11          1   P11 Pin I/O Mode Selection
PM1.PM10          0   P10 Pin I/O Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 Pin I/O Mode Selection
PM2.PM24          4   P24 Pin I/O Mode Selection
PM2.PM23          3   P23 Pin I/O Mode Selection
PM2.PM22          2   P22 Pin I/O Mode Selection
PM2.PM21          1   P21 Pin I/O Mode Selection
PM2.PM20          0   P20 Pin I/O Mode Selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 On-Chip Pull-Up Resistor Selection
PUB2.PUB24        4   P24 On-Chip Pull-Up Resistor Selection
PUB2.PUB23        3   P23 On-Chip Pull-Up Resistor Selection
PUB2.PUB22        2   P22 On-Chip Pull-Up Resistor Selection
PUB2.PUB21        1   P21 On-Chip Pull-Up Resistor Selection
PUB2.PUB20        0   P20 On-Chip Pull-Up Resistor Selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Watchdog Timer Count Clock Selection bit 2
TCL2.TCL21        1   Watchdog Timer Count Clock Selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM6          6   Prescaler Interval Selection bit 6
WTM.WTM5          5   Prescaler Interval Selection bit 5
WTM.WTM4          4   Prescaler Interval Selection bit 4
WTM.WTM1          1   Control of 5-Bit Counter Operation
WTM.WTM0          0   Watch Timer Operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE0        7   8-Bit Timer Counter 80 Operation Control
TMC80.TCL01       2   8-Bit Timer/Event Counter 80 Count Clock Selection bit 1
TMC80.TCL00       1   8-Bit Timer/Event Counter 80 Count Clock Selection bit 0
CR81             0xFF54   8-bit compare register 81
TM81             0xFF55   8-bit timer counter 81
RESERVEDFF56     0xFF56   RESERVED
TMC81            0xFF57   8-bit timer mode control register 81
TMC81.TCE1        7   8-Bit Timer Counter 81 Operation Control
TMC81.TCL11       2   8-Bit Timer/Event Counter 81 Count Clock Selection bit 1
TMC81.TCL10       1   8-Bit Timer/Event Counter 81 Count Clock Selection bit 0
CR82             0xFF58   8-bit compare register 82
TM82             0xFF59   8-bit timer counter 82
RESERVEDFF5A     0xFF5A   RESERVED
TMC82            0xFF5B   8-bit timer mode control register 82
TMC82.TCE2        7   8-Bit Timer Counter 82 Operation Control
TMC82.TCL21       2   8-Bit Timer Counter 82 Count Clock Selection bit 1
TMC82.TCL20       1   8-Bit Timer Counter 82 Count Clock Selection bit 0
TMC82.TOE2        0   8-Bit Timer 82 Output Control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7
ASIM00.RXE00      6
ASIM00.PS001      5   Parity Bit Specification bit 1
ASIM00.PS000      4   Parity Bit Specification bit 0
ASIM00.CL00       3   Character Length Specification
ASIM00.SL00       2   Transmission Data Stop Bit Length Specification
ASIM00.ISRM00     1   Reception Completion Interrupt Control at Error Occurrence
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2   Parity Error Flag
ASIS00.FE00       1   Framing Error Flag
ASIS00.OVE00      0   Overrun Error Flag
BRGC00           0xFF72   Baud rate generator control register 00
BRGC00.TPS002     6   5-Bit Counter Source Clock (fSCK) Selection bit 2
BRGC00.TPS001     5   5-Bit Counter Source Clock (fSCK) Selection bit 1
BRGC00.TPS000     4   5-Bit Counter Source Clock (fSCK) Selection bit 0
BRGC00.MDL003     3   Baud Rate Generator Input Clock Selection bit 3
BRGC00.MDL002     2   Baud Rate Generator Input Clock Selection bit 2
BRGC00.MDL001     1   Baud Rate Generator Input Clock Selection bit 1
BRGC00.MDL000     0   Baud Rate Generator Input Clock Selection bit 0
TXS00            0xFF73   Transmission shift register 00
RXB00            0xFF74   Reception buffer register 00
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM              0xFF80   A/D converter mode register
ADM.ADCS          7   A/D Conversion Control
ADM.FR2           5   A/D Conversion Time Selection bit 2
ADM.FR1           4   A/D Conversion Time Selection bit 1
ADM.FR0           3   A/D Conversion Time Selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS              0xFF84   A/D input selection register
ADS.ADS2          2   Analog Input Channel Specification bit 2
ADS.ADS1          1   Analog Input Channel Specification bit 1
ADS.ADS0          0   Analog Input Channel Specification bit 0
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
MULC1            0xFFA0   Multiplier control register 1
MULC1.MULSTA_MULSTS 0 Multiplier Operation Start Control Bit/Status of Multiplier
MRA1L            0xFFA1   10-bit multiplication data register A1L
MRA1L.MRA1L7      7
MRA1L.MRA1L6      6
MRA1L.MRA1L5      5
MRA1L.MRA1L4      4
MRA1L.MRA1L3      3
MRA1L.MRA1L2      2
MRA1L.MRA1L1      1
MRA1L.MRA1L0      0
MRA1H            0xFFA2   10-bit multiplication data register A1H
MRA1H.MRB1H1      1
MRA1H.MRB1H0      0
MRB1L            0xFFA3   10-bit multiplication data register B1L
MRB1L.MRB1L7      7
MRB1L.MRB1L6      6
MRB1L.MRB1L5      5
MRB1L.MRB1L4      4
MRB1L.MRB1L3      3
MRB1L.MRB1L2      2
MRB1L.MRB1L1      1
MRB1L.MRB1L0      0
MRB1H            0xFFA4   10-bit multiplication data register B1H
MRB1H.MRB1H1      1
MRB1H.MRB1H0      0
MUL1LL           0xFFA5   20-bit multiplication result register 1LL
MUL1LL.MUL1LL7    7
MUL1LL.MUL1LL6    6
MUL1LL.MUL1LL5    5
MUL1LL.MUL1LL4    4
MUL1LL.MUL1LL3    3
MUL1LL.MUL1LL2    2
MUL1LL.MUL1LL1    1
MUL1LL.MUL1LL0    0
MUL1LH           0xFFA6   20-bit multiplication result register 1LH
MUL1LH.MUL1LH7    7
MUL1LH.MUL1LH6    6
MUL1LH.MUL1LH5    5
MUL1LH.MUL1LH4    4
MUL1LH.MUL1LH3    3
MUL1LH.MUL1LH2    2
MUL1LH.MUL1LH1    1
MUL1LH.MUL1LH0    0
MUL1HL           0xFFA7   20-bit multiplication result register 1HL
MUL1HL.MUL1HL3    3
MUL1HL.MUL1HL2    2
MUL1HL.MUL1HL1    1
MUL1HL.MUL1HL0    0
TMC7             0xFFA8   Inverter timer control register 7
TMC7.CE7          7   Control of TM7, DTM0 to DTM2, RTM0
TMC7.TCL72        5   Count Clock Selection bit 2
TMC7.TCL71        4   Count Clock Selection bit 1
TMC7.TCL70        3   Count Clock Selection bit 0
TMC7.IDEV2        2   Selection of INTTM7 Generation Frequency bit 2
TMC7.IDEV1        1   Selection of INTTM7 Generation Frequency bit 1
TMC7.IDEV0        0   Selection of INTTM7 Generation Frequency bit 0
TMM7             0xFFA9   Inverter timer mode register 7
TMM7.PNOFFB       4   Flag Indicating Status of TM7 Output to TO70 to TO75
TMM7.ALV          3   Specification of Active Level of TO70 to TO75 Output
TMM7.TOEDG        2   Specification of Valid Edge of TOFF7
TMM7.TOSPP        1   Control of TO70 to TO75 Output Stop at Valid Edge
TMM7.TOSPW        0   Control of TO70 to TO75 Output Stop According to INTWDT
DTIME            0xFFAA   Dead time reload register
SWP0             0xFFAB   Swapping function register 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF    - Interrupt Request Flag
IF0.STIF00        6   STIF00  - Interrupt Request Flag
IF0.SRIF00        5   SRIF00  - Interrupt Request Flag
IF0.SERIF00       4   SERIF00 - Interrupt Request Flag
IF0.TMIF7         3   TMIF7   - Interrupt Request Flag
IF0.PIF1          2   PIF1    - Interrupt Request Flag
IF0.PIF0          1   PIF0    - Interrupt Request Flag
IF0.TMIF4         0   TMIF4   - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF          4   ADIF   - Interrupt Request Flag
IF1.TMIF82        3   TMIF82 - Interrupt Request Flag
IF1.TMIF81        2   TMIF81 - Interrupt Request Flag
IF1.TMIF80        1   TMIF80 - Interrupt Request Flag
IF1.WTIIF         0   WTIIF  - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK    - Interrupt Handling Control
MK0.STMK00        6   STMK00  - Interrupt Handling Control
MK0.SRMK00        5   SRMK00  - Interrupt Handling Control
MK0.SERMK00       4   SERMK00 - Interrupt Handling Control
MK0.TMMK7         3   TMMK7   - Interrupt Handling Control
MK0.PMK1          2   PMK1    - Interrupt Handling Control
MK0.PMK0          1   PMK0    - Interrupt Handling Control
MK0.TMMK4         0   TMMK4   - Interrupt Handling Control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK          4   ADMK   - Interrupt Handling Control
MK1.TMMK82        3   TMMK82 - Interrupt Handling Control
MK1.TMMK81        2   TMMK81 - Interrupt Handling Control
MK1.TMMK80        1   TMMK80 - Interrupt Handling Control
MK1.WTIMK         0   WTIMK  - Interrupt Handling Control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP0 Valid Edge Selection bit 1
INTM0.ES00        2   INTP0 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 On-Chip Pull-Up Resistor Selection
PU0.PU00          0   P0 On-Chip Pull-Up Resistor Selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog Timer Operation Selection
WDTM.WDTM4        4   Watchdog Timer Operation Mode Selection bit 4
WDTM.WDTM3        3   Watchdog Timer Operation Mode Selection bit 3
OSTS             0xFFFA   Oscillation settling time selection register
OSTS.OSTS2        2   Oscillation Stabilization Time Selection bit 2
OSTS.OSTS1        1   Oscillation Stabilization Time Selection bit 1
OSTS.OSTS0        0   Oscillation Stabilization Time Selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78F9842
; U13776EJ2V0UM00.PDF, U13901EJ1V0PM00.PDF, U14852EE2V0PL00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x4000   Internal Flash Memory
area BSS RESERVED   0x4000:0xFE00
area DATA RAM_      0xFE00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFFAC   Special Function Register
area BSS RESERVED   0xFFAC:0xFFE0
area DATA FSR_2     0xFFE0:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT  
interrupt INTP0_            0x0006   INTP0   
interrupt INTP1_            0x0008   INTP1   
interrupt INTTM7_           0x000A   INTTM7  
interrupt INTSER00_         0x000C   INTSER00
interrupt INTSR00_          0x000E   INTSR00 
interrupt INTST00_          0x0010   INTST00 
interrupt INTWT_            0x0012   INTWT   
interrupt INTWTI_           0x0014   INTWTI  
interrupt INTTM80_          0x0016   INTTM80 
interrupt INTTM81_          0x0018   INTTM81 
interrupt INTTM82_          0x001A   INTTM82 
interrupt INTAD_            0x001C   INTAD   


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
RESERVEDFF05     0xFF05   RESERVED
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
BFCM0            0xFF08   10-bit buffer register 0
BFCM1            0xFF0A   10-bit buffer register 1
BFCM2            0xFF0C   10-bit buffer register 2
BFCM3            0xFF0E   10-bit buffer register 3
RESERVEDFF10     0xFF10   RESERVED
ADCRH            0xFF11   A/D conversion result register
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
CM0              0xFF14   10-bit compare register 0
CM1              0xFF16   10-bit compare register 1
CM2              0xFF18   10-bit compare register 2
CM3              0xFF1A   10-bit compare register 3
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 Pin I/O Mode Selection
PM0.PM06          6   P06 Pin I/O Mode Selection
PM0.PM05          5   P05 Pin I/O Mode Selection
PM0.PM04          4   P04 Pin I/O Mode Selection
PM0.PM03          3   P03 Pin I/O Mode Selection
PM0.PM02          2   P02 Pin I/O Mode Selection
PM0.PM01          1   P01 Pin I/O Mode Selection
PM0.PM00          0   P00 Pin I/O Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM17          7   P17 Pin I/O Mode Selection
PM1.PM16          6   P16 Pin I/O Mode Selection
PM1.PM15          5   P15 Pin I/O Mode Selection
PM1.PM14          4   P14 Pin I/O Mode Selection
PM1.PM13          3   P13 Pin I/O Mode Selection
PM1.PM12          2   P12 Pin I/O Mode Selection
PM1.PM11          1   P11 Pin I/O Mode Selection
PM1.PM10          0   P10 Pin I/O Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM25          5   P25 Pin I/O Mode Selection
PM2.PM24          4   P24 Pin I/O Mode Selection
PM2.PM23          3   P23 Pin I/O Mode Selection
PM2.PM22          2   P22 Pin I/O Mode Selection
PM2.PM21          1   P21 Pin I/O Mode Selection
PM2.PM20          0   P20 Pin I/O Mode Selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB25        5   P25 On-Chip Pull-Up Resistor Selection
PUB2.PUB24        4   P24 On-Chip Pull-Up Resistor Selection
PUB2.PUB23        3   P23 On-Chip Pull-Up Resistor Selection
PUB2.PUB22        2   P22 On-Chip Pull-Up Resistor Selection
PUB2.PUB21        1   P21 On-Chip Pull-Up Resistor Selection
PUB2.PUB20        0   P20 On-Chip Pull-Up Resistor Selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Watchdog Timer Count Clock Selection bit 2
TCL2.TCL21        1   Watchdog Timer Count Clock Selection bit 1
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
WTM              0xFF4A   Watch timer mode control register
WTM.WTM6          6   Prescaler Interval Selection bit 6
WTM.WTM5          5   Prescaler Interval Selection bit 5
WTM.WTM4          4   Prescaler Interval Selection bit 4
WTM.WTM1          1   Control of 5-Bit Counter Operation
WTM.WTM0          0   Watch Timer Operation
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR80             0xFF50   8-bit compare register 80
TM80             0xFF51   8-bit timer counter 80
RESERVEDFF52     0xFF52   RESERVED
TMC80            0xFF53   8-bit timer mode control register 80
TMC80.TCE0        7   8-Bit Timer Counter 80 Operation Control
TMC80.TCL01       2   8-Bit Timer/Event Counter 80 Count Clock Selection bit 1
TMC80.TCL00       1   8-Bit Timer/Event Counter 80 Count Clock Selection bit 0
CR81             0xFF54   8-bit compare register 81
TM81             0xFF55   8-bit timer counter 81
RESERVEDFF56     0xFF56   RESERVED
TMC81            0xFF57   8-bit timer mode control register 81
TMC81.TCE1        7   8-Bit Timer Counter 81 Operation Control
TMC81.TCL11       2   8-Bit Timer/Event Counter 81 Count Clock Selection bit 1
TMC81.TCL10       1   8-Bit Timer/Event Counter 81 Count Clock Selection bit 0
CR82             0xFF58   8-bit compare register 82
TM82             0xFF59   8-bit timer counter 82
RESERVEDFF5A     0xFF5A   RESERVED
TMC82            0xFF5B   8-bit timer mode control register 82
TMC82.TCE2        7   8-Bit Timer Counter 82 Operation Control
TMC82.TCL21       2   8-Bit Timer Counter 82 Count Clock Selection bit 1
TMC82.TCL20       1   8-Bit Timer Counter 82 Count Clock Selection bit 0
TMC82.TOE2        0   8-Bit Timer 82 Output Control
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
RESERVEDFF66     0xFF66   RESERVED
RESERVEDFF67     0xFF67   RESERVED
RESERVEDFF68     0xFF68   RESERVED
RESERVEDFF69     0xFF69   RESERVED
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
ASIM00           0xFF70   Asynchronous serial interface mode register 00
ASIM00.TXE00      7
ASIM00.RXE00      6
ASIM00.PS001      5   Parity Bit Specification bit 1
ASIM00.PS000      4   Parity Bit Specification bit 0
ASIM00.CL00       3   Character Length Specification
ASIM00.SL00       2   Transmission Data Stop Bit Length Specification
ASIM00.ISRM00     1   Reception Completion Interrupt Control at Error Occurrence
ASIS00           0xFF71   Asynchronous serial interface status register 00
ASIS00.PE00       2   Parity Error Flag
ASIS00.FE00       1   Framing Error Flag
ASIS00.OVE00      0   Overrun Error Flag
BRGC00           0xFF72   Baud rate generator control register 00
BRGC00.TPS002     6   5-Bit Counter Source Clock (fSCK) Selection bit 2
BRGC00.TPS001     5   5-Bit Counter Source Clock (fSCK) Selection bit 1
BRGC00.TPS000     4   5-Bit Counter Source Clock (fSCK) Selection bit 0
BRGC00.MDL003     3   Baud Rate Generator Input Clock Selection bit 3
BRGC00.MDL002     2   Baud Rate Generator Input Clock Selection bit 2
BRGC00.MDL001     1   Baud Rate Generator Input Clock Selection bit 1
BRGC00.MDL000     0   Baud Rate Generator Input Clock Selection bit 0
TXS00            0xFF73   Transmission shift register 00
RXB00            0xFF74   Reception buffer register 00
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM              0xFF80   A/D converter mode register
ADM.ADCS          7   A/D Conversion Control
ADM.FR2           5   A/D Conversion Time Selection bit 2
ADM.FR1           4   A/D Conversion Time Selection bit 1
ADM.FR0           3   A/D Conversion Time Selection bit 0
RESERVEDFF81     0xFF81   RESERVED
RESERVEDFF82     0xFF82   RESERVED
RESERVEDFF83     0xFF83   RESERVED
ADS              0xFF84   A/D input selection register
ADS.ADS2          2   Analog Input Channel Specification bit 2
ADS.ADS1          1   Analog Input Channel Specification bit 1
ADS.ADS0          0   Analog Input Channel Specification bit 0
RESERVEDFF85     0xFF85   RESERVED
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
RESERVEDFF88     0xFF88   RESERVED
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
RESERVEDFF90     0xFF90   RESERVED
RESERVEDFF91     0xFF91   RESERVED
RESERVEDFF92     0xFF92   RESERVED
RESERVEDFF93     0xFF93   RESERVED
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
MULC1            0xFFA0   Multiplier control register 1
MULC1.MULSTA_MULSTS 0 Multiplier Operation Start Control Bit/Status of Multiplier
MRA1L            0xFFA1   10-bit multiplication data register A1L
MRA1L.MRA1L7      7
MRA1L.MRA1L6      6
MRA1L.MRA1L5      5
MRA1L.MRA1L4      4
MRA1L.MRA1L3      3
MRA1L.MRA1L2      2
MRA1L.MRA1L1      1
MRA1L.MRA1L0      0
MRA1H            0xFFA2   10-bit multiplication data register A1H
MRA1H.MRB1H1      1
MRA1H.MRB1H0      0
MRB1L            0xFFA3   10-bit multiplication data register B1L
MRB1L.MRB1L7      7
MRB1L.MRB1L6      6
MRB1L.MRB1L5      5
MRB1L.MRB1L4      4
MRB1L.MRB1L3      3
MRB1L.MRB1L2      2
MRB1L.MRB1L1      1
MRB1L.MRB1L0      0
MRB1H            0xFFA4   10-bit multiplication data register B1H
MRB1H.MRB1H1      1
MRB1H.MRB1H0      0
MUL1LL           0xFFA5   20-bit multiplication result register 1LL
MUL1LL.MUL1LL7    7
MUL1LL.MUL1LL6    6
MUL1LL.MUL1LL5    5
MUL1LL.MUL1LL4    4
MUL1LL.MUL1LL3    3
MUL1LL.MUL1LL2    2
MUL1LL.MUL1LL1    1
MUL1LL.MUL1LL0    0
MUL1LH           0xFFA6   20-bit multiplication result register 1LH
MUL1LH.MUL1LH7    7
MUL1LH.MUL1LH6    6
MUL1LH.MUL1LH5    5
MUL1LH.MUL1LH4    4
MUL1LH.MUL1LH3    3
MUL1LH.MUL1LH2    2
MUL1LH.MUL1LH1    1
MUL1LH.MUL1LH0    0
MUL1HL           0xFFA7   20-bit multiplication result register 1HL
MUL1HL.MUL1HL3    3
MUL1HL.MUL1HL2    2
MUL1HL.MUL1HL1    1
MUL1HL.MUL1HL0    0
TMC7             0xFFA8   Inverter timer control register 7
TMC7.CE7          7   Control of TM7, DTM0 to DTM2, RTM0
TMC7.TCL72        5   Count Clock Selection bit 2
TMC7.TCL71        4   Count Clock Selection bit 1
TMC7.TCL70        3   Count Clock Selection bit 0
TMC7.IDEV2        2   Selection of INTTM7 Generation Frequency bit 2
TMC7.IDEV1        1   Selection of INTTM7 Generation Frequency bit 1
TMC7.IDEV0        0   Selection of INTTM7 Generation Frequency bit 0
TMM7             0xFFA9   Inverter timer mode register 7
TMM7.PNOFFB       4   Flag Indicating Status of TM7 Output to TO70 to TO75
TMM7.ALV          3   Specification of Active Level of TO70 to TO75 Output
TMM7.TOEDG        2   Specification of Valid Edge of TOFF7
TMM7.TOSPP        1   Control of TO70 to TO75 Output Stop at Valid Edge
TMM7.TOSPW        0   Control of TO70 to TO75 Output Stop According to INTWDT
DTIME            0xFFAA   Dead time reload register
SWP0             0xFFAB   Swapping function register 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.WTIF          7   WTIF    - Interrupt Request Flag
IF0.STIF00        6   STIF00  - Interrupt Request Flag
IF0.SRIF00        5   SRIF00  - Interrupt Request Flag
IF0.SERIF00       4   SERIF00 - Interrupt Request Flag
IF0.TMIF7         3   TMIF7   - Interrupt Request Flag
IF0.PIF1          2   PIF1    - Interrupt Request Flag
IF0.PIF0          1   PIF0    - Interrupt Request Flag
IF0.TMIF4         0   TMIF4   - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.ADIF          4   ADIF   - Interrupt Request Flag
IF1.TMIF82        3   TMIF82 - Interrupt Request Flag
IF1.TMIF81        2   TMIF81 - Interrupt Request Flag
IF1.TMIF80        1   TMIF80 - Interrupt Request Flag
IF1.WTIIF         0   WTIIF  - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.WTMK          7   WTMK    - Interrupt Handling Control
MK0.STMK00        6   STMK00  - Interrupt Handling Control
MK0.SRMK00        5   SRMK00  - Interrupt Handling Control
MK0.SERMK00       4   SERMK00 - Interrupt Handling Control
MK0.TMMK7         3   TMMK7   - Interrupt Handling Control
MK0.PMK1          2   PMK1    - Interrupt Handling Control
MK0.PMK0          1   PMK0    - Interrupt Handling Control
MK0.TMMK4         0   TMMK4   - Interrupt Handling Control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.ADMK          4   ADMK   - Interrupt Handling Control
MK1.TMMK82        3   TMMK82 - Interrupt Handling Control
MK1.TMMK81        2   TMMK81 - Interrupt Handling Control
MK1.TMMK80        1   TMMK80 - Interrupt Handling Control
MK1.WTIMK         0   WTIMK  - Interrupt Handling Control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register 0
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP0 Valid Edge Selection bit 1
INTM0.ES00        2   INTP0 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
PU0              0xFFF7   Pull-up resistor option register 0
PU0.PU01          1   P1 On-Chip Pull-Up Resistor Selection
PU0.PU00          0   P0 On-Chip Pull-Up Resistor Selection
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog Timer Operation Selection
WDTM.WDTM4        4   Watchdog Timer Operation Mode Selection bit 4
WDTM.WDTM3        3   Watchdog Timer Operation Mode Selection bit 3
OSTS             0xFFFA   Oscillation settling time selection register
OSTS.OSTS2        2   Oscillation Stabilization Time Selection bit 2
OSTS.OSTS1        1   Oscillation Stabilization Time Selection bit 1
OSTS.OSTS0        0   Oscillation Stabilization Time Selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789850_A
; U14340EJ2V0PM00.PDF, U14403EJ2V0UM00.PDF, U14695EE2V1PL00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xF100
area DATA CAN_      0xF100:0xF200   CAN message storage RAM
area BSS RESERVED   0xF200:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTAD1_           0x0006   INTAD1
interrupt INTP0_            0x0008   INTP0
interrupt INTP1_            0x000A   INTP1
interrupt INTCE_            0x000C   INTCE
interrupt INTCR_            0x000E   INTCR
interrupt INTCT0_           0x0010   INTCT0
interrupt INTCT1_           0x0012   INTCT1
interrupt INTTM00_          0x0014   INTTM00
interrupt INTTM01_          0x0016   INTTM01
interrupt INTTM5_           0x0018   INTTM5
interrupt INTCSI2_          0x001A   INTCSI2
interrupt INTSRE0_          0x001C   INTSRE0
interrupt INTSR0_           0x001E   INTSR0
interrupt INTST0_           0x0020   INTST0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
RESERVEDFF05     0xFF05   RESERVED
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
TM0              0xFF14   16-bit timer/counter register 0
CR00             0xFF16   16-bit capture/compare register 00
CR01             0xFF18   16-bit capture/compare register 01
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM04          4   P04 Pin Input/Output Mode Selection
PM0.PM03          3   P03 Pin Input/Output Mode Selection
PM0.PM02          2   P02 Pin Input/Output Mode Selection
PM0.PM01          1   P01 Pin Input/Output Mode Selection
PM0.PM00          0   P00 Pin Input/Output Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM10          0   P10 Pin Input/Output Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM27          7   P27 Pin Input/Output Mode Selection
PM2.PM26          6   P26 Pin Input/Output Mode Selection
PM2.PM25          5   P25 Pin Input/Output Mode Selection
PM2.PM24          4   P24 Pin Input/Output Mode Selection
PM2.PM23          3   P23 Pin Input/Output Mode Selection
PM2.PM22          2   P22 Pin Input/Output Mode Selection
PM2.PM21          1   P21 Pin Input/Output Mode Selection
PM2.PM20          0   P20 Pin Input/Output Mode Selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
PUB0             0xFF30   Pull-up resistor option register B0
PUB0.PUB04        4   P04 Pin Pull-Up Resistor Selection
PUB0.PUB03        3   P03 Pin Pull-Up Resistor Selection
PUB0.PUB02        2   P02 Pin Pull-Up Resistor Selection
PUB0.PUB01        1   P01 Pin Pull-Up Resistor Selection
PUB0.PUB00        0   P00 Pin Pull-Up Resistor Selection
PUB1             0xFF31   Pull-up resistor option register B1
PUB1.PUB10        0   P10 Pin Pull-Up Resistor Selection
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB27        7   P27 Pin Pull-Up Resistor Selection
PUB2.PUB26        6   P26 Pin Pull-Up Resistor Selection
PUB2.PUB25        5   P25 Pin Pull-Up Resistor Selection
PUB2.PUB24        4   P24 Pin Pull-Up Resistor Selection
PUB2.PUB23        3   P23 Pin Pull-Up Resistor Selection
PUB2.PUB22        2   P22 Pin Pull-Up Resistor Selection
PUB2.PUB21        1   P21 Pin Pull-Up Resistor Selection
PUB2.PUB20        0   P20 Pin Pull-Up Resistor Selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Watchdog Timer Count Clock Selection bit 2
WDCS.WDCS1        1   Watchdog Timer Count Clock Selection bit 1
WDCS.WDCS0        0   Watchdog Timer Count Clock Selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
PBS              0xFF50   Clock output control register
PBS.CLOE          4   PCL Output Control
PBS.CCS1          1   PCL Output Clock Selection bit 1
PBS.CCS0          0   PCL Output Clock Selection bit 0
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
TMC0             0xFF66   16-bit timer mode control register
TMC0.TMC03        3
TMC0.TMC02        2
TMC0.TMC01        1
TMC0.OVF0         0
PRM0             0xFF67   Prescaler mode register
PRM0.ES01         5   TI00 Valid Edge Selection bit 1
PRM0.ES00         4   TI00 Valid Edge Selection bit 0
PRM0.PRM01        1   Count Clock Selection bit 1
PRM0.PRM00        0   Count Clock Selection bit 0
CRC0             0xFF68   Capture/compare control register
CRC0.CRC02        2   CR01 Operation Mode Selection
CRC0.CRC01        1   CR00 Capture Trigger Selection
CRC0.CRC00        0   CR00 Operation Mode Selection
TOC0             0xFF69   Timer output control register
TOC0.OSPT         6   Control of One-Shot Pulse Output Trigger by Software
TOC0.OSPE0        5   One-Shot Pulse Output Control
TOC0.TOC04        4   Timer Output F/F Control by Match of CR01 and TM0
TOC0.LVS0         3   16-Bit Timer/Event Counter Timer Output F/F Status Setting
TOC0.LVR0         2   16-Bit Timer/Event Counter Timer Output F/F Status Setting
TOC0.TOC01        1   Timer Output F/F Control by Match of CR00 and TM0
TOC0.TOE0         0   16-Bit Timer/Event Counter 0 (TM0) Output Control
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
TM5              0xFF70   8-bit counter
CR5              0xFF71   8-bit compare register
TCL5             0xFF72   Timer clock selection register
TCL5.TCL52        2   Selection of 8-Bit Counter Count Clock bit 2
TCL5.TCL51        1   Selection of 8-Bit Counter Count Clock bit 1
TCL5.TCL50        0   Selection of 8-Bit Counter Count Clock bit 0
TMC5             0xFF73   8-bit timer mode control register
TMC5.TCE5         7   TM5 Count Operation Control
TMC5.TMC56        6   TM5 Operation Mode Selection
TMC5.LVS5         3   Timer Output F/F Status Setting
TMC5.LVR5         2   Timer Output F/F Status Setting
TMC5.TMC51        1   Other than PWM Mode
TMC5.TOE5         0   Timer Output Control
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM              0xFF80   A/D converter mode register
ADM.ADCS          7   A/D Conversion Operation Control
ADM.FR2           5   Conversion Time Selection bit 2
ADM.FR1           4   Conversion Time Selection bit 1
ADM.FR0           3   Conversion Time Selection bit 0
ADS              0xFF81   Analog input channel specification register
ADS.ADS1          1   Analog Input Channel Specification bit 1
ADS.ADS0          0   Analog Input Channel Specification bit 0
PFM              0xFF82   Power-fail compare mode register
PFM.PFEN          7   Power-Fail Comparison Enable
PFM.PFCM          6   Power-Fail Compare Mode Selection
PFT              0xFF83   Power-fail compare threshold value register
PFT.PFT7          7
PFT.PFT6          6
PFT.PFT5          5
PFT.PFT4          4
PFT.PFT3          3
PFT.PFT2          2
PFT.PFT1          1
PFT.PFT0          0
RESERVEDFF84     0xFF84   RESERVED
ADCR             0xFF85   A/D conversion result register
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
DAM1             0xFF88   D/A converter mode register 1
DAM1.DACE         0   Reference Voltage Control
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
CSIM2            0xFF90   Serial operation mode register
CSIM2.CSIE        7   SIO2 Operation Enable/Disable Specification
CSIM2.TRMD        6   SIO2 Operation Setting
CSIM2.CKP         3   Serial Clock Phase Selection
CSIM2.DAP         2   Data Phase Selection
CSIM2.CKS1        1   Serial Transfer Operating Clock Selection bit 1
CSIM2.CKS0        0   Serial Transfer Operating Clock Selection bit 0
SIO2             0xFF91   Serial I/O shift register
SIRB2            0xFF92   Serial interface receive buffer register
SIRS2            0xFF93   Serial interface receive buffer status register
SIRS2.RBST        1   Receive Buffer Status Flag
SIRS2.RBOV        0   Receive Buffer Overrun Error Flag
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
ASIM0            0xFFA0   Asynchronous serial interface mode register
ASIM0.POWER       7   Operation Mode Specification
ASIM0.TXE         6
ASIM0.RXE         5
ASIM0.PS1         4   Parity Bit Specification bit 1
ASIM0.PS0         3   Parity Bit Specification bit 0
ASIM0.CL          2   Character Length Specification
ASIM0.SL          1   Transmit Data Stop Bit Length Specification
ASIM0.ISRM        0   Reception End Interrupt Control upon Occurrence of Error
BRGC0            0xFFA1   Baud rate generator control register
BRGC0.TPS1        7   Input Clock (fXCLK) Selection bit 1
BRGC0.TPS0        6   Input Clock (fXCLK) Selection bit 0
BRGC0.MDL4        4   5-Bit Counter Divide Value Selection bit 4
BRGC0.MDL3        3   5-Bit Counter Divide Value Selection bit 3
BRGC0.MDL2        2   5-Bit Counter Divide Value Selection bit 2
BRGC0.MDL1        1   5-Bit Counter Divide Value Selection bit 1
BRGC0.MDL0        0   5-Bit Counter Divide Value Selection bit 0
RXB0             0xFFA2   Receive buffer register
ASIS0            0xFFA3   Asynchronous serial interface status register
ASIS0.PE          2   Parity Error Flag
ASIS0.FE          1   Framing Error Flag
ASIS0.OVE         0   Overrun Error Flag
TXS0             0xFFA4   Transmit shift register
RESERVEDFFA5     0xFFA5   RESERVED
RESERVEDFFA6     0xFFA6   RESERVED
RESERVEDFFA7     0xFFA7   RESERVED
RESERVEDFFA8     0xFFA8   RESERVED
RESERVEDFFA9     0xFFA9   RESERVED
RESERVEDFFAA     0xFFAA   RESERVED
RESERVEDFFAB     0xFFAB   RESERVED
RESERVEDFFAC     0xFFAC   RESERVED
RESERVEDFFAD     0xFFAD   RESERVED
RESERVEDFFAE     0xFFAE   RESERVED
RESERVEDFFAF     0xFFAF   RESERVED
DCANC0           0xFFB0   DCAN control register
DCANC0.DCANEN     0   DCAN Control Operation Enable/Disable
CANC0            0xFFB1   CAN control register
CANC0.RxF         7   DCAN Reception Status Flag
CANC0.TxF         6   DCAN Transmission Status Flag
CANC0.SOFE        4   SOFOUT Operation Setting Flag
CANC0.SOFSEL      3   SOFOUT Output Type Selection Flag
CANC0.SLEEP       2   DCAN Sleep/Stop Mode Request Flag
CANC0.STP         1   Sleep/Stop Mode Selection Flag
CANC0.INIT        0   Initialization Mode Setting Flag
TCR0             0xFFB2   Transmit control register
TCR0.TXP          7   Transmit Buffer Priority Setting
TCR0.TXC1         5   Transmission Complete Flag bit 1
TCR0.TXC0         4   Transmission Complete Flag bit 0
TCR0.TXA1         3   Transmission Abort Flag bit 1
TCR0.TXA0         2   Transmission Abort Flag bit 0
TCR0.TXRQ1        1   Transmit Request Flag bit 1
TCR0.TXRQ0        0   Transmit Request Flag bit 0
RMES0            0xFFB3   Receive message register
RMES0.DN7         7   DN Bit of Message 7
RMES0.DN6         6   DN Bit of Message 6
RMES0.DN5         5   DN Bit of Message 5
RMES0.DN4         4   DN Bit of Message 4
RMES0.DN3         3   DN Bit of Message 3
RMES0.DN2         2   DN Bit of Message 2
RMES0.DN1         1   DN Bit of Message 1
RMES0.DN0         0   DN Bit of Message 0
REDEF0           0xFFB4   Redefinition control register
REDEF0.DEFEN      7   Redefinition Enable Flag
REDEF0.DEFSEL3    3   Selection of Receive Message Buffer bit 3
REDEF0.DEFSEL2    2   Selection of Receive Message Buffer bit 2
REDEF0.DEFSEL1    1   Selection of Receive Message Buffer bit 1
REDEF0.DEFSEL0    0   Selection of Receive Message Buffer bit 0
CANES0           0xFFB5   CAN error status register
CANES0.BOFF       7   Bus Off Flag
CANES0.RECS       6   Receive Error Passive Warning Flag
CANES0.TECS       5   Transmit Error Passive Warning Flag
CANES0.INITSTATE  3   Initialization Mode Status Confirmation Flag
CANES0.VALID      2   Valid Protocol Detection Confirmation Flag
CANES0.WAKE       1   Wakeup Status Confirmation Flag
CANES0.OVER       0   Overrun Flag
TEC0             0xFFB6   Transmit error counter
TEC0.TEC7         7
TEC0.TEC6         6
TEC0.TEC5         5
TEC0.TEC4         4
TEC0.TEC3         3
TEC0.TEC2         2
TEC0.TEC1         1
TEC0.TEC0         0
REC0             0xFFB7   Receive error counter
REC0.REC7         7
REC0.REC6         6
REC0.REC5         5
REC0.REC4         4
REC0.REC3         3
REC0.REC2         2
REC0.REC1         1
REC0.REC0         0
MCNT0            0xFFB8   Message count register
MCNT0.TLRES       5   DCAN Message Buffer Area Address Setting
MCNT0.MCNT4       4   Number of Receive Messages 4
MCNT0.MCNT3       3   Number of Receive Messages 3
MCNT0.MCNT2       2   Number of Receive Messages 2
MCNT0.MCNT1       1   Number of Receive Messages 1
MCNT0.MCNT0       0   Number of Receive Messages 0
BRPRS0           0xFFB9   Bit rate prescaler setting register
BRPRS0.PRM1       7   DCAN Clock Selection bit 1
BRPRS0.PRM0       6   DCAN Clock Selection bit 0
BRPRS0.BRPRS5     5   Bit Rate Prescaler bit 5
BRPRS0.BRPRS4     4   Bit Rate Prescaler bit 4
BRPRS0.BRPRS3     3   Bit Rate Prescaler bit 3
BRPRS0.BRPRS2     2   Bit Rate Prescaler bit 2
BRPRS0.BRPRS1     1   Bit Rate Prescaler bit 1
BRPRS0.BRPRS0     0   Bit Rate Prescaler bit 0
SYNC00           0xFFBA   Synchronized control register 0
SYNC00.SPT2       7   Setting of Sampling Point in CAN Data Bit Timing bit 2
SYNC00.SPT1       6   Setting of Sampling Point in CAN Data Bit Timing bit 1
SYNC00.SPT0       5   Setting of Sampling Point in CAN Data Bit Timing bit 0
SYNC00.DBT4       4   Bit Length of 1 Data bit 4
SYNC00.DBT3       3   Bit Length of 1 Data bit 3
SYNC00.DBT2       2   Bit Length of 1 Data bit 2
SYNC00.DBT1       1   Bit Length of 1 Data bit 1
SYNC00.DBT0       0   Bit Length of 1 Data bit 0
SYNC01           0xFFBB   Synchronized control register 1
SYNC01.SOFC       6   SOFOUT Function (SOFE Flag Operation) Setting
SYNC01.SAMP       5   Setting of Sampling Times at Sampling Point
SYNC01.RXONLY     4   Receive Operation Setting
SYNC01.SJW1       3   SJW Setting bit 1
SYNC01.SJW0       2   SJW Setting bit 0
SYNC01.SPT4       1   Setting of Sampling Point in CAN Data Bit Timing bit 4
SYNC01.SPT3       0   Setting of Sampling Point in CAN Data Bit Timing bit 3
MASKC0           0xFFBC   Mask control register
MASKC0.SSHT       5   Single Shot Mode Setting
MASKC0.AL         4   Setting of Operation in Case of Arbitration Defeat in Single Shot Mode
MASKC0.GLOBAL     2   Global Mask Function Setting
MASKC0.MSK1       1   Mask Buffer 1 Setting
MASKC0.MSK0       0   Mask Buffer 0 Setting
RESERVEDFFBD     0xFFBD   RESERVED
RESERVEDFFBE     0xFFBE   RESERVED
RESERVEDFFBF     0xFFBF   RESERVED
RESERVEDFFC0     0xFFC0   RESERVED
RESERVEDFFC1     0xFFC1   RESERVED
RESERVEDFFC2     0xFFC2   RESERVED
RESERVEDFFC3     0xFFC3   RESERVED
RESERVEDFFC4     0xFFC4   RESERVED
RESERVEDFFC5     0xFFC5   RESERVED
RESERVEDFFC6     0xFFC6   RESERVED
RESERVEDFFC7     0xFFC7   RESERVED
RESERVEDFFC8     0xFFC8   RESERVED
RESERVEDFFC9     0xFFC9   RESERVED
RESERVEDFFCA     0xFFCA   RESERVED
RESERVEDFFCB     0xFFCB   RESERVED
RESERVEDFFCC     0xFFCC   RESERVED
RESERVEDFFCD     0xFFCD   RESERVED
RESERVEDFFCE     0xFFCE   RESERVED
RESERVEDFFCF     0xFFCF   RESERVED
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier Operation Start Control Bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.CTIF1         7   CTIF1 - Interrupt Request Flag
IF0.CTIF0         6   CTIF0 - Interrupt Request Flag
IF0.CRIF          5   CRIF  - Interrupt Request Flag
IF0.CEIF          4   CEIF  - Interrupt Request Flag
IF0.PIF1          3   PIF1  - Interrupt Request Flag
IF0.PIF0          2   PIF0  - Interrupt Request Flag
IF0.ADIF1         1   ADIF1 - Interrupt Request Flag
IF0.WDTIF         0   WDTIF - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.STIF0         6   STIF0  - Interrupt Request Flag
IF1.SRIF0         5   SRIF0  - Interrupt Request Flag
IF1.SREIF0        4   SREIF0 - Interrupt Request Flag
IF1.CSIIF2        3   CSIIF2 - Interrupt Request Flag
IF1.TMIF5         2   TMIF5  - Interrupt Request Flag
IF1.TMIF01        1   TMIF01 - Interrupt Request Flag
IF1.TMIF00        0   TMIF00 - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.CTMK1         7   CTMK1 - Interrupt Service Control
MK0.CTMK0         6   CTMK0 - Interrupt Service Control
MK0.CRMK          5   CRMK  - Interrupt Service Control
MK0.CEMK          4   CEMK  - Interrupt Service Control
MK0.PMK1          3   PMK1  - Interrupt Service Control
MK0.PMK0          2   PMK0  - Interrupt Service Control
MK0.ADMK1         1   ADMK1 - Interrupt Service Control
MK0.WDTMK         0   WDTMK - Interrupt Service Control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.STMK0         6   STMK0  - Interrupt Service Control
MK1.SRMK0         5   SRMK0  - Interrupt Service Control
MK1.SREMK0        4   SREMK0 - Interrupt Service Control
MK1.CSIMK2        3   CSIMK2 - Interrupt Service Control
MK1.TMMK5         2   TMMK5  - Interrupt Service Control
MK1.TMMK01        1   TMMK01 - Interrupt Service Control
MK1.TMMK00        0   TMMK00 - Interrupt Service Control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP1 Valid Edge Selection bit 1
INTM0.ES00        2   INTP1 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subsystem clock control register
CSS.CLS           5   CPU Clock Operating Status
CSS.CSS0          4   CPU Clock Selection
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
RESERVEDFFF7     0xFFF7   RESERVED
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog Timer Operating Mode Selection
WDTM.WDTM4        4   Watchdog Timer Operating Mode Selection bit 4
WDTM.WDTM3        3   Watchdog Timer Operating Mode Selection bit 3
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation Stabilization Time Selection bit 2
OSTS.OSTS1        1   Oscillation Stabilization Time Selection bit 1
OSTS.OSTS0        0   Oscillation Stabilization Time Selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Main System Clock Oscillator Control
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78F9850_A
; U14341EJ1V0PM00.PDF, U14403EJ2V0UM00.PDF, U14695EE2V1PL00.PDF


; MEMORY MAP
area DATA FLASH_    0x0000:0x4000   Flash memory
area BSS RESERVED   0x4000:0xF100
area DATA CAN_      0xF100:0xF200   CAN message storage RAM
area BSS RESERVED   0xF200:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   INTWDT
interrupt INTAD1_           0x0006   INTAD1
interrupt INTP0_            0x0008   INTP0
interrupt INTP1_            0x000A   INTP1
interrupt INTCE_            0x000C   INTCE
interrupt INTCR_            0x000E   INTCR
interrupt INTCT0_           0x0010   INTCT0
interrupt INTCT1_           0x0012   INTCT1
interrupt INTTM00_          0x0014   INTTM00
interrupt INTTM01_          0x0016   INTTM01
interrupt INTTM5_           0x0018   INTTM5
interrupt INTCSI2_          0x001A   INTCSI2
interrupt INTSRE0_          0x001C   INTSRE0
interrupt INTSR0_           0x001E   INTSR0
interrupt INTST0_           0x0020   INTST0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
P1               0xFF01   Port 1
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
RESERVEDFF04     0xFF04   RESERVED
RESERVEDFF05     0xFF05   RESERVED
P6               0xFF06   Port 6
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
MUL0             0xFF10   16-bit multiplication result storage register 0
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
TM0              0xFF14   16-bit timer/counter register 0
CR00             0xFF16   16-bit capture/compare register 00
CR01             0xFF18   16-bit capture/compare register 01
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM04          4   P04 Pin Input/Output Mode Selection
PM0.PM03          3   P03 Pin Input/Output Mode Selection
PM0.PM02          2   P02 Pin Input/Output Mode Selection
PM0.PM01          1   P01 Pin Input/Output Mode Selection
PM0.PM00          0   P00 Pin Input/Output Mode Selection
PM1              0xFF21   Port mode register 1
PM1.PM10          0   P10 Pin Input/Output Mode Selection
PM2              0xFF22   Port mode register 2
PM2.PM27          7   P27 Pin Input/Output Mode Selection
PM2.PM26          6   P26 Pin Input/Output Mode Selection
PM2.PM25          5   P25 Pin Input/Output Mode Selection
PM2.PM24          4   P24 Pin Input/Output Mode Selection
PM2.PM23          3   P23 Pin Input/Output Mode Selection
PM2.PM22          2   P22 Pin Input/Output Mode Selection
PM2.PM21          1   P21 Pin Input/Output Mode Selection
PM2.PM20          0   P20 Pin Input/Output Mode Selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
PUB0             0xFF30   Pull-up resistor option register B0
PUB0.PUB04        4   P04 Pin Pull-Up Resistor Selection
PUB0.PUB03        3   P03 Pin Pull-Up Resistor Selection
PUB0.PUB02        2   P02 Pin Pull-Up Resistor Selection
PUB0.PUB01        1   P01 Pin Pull-Up Resistor Selection
PUB0.PUB00        0   P00 Pin Pull-Up Resistor Selection
PUB1             0xFF31   Pull-up resistor option register B1
PUB1.PUB10        0   P10 Pin Pull-Up Resistor Selection
PUB2             0xFF32   Pull-up resistor option register B2
PUB2.PUB27        7   P27 Pin Pull-Up Resistor Selection
PUB2.PUB26        6   P26 Pin Pull-Up Resistor Selection
PUB2.PUB25        5   P25 Pin Pull-Up Resistor Selection
PUB2.PUB24        4   P24 Pin Pull-Up Resistor Selection
PUB2.PUB23        3   P23 Pin Pull-Up Resistor Selection
PUB2.PUB22        2   P22 Pin Pull-Up Resistor Selection
PUB2.PUB21        1   P21 Pin Pull-Up Resistor Selection
PUB2.PUB20        0   P20 Pin Pull-Up Resistor Selection
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
WDCS             0xFF42   Watchdog timer clock select register
WDCS.WDCS2        2   Watchdog Timer Count Clock Selection bit 2
WDCS.WDCS1        1   Watchdog Timer Count Clock Selection bit 1
WDCS.WDCS0        0   Watchdog Timer Count Clock Selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
PBS              0xFF50   Clock output control register
PBS.CLOE          4   PCL Output Control
PBS.CCS1          1   PCL Output Clock Selection bit 1
PBS.CCS0          0   PCL Output Clock Selection bit 0
RESERVEDFF51     0xFF51   RESERVED
RESERVEDFF52     0xFF52   RESERVED
RESERVEDFF53     0xFF53   RESERVED
RESERVEDFF54     0xFF54   RESERVED
RESERVEDFF55     0xFF55   RESERVED
RESERVEDFF56     0xFF56   RESERVED
RESERVEDFF57     0xFF57   RESERVED
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
RESERVEDFF60     0xFF60   RESERVED
RESERVEDFF61     0xFF61   RESERVED
RESERVEDFF62     0xFF62   RESERVED
RESERVEDFF63     0xFF63   RESERVED
RESERVEDFF64     0xFF64   RESERVED
RESERVEDFF65     0xFF65   RESERVED
TMC0             0xFF66   16-bit timer mode control register
TMC0.TMC03        3
TMC0.TMC02        2
TMC0.TMC01        1
TMC0.OVF0         0
PRM0             0xFF67   Prescaler mode register
PRM0.ES01         5   TI00 Valid Edge Selection bit 1
PRM0.ES00         4   TI00 Valid Edge Selection bit 0
PRM0.PRM01        1   Count Clock Selection bit 1
PRM0.PRM00        0   Count Clock Selection bit 0
CRC0             0xFF68   Capture/compare control register
CRC0.CRC02        2   CR01 Operation Mode Selection
CRC0.CRC01        1   CR00 Capture Trigger Selection
CRC0.CRC00        0   CR00 Operation Mode Selection
TOC0             0xFF69   Timer output control register
TOC0.OSPT         6   Control of One-Shot Pulse Output Trigger by Software
TOC0.OSPE0        5   One-Shot Pulse Output Control
TOC0.TOC04        4   Timer Output F/F Control by Match of CR01 and TM0
TOC0.LVS0         3   16-Bit Timer/Event Counter Timer Output F/F Status Setting
TOC0.LVR0         2   16-Bit Timer/Event Counter Timer Output F/F Status Setting
TOC0.TOC01        1   Timer Output F/F Control by Match of CR00 and TM0
TOC0.TOE0         0   16-Bit Timer/Event Counter 0 (TM0) Output Control
RESERVEDFF6A     0xFF6A   RESERVED
RESERVEDFF6B     0xFF6B   RESERVED
RESERVEDFF6C     0xFF6C   RESERVED
RESERVEDFF6D     0xFF6D   RESERVED
RESERVEDFF6E     0xFF6E   RESERVED
RESERVEDFF6F     0xFF6F   RESERVED
TM5              0xFF70   8-bit counter
CR5              0xFF71   8-bit compare register
TCL5             0xFF72   Timer clock selection register
TCL5.TCL52        2   Selection of 8-Bit Counter Count Clock bit 2
TCL5.TCL51        1   Selection of 8-Bit Counter Count Clock bit 1
TCL5.TCL50        0   Selection of 8-Bit Counter Count Clock bit 0
TMC5             0xFF73   8-bit timer mode control register
TMC5.TCE5         7   TM5 Count Operation Control
TMC5.TMC56        6   TM5 Operation Mode Selection
TMC5.LVS5         3   Timer Output F/F Status Setting
TMC5.LVR5         2   Timer Output F/F Status Setting
TMC5.TMC51        1   Other than PWM Mode
TMC5.TOE5         0   Timer Output Control
RESERVEDFF74     0xFF74   RESERVED
RESERVEDFF75     0xFF75   RESERVED
RESERVEDFF76     0xFF76   RESERVED
RESERVEDFF77     0xFF77   RESERVED
RESERVEDFF78     0xFF78   RESERVED
RESERVEDFF79     0xFF79   RESERVED
RESERVEDFF7A     0xFF7A   RESERVED
RESERVEDFF7B     0xFF7B   RESERVED
RESERVEDFF7C     0xFF7C   RESERVED
RESERVEDFF7D     0xFF7D   RESERVED
RESERVEDFF7E     0xFF7E   RESERVED
RESERVEDFF7F     0xFF7F   RESERVED
ADM              0xFF80   A/D converter mode register
ADM.ADCS          7   A/D Conversion Operation Control
ADM.FR2           5   Conversion Time Selection bit 2
ADM.FR1           4   Conversion Time Selection bit 1
ADM.FR0           3   Conversion Time Selection bit 0
ADS              0xFF81   Analog input channel specification register
ADS.ADS1          1   Analog Input Channel Specification bit 1
ADS.ADS0          0   Analog Input Channel Specification bit 0
PFM              0xFF82   Power-fail compare mode register
PFM.PFEN          7   Power-Fail Comparison Enable
PFM.PFCM          6   Power-Fail Compare Mode Selection
PFT              0xFF83   Power-fail compare threshold value register
PFT.PFT7          7
PFT.PFT6          6
PFT.PFT5          5
PFT.PFT4          4
PFT.PFT3          3
PFT.PFT2          2
PFT.PFT1          1
PFT.PFT0          0
RESERVEDFF84     0xFF84   RESERVED
ADCR             0xFF85   A/D conversion result register
RESERVEDFF86     0xFF86   RESERVED
RESERVEDFF87     0xFF87   RESERVED
DAM1             0xFF88   D/A converter mode register 1
DAM1.DACE         0   Reference Voltage Control
RESERVEDFF89     0xFF89   RESERVED
RESERVEDFF8A     0xFF8A   RESERVED
RESERVEDFF8B     0xFF8B   RESERVED
RESERVEDFF8C     0xFF8C   RESERVED
RESERVEDFF8D     0xFF8D   RESERVED
RESERVEDFF8E     0xFF8E   RESERVED
RESERVEDFF8F     0xFF8F   RESERVED
CSIM2            0xFF90   Serial operation mode register
CSIM2.CSIE        7   SIO2 Operation Enable/Disable Specification
CSIM2.TRMD        6   SIO2 Operation Setting
CSIM2.CKP         3   Serial Clock Phase Selection
CSIM2.DAP         2   Data Phase Selection
CSIM2.CKS1        1   Serial Transfer Operating Clock Selection bit 1
CSIM2.CKS0        0   Serial Transfer Operating Clock Selection bit 0
SIO2             0xFF91   Serial I/O shift register
SIRB2            0xFF92   Serial interface receive buffer register
SIRS2            0xFF93   Serial interface receive buffer status register
SIRS2.RBST        1   Receive Buffer Status Flag
SIRS2.RBOV        0   Receive Buffer Overrun Error Flag
RESERVEDFF94     0xFF94   RESERVED
RESERVEDFF95     0xFF95   RESERVED
RESERVEDFF96     0xFF96   RESERVED
RESERVEDFF97     0xFF97   RESERVED
RESERVEDFF98     0xFF98   RESERVED
RESERVEDFF99     0xFF99   RESERVED
RESERVEDFF9A     0xFF9A   RESERVED
RESERVEDFF9B     0xFF9B   RESERVED
RESERVEDFF9C     0xFF9C   RESERVED
RESERVEDFF9D     0xFF9D   RESERVED
RESERVEDFF9E     0xFF9E   RESERVED
RESERVEDFF9F     0xFF9F   RESERVED
ASIM0            0xFFA0   Asynchronous serial interface mode register
ASIM0.POWER       7   Operation Mode Specification
ASIM0.TXE         6
ASIM0.RXE         5
ASIM0.PS1         4   Parity Bit Specification bit 1
ASIM0.PS0         3   Parity Bit Specification bit 0
ASIM0.CL          2   Character Length Specification
ASIM0.SL          1   Transmit Data Stop Bit Length Specification
ASIM0.ISRM        0   Reception End Interrupt Control upon Occurrence of Error
BRGC0            0xFFA1   Baud rate generator control register
BRGC0.TPS1        7   Input Clock (fXCLK) Selection bit 1
BRGC0.TPS0        6   Input Clock (fXCLK) Selection bit 0
BRGC0.MDL4        4   5-Bit Counter Divide Value Selection bit 4
BRGC0.MDL3        3   5-Bit Counter Divide Value Selection bit 3
BRGC0.MDL2        2   5-Bit Counter Divide Value Selection bit 2
BRGC0.MDL1        1   5-Bit Counter Divide Value Selection bit 1
BRGC0.MDL0        0   5-Bit Counter Divide Value Selection bit 0
RXB0             0xFFA2   Receive buffer register
ASIS0            0xFFA3   Asynchronous serial interface status register
ASIS0.PE          2   Parity Error Flag
ASIS0.FE          1   Framing Error Flag
ASIS0.OVE         0   Overrun Error Flag
TXS0             0xFFA4   Transmit shift register
RESERVEDFFA5     0xFFA5   RESERVED
RESERVEDFFA6     0xFFA6   RESERVED
RESERVEDFFA7     0xFFA7   RESERVED
RESERVEDFFA8     0xFFA8   RESERVED
RESERVEDFFA9     0xFFA9   RESERVED
RESERVEDFFAA     0xFFAA   RESERVED
RESERVEDFFAB     0xFFAB   RESERVED
RESERVEDFFAC     0xFFAC   RESERVED
RESERVEDFFAD     0xFFAD   RESERVED
RESERVEDFFAE     0xFFAE   RESERVED
RESERVEDFFAF     0xFFAF   RESERVED
DCANC0           0xFFB0   DCAN control register
DCANC0.DCANEN     0   DCAN Control Operation Enable/Disable
CANC0            0xFFB1   CAN control register
CANC0.RxF         7   DCAN Reception Status Flag
CANC0.TxF         6   DCAN Transmission Status Flag
CANC0.SOFE        4   SOFOUT Operation Setting Flag
CANC0.SOFSEL      3   SOFOUT Output Type Selection Flag
CANC0.SLEEP       2   DCAN Sleep/Stop Mode Request Flag
CANC0.STP         1   Sleep/Stop Mode Selection Flag
CANC0.INIT        0   Initialization Mode Setting Flag
TCR0             0xFFB2   Transmit control register
TCR0.TXP          7   Transmit Buffer Priority Setting
TCR0.TXC1         5   Transmission Complete Flag bit 1
TCR0.TXC0         4   Transmission Complete Flag bit 0
TCR0.TXA1         3   Transmission Abort Flag bit 1
TCR0.TXA0         2   Transmission Abort Flag bit 0
TCR0.TXRQ1        1   Transmit Request Flag bit 1
TCR0.TXRQ0        0   Transmit Request Flag bit 0
RMES0            0xFFB3   Receive message register
RMES0.DN7         7   DN Bit of Message 7
RMES0.DN6         6   DN Bit of Message 6
RMES0.DN5         5   DN Bit of Message 5
RMES0.DN4         4   DN Bit of Message 4
RMES0.DN3         3   DN Bit of Message 3
RMES0.DN2         2   DN Bit of Message 2
RMES0.DN1         1   DN Bit of Message 1
RMES0.DN0         0   DN Bit of Message 0
REDEF0           0xFFB4   Redefinition control register
REDEF0.DEFEN      7   Redefinition Enable Flag
REDEF0.DEFSEL3    3   Selection of Receive Message Buffer bit 3
REDEF0.DEFSEL2    2   Selection of Receive Message Buffer bit 2
REDEF0.DEFSEL1    1   Selection of Receive Message Buffer bit 1
REDEF0.DEFSEL0    0   Selection of Receive Message Buffer bit 0
CANES0           0xFFB5   CAN error status register
CANES0.BOFF       7   Bus Off Flag
CANES0.RECS       6   Receive Error Passive Warning Flag
CANES0.TECS       5   Transmit Error Passive Warning Flag
CANES0.INITSTATE  3   Initialization Mode Status Confirmation Flag
CANES0.VALID      2   Valid Protocol Detection Confirmation Flag
CANES0.WAKE       1   Wakeup Status Confirmation Flag
CANES0.OVER       0   Overrun Flag
TEC0             0xFFB6   Transmit error counter
TEC0.TEC7         7
TEC0.TEC6         6
TEC0.TEC5         5
TEC0.TEC4         4
TEC0.TEC3         3
TEC0.TEC2         2
TEC0.TEC1         1
TEC0.TEC0         0
REC0             0xFFB7   Receive error counter
REC0.REC7         7
REC0.REC6         6
REC0.REC5         5
REC0.REC4         4
REC0.REC3         3
REC0.REC2         2
REC0.REC1         1
REC0.REC0         0
MCNT0            0xFFB8   Message count register
MCNT0.TLRES       5   DCAN Message Buffer Area Address Setting
MCNT0.MCNT4       4   Number of Receive Messages 4
MCNT0.MCNT3       3   Number of Receive Messages 3
MCNT0.MCNT2       2   Number of Receive Messages 2
MCNT0.MCNT1       1   Number of Receive Messages 1
MCNT0.MCNT0       0   Number of Receive Messages 0
BRPRS0           0xFFB9   Bit rate prescaler setting register
BRPRS0.PRM1       7   DCAN Clock Selection bit 1
BRPRS0.PRM0       6   DCAN Clock Selection bit 0
BRPRS0.BRPRS5     5   Bit Rate Prescaler bit 5
BRPRS0.BRPRS4     4   Bit Rate Prescaler bit 4
BRPRS0.BRPRS3     3   Bit Rate Prescaler bit 3
BRPRS0.BRPRS2     2   Bit Rate Prescaler bit 2
BRPRS0.BRPRS1     1   Bit Rate Prescaler bit 1
BRPRS0.BRPRS0     0   Bit Rate Prescaler bit 0
SYNC00           0xFFBA   Synchronized control register 0
SYNC00.SPT2       7   Setting of Sampling Point in CAN Data Bit Timing bit 2
SYNC00.SPT1       6   Setting of Sampling Point in CAN Data Bit Timing bit 1
SYNC00.SPT0       5   Setting of Sampling Point in CAN Data Bit Timing bit 0
SYNC00.DBT4       4   Bit Length of 1 Data bit 4
SYNC00.DBT3       3   Bit Length of 1 Data bit 3
SYNC00.DBT2       2   Bit Length of 1 Data bit 2
SYNC00.DBT1       1   Bit Length of 1 Data bit 1
SYNC00.DBT0       0   Bit Length of 1 Data bit 0
SYNC01           0xFFBB   Synchronized control register 1
SYNC01.SOFC       6   SOFOUT Function (SOFE Flag Operation) Setting
SYNC01.SAMP       5   Setting of Sampling Times at Sampling Point
SYNC01.RXONLY     4   Receive Operation Setting
SYNC01.SJW1       3   SJW Setting bit 1
SYNC01.SJW0       2   SJW Setting bit 0
SYNC01.SPT4       1   Setting of Sampling Point in CAN Data Bit Timing bit 4
SYNC01.SPT3       0   Setting of Sampling Point in CAN Data Bit Timing bit 3
MASKC0           0xFFBC   Mask control register
MASKC0.SSHT       5   Single Shot Mode Setting
MASKC0.AL         4   Setting of Operation in Case of Arbitration Defeat in Single Shot Mode
MASKC0.GLOBAL     2   Global Mask Function Setting
MASKC0.MSK1       1   Mask Buffer 1 Setting
MASKC0.MSK0       0   Mask Buffer 0 Setting
RESERVEDFFBD     0xFFBD   RESERVED
RESERVEDFFBE     0xFFBE   RESERVED
RESERVEDFFBF     0xFFBF   RESERVED
RESERVEDFFC0     0xFFC0   RESERVED
RESERVEDFFC1     0xFFC1   RESERVED
RESERVEDFFC2     0xFFC2   RESERVED
RESERVEDFFC3     0xFFC3   RESERVED
RESERVEDFFC4     0xFFC4   RESERVED
RESERVEDFFC5     0xFFC5   RESERVED
RESERVEDFFC6     0xFFC6   RESERVED
RESERVEDFFC7     0xFFC7   RESERVED
RESERVEDFFC8     0xFFC8   RESERVED
RESERVEDFFC9     0xFFC9   RESERVED
RESERVEDFFCA     0xFFCA   RESERVED
RESERVEDFFCB     0xFFCB   RESERVED
RESERVEDFFCC     0xFFCC   RESERVED
RESERVEDFFCD     0xFFCD   RESERVED
RESERVEDFFCE     0xFFCE   RESERVED
RESERVEDFFCF     0xFFCF   RESERVED
MRA0             0xFFD0   Multiplication data register A0
MRB0             0xFFD1   Multiplication data register B0
MULC0            0xFFD2   Multiplier control register 0
MULC0.MULST0      0   Multiplier Operation Start Control Bit
RESERVEDFFD3     0xFFD3   RESERVED
RESERVEDFFD4     0xFFD4   RESERVED
RESERVEDFFD5     0xFFD5   RESERVED
RESERVEDFFD6     0xFFD6   RESERVED
RESERVEDFFD7     0xFFD7   RESERVED
RESERVEDFFD8     0xFFD8   RESERVED
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
RESERVEDFFDD     0xFFDD   RESERVED
RESERVEDFFDE     0xFFDE   RESERVED
RESERVEDFFDF     0xFFDF   RESERVED
IF0              0xFFE0   Interrupt request flag register 0
IF0.CTIF1         7   CTIF1 - Interrupt Request Flag
IF0.CTIF0         6   CTIF0 - Interrupt Request Flag
IF0.CRIF          5   CRIF  - Interrupt Request Flag
IF0.CEIF          4   CEIF  - Interrupt Request Flag
IF0.PIF1          3   PIF1  - Interrupt Request Flag
IF0.PIF0          2   PIF0  - Interrupt Request Flag
IF0.ADIF1         1   ADIF1 - Interrupt Request Flag
IF0.WDTIF         0   WDTIF - Interrupt Request Flag
IF1              0xFFE1   Interrupt request flag register 1
IF1.STIF0         6   STIF0  - Interrupt Request Flag
IF1.SRIF0         5   SRIF0  - Interrupt Request Flag
IF1.SREIF0        4   SREIF0 - Interrupt Request Flag
IF1.CSIIF2        3   CSIIF2 - Interrupt Request Flag
IF1.TMIF5         2   TMIF5  - Interrupt Request Flag
IF1.TMIF01        1   TMIF01 - Interrupt Request Flag
IF1.TMIF00        0   TMIF00 - Interrupt Request Flag
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.CTMK1         7   CTMK1 - Interrupt Service Control
MK0.CTMK0         6   CTMK0 - Interrupt Service Control
MK0.CRMK          5   CRMK  - Interrupt Service Control
MK0.CEMK          4   CEMK  - Interrupt Service Control
MK0.PMK1          3   PMK1  - Interrupt Service Control
MK0.PMK0          2   PMK0  - Interrupt Service Control
MK0.ADMK1         1   ADMK1 - Interrupt Service Control
MK0.WDTMK         0   WDTMK - Interrupt Service Control
MK1              0xFFE5   Interrupt mask flag register 1
MK1.STMK0         6   STMK0  - Interrupt Service Control
MK1.SRMK0         5   SRMK0  - Interrupt Service Control
MK1.SREMK0        4   SREMK0 - Interrupt Service Control
MK1.CSIMK2        3   CSIMK2 - Interrupt Service Control
MK1.TMMK5         2   TMMK5  - Interrupt Service Control
MK1.TMMK01        1   TMMK01 - Interrupt Service Control
MK1.TMMK00        0   TMMK00 - Interrupt Service Control
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
INTM0            0xFFEC   External interrupt mode register
INTM0.ES11        5   INTP1 Valid Edge Selection bit 1
INTM0.ES10        4   INTP1 Valid Edge Selection bit 0
INTM0.ES01        3   INTP1 Valid Edge Selection bit 1
INTM0.ES00        2   INTP1 Valid Edge Selection bit 0
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
CSS              0xFFF2   Subsystem clock control register
CSS.CLS           5   CPU Clock Operating Status
CSS.CSS0          4   CPU Clock Selection
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
RESERVEDFFF7     0xFFF7   RESERVED
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog Timer Operating Mode Selection
WDTM.WDTM4        4   Watchdog Timer Operating Mode Selection bit 4
WDTM.WDTM3        3   Watchdog Timer Operating Mode Selection bit 3
OSTS             0xFFFA   Oscillation stabilization time select register
OSTS.OSTS2        2   Oscillation Stabilization Time Selection bit 2
OSTS.OSTS1        1   Oscillation Stabilization Time Selection bit 1
OSTS.OSTS0        0   Oscillation Stabilization Time Selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.MCC           7   Main System Clock Oscillator Control
PCC.PCC1          1   CPU Clock (fCPU) Selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789860
; U13917EJ1V1DS00.PDF, U14385EJ2V0PM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x1000   Internal ROM
area BSS RESERVED   0x1000:0xF800
area DATA EEPROM_   0xF800:0xF820   EEPROM
area BSS RESERVED   0xF820:0xFE80
area DATA RAM_      0xFE80:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF61   Special Function Register
area BSS RESERVED   0xFF61:0xFFD8
area DATA FSR_2     0xFFD8:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTKR1_           0x0002   INTKR1
interrupt INTWDT_           0x0004   INTWDT
interrupt INTTM30_          0x0006   INTTM30
interrupt INTTM40_          0x0008   INTTM40
interrupt INTLVI1_          0x000A   INTLVI1
interrupt INTEE0_           0x000C   INTEE0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
RESERVEDFF01     0xFF01   RESERVED
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
P4               0xFF04   Port 4
RESERVEDFF05     0xFF05   RESERVED
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
BSFRL10          0xFF10   Bit sequential buffer 10 data register L
BSFRH10          0xFF11   Bit sequential buffer 10 data register H
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 pin input/output mode selection
PM0.PM06          6   P06 pin input/output mode selection
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
RESERVEDFF21     0xFF21   RESERVED
PM2              0xFF22   Port mode register 2
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Count clock selection bit 2
TCL2.TCL21        1   Count clock selection bit 1
TCL2.TCL20        0   Count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR30             0xFF50   8-bit compare register 30
TM30             0xFF51   8-bit timer counter 30
TMC30            0xFF52   8-bit timer mode control register 30
TMC30.TCE30       7   TM30 count operation control
TMC30.TCL302      5   Selection of timer 30 count clock bit 2
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD301      2   Selection of timer 30 operating mode bit 1
TMC30.TMD300      1   Selection of timer 30 operating mode bit 0
CR40             0xFF53   8-bit compare register 40
CRH40            0xFF54   8-bit compare register H40
TM40             0xFF55   8-bit timer counter 40
TMC40            0xFF56   8-bit timer mode control register 40
TMC40.TCE40       7   TM40 count operation control
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of timer 40 operating mode bit 1
TMC40.TMD400      1   Selection of timer 40 operating mode bit 0
TMC40.TOE40       0   Timer output control
TCA40            0xFF57   Carrier generator output control register 40
TCA40.RMC40       2   Remote controller output control
TCA40.NRZB40      1
TCA40.NRZ40       0   No return, zero data
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
BSFC10           0xFF60   Bit sequential buffer output control register 10
BSFC10.BSFE10     0   Bit sequential buffer operation control
EEWC10           0xFFD8   EEPROM write control register 10
EEWC10.EWCS102    6   EEPROM timer count clock selection bit 2
EEWC10.EWCS101    5   EEPROM timer count clock selection bit 1
EEWC10.EWCS100    4   EEPROM timer count clock selection bit 0
EEWC10.ERE10      2   ERE10 - Remark
EEWC10.EWST10     1   EEPROM write status flag
EEWC10.EWE10      0   EWE10 - Remark
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
POCF1            0xFFDD   Power-on-clear register 1
POCF1.POCOF1      2   POC output detection flag
POCF1.POCMK1      1   POC reset control
POCF1.POCMK0      0   POC operation control
LVIF1            0xFFDE   Low-voltage detection register 1
LVIF1.LVION1      7   LVI operation enable flag
LVIF1.LVF10       0   LVI output detection flag
LVIS1            0xFFDF   Low-voltage detection level selection register 1
LVIS1.LVS12       2   Selection of detection voltage (VLVI) level bit 2
LVIS1.LVS11       1   Selection of detection voltage (VLVI) level bit 1
LVIS1.LVS10       0   Selection of detection voltage (VLVI) level bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.EEIF0         4   EEIF0  - Interrupt request flag
IF0.LVIIF1        3   LVIIF1 - Interrupt request flag
IF0.TMIF40        2   TMIF40 - Interrupt request flag
IF0.TMIF30        1   TMIF30 - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.EEMK0         4   EEMK0  - Interrupt servicing control
MK0.LVIMK1        3   LVIMK1 - Interrupt servicing control
MK0.TMMK40        2   TMMK40 - Interrupt servicing control
MK0.TMMK30        1   TMMK30 - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
RESERVEDFFEC     0xFFEC   RESERVED
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
RESERVEDFFF7     0xFFF7   RESERVED
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register (mPD789860 Subseries only)
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC0          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789861
; U13917EJ1V1DS00.PDF, U14385EJ2V0PM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x1000   Internal ROM
area BSS RESERVED   0x1000:0xF800
area DATA EEPROM_   0xF800:0xF820   EEPROM
area BSS RESERVED   0xF820:0xFE80
area DATA RAM_      0xFE80:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF61   Special Function Register
area BSS RESERVED   0xFF61:0xFFD8
area DATA FSR_2     0xFFD8:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTKR1_           0x0002   INTKR1
interrupt INTWDT_           0x0004   INTWDT
interrupt INTTM30_          0x0006   INTTM30
interrupt INTTM40_          0x0008   INTTM40
interrupt INTLVI1_          0x000A   INTLVI1
interrupt INTEE0_           0x000C   INTEE0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
RESERVEDFF01     0xFF01   RESERVED
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
P4               0xFF04   Port 4
RESERVEDFF05     0xFF05   RESERVED
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
BSFRL10          0xFF10   Bit sequential buffer 10 data register L
BSFRH10          0xFF11   Bit sequential buffer 10 data register H
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 pin input/output mode selection
PM0.PM06          6   P06 pin input/output mode selection
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
RESERVEDFF21     0xFF21   RESERVED
PM2              0xFF22   Port mode register 2
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Count clock selection bit 2
TCL2.TCL21        1   Count clock selection bit 1
TCL2.TCL20        0   Count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR30             0xFF50   8-bit compare register 30
TM30             0xFF51   8-bit timer counter 30
TMC30            0xFF52   8-bit timer mode control register 30
TMC30.TCE30       7   TM30 count operation control
TMC30.TCL302      5   Selection of timer 30 count clock bit 2
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD301      2   Selection of timer 30 operating mode bit 1
TMC30.TMD300      1   Selection of timer 30 operating mode bit 0
CR40             0xFF53   8-bit compare register 40
CRH40            0xFF54   8-bit compare register H40
TM40             0xFF55   8-bit timer counter 40
TMC40            0xFF56   8-bit timer mode control register 40
TMC40.TCE40       7   TM40 count operation control
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of timer 40 operating mode bit 1
TMC40.TMD400      1   Selection of timer 40 operating mode bit 0
TMC40.TOE40       0   Timer output control
TCA40            0xFF57   Carrier generator output control register 40
TCA40.RMC40       2   Remote controller output control
TCA40.NRZB40      1
TCA40.NRZ40       0   No return, zero data
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
BSFC10           0xFF60   Bit sequential buffer output control register 10
BSFC10.BSFE10     0   Bit sequential buffer operation control
EEWC10           0xFFD8   EEPROM write control register 10
EEWC10.EWCS102    6   EEPROM timer count clock selection bit 2
EEWC10.EWCS101    5   EEPROM timer count clock selection bit 1
EEWC10.EWCS100    4   EEPROM timer count clock selection bit 0
EEWC10.ERE10      2   ERE10 - Remark
EEWC10.EWST10     1   EEPROM write status flag
EEWC10.EWE10      0   EWE10 - Remark
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
POCF1            0xFFDD   Power-on-clear register 1
POCF1.POCOF1      2   POC output detection flag
POCF1.POCMK1      1   POC reset control
POCF1.POCMK0      0   POC operation control
LVIF1            0xFFDE   Low-voltage detection register 1
LVIF1.LVION1      7   LVI operation enable flag
LVIF1.LVF10       0   LVI output detection flag
LVIS1            0xFFDF   Low-voltage detection level selection register 1
LVIS1.LVS12       2   Selection of detection voltage (VLVI) level bit 2
LVIS1.LVS11       1   Selection of detection voltage (VLVI) level bit 1
LVIS1.LVS10       0   Selection of detection voltage (VLVI) level bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.EEIF0         4   EEIF0  - Interrupt request flag
IF0.LVIIF1        3   LVIIF1 - Interrupt request flag
IF0.TMIF40        2   TMIF40 - Interrupt request flag
IF0.TMIF30        1   TMIF30 - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.EEMK0         4   EEMK0  - Interrupt servicing control
MK0.LVIMK1        3   LVIMK1 - Interrupt servicing control
MK0.TMMK40        2   TMMK40 - Interrupt servicing control
MK0.TMMK30        1   TMMK30 - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
RESERVEDFFEC     0xFFEC   RESERVED
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
RESERVEDFFF7     0xFFF7   RESERVED
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
RESERVEDFFFA     0xFFFA   RESERVED
PCC              0xFFFB   Processor clock control register
PCC.PCC0          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78E9860
; U14385EJ2V0PM00.PDF, U14826EJ2V1UM00.PDF


; MEMORY MAP
area DATA EEPROM_1  0x0000:0x1000   EEPROM
area BSS RESERVED   0x1000:0xF800
area DATA EEPROM_2  0xF800:0xF820   EEPROM
area BSS RESERVED   0xF820:0xFE80
area DATA RAM_      0xFE80:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF61   Special Function Register
area BSS RESERVED   0xFF61:0xFFD8
area DATA FSR_2     0xFFD8:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTKR1_           0x0002   INTKR1
interrupt INTWDT_           0x0004   INTWDT
interrupt INTTM30_          0x0006   INTTM30
interrupt INTTM40_          0x0008   INTTM40
interrupt INTLVI1_          0x000A   INTLVI1
interrupt INTEE0_           0x000C   INTEE0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
RESERVEDFF01     0xFF01   RESERVED
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
P4               0xFF04   Port 4
RESERVEDFF05     0xFF05   RESERVED
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
BSFRL10          0xFF10   Bit sequential buffer 10 data register L
BSFRH10          0xFF11   Bit sequential buffer 10 data register H
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 pin input/output mode selection
PM0.PM06          6   P06 pin input/output mode selection
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
RESERVEDFF21     0xFF21   RESERVED
PM2              0xFF22   Port mode register 2
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Count clock selection bit 2
TCL2.TCL21        1   Count clock selection bit 1
TCL2.TCL20        0   Count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR30             0xFF50   8-bit compare register 30
TM30             0xFF51   8-bit timer counter 30
TMC30            0xFF52   8-bit timer mode control register 30
TMC30.TCE30       7   TM30 count operation control
TMC30.TCL302      5   Selection of timer 30 count clock bit 2
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD301      2   Selection of timer 30 operating mode bit 1
TMC30.TMD300      1   Selection of timer 30 operating mode bit 0
CR40             0xFF53   8-bit compare register 40
CRH40            0xFF54   8-bit compare register H40
TM40             0xFF55   8-bit timer counter 40
TMC40            0xFF56   8-bit timer mode control register 40
TMC40.TCE40       7   TM40 count operation control
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of timer 40 operating mode bit 1
TMC40.TMD400      1   Selection of timer 40 operating mode bit 0
TMC40.TOE40       0   Timer output control
TCA40            0xFF57   Carrier generator output control register 40
TCA40.RMC40       2   Remote controller output control
TCA40.NRZB40      1
TCA40.NRZ40       0   No return, zero data
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
BSFC10           0xFF60   Bit sequential buffer output control register 10
BSFC10.BSFE10     0   Bit sequential buffer operation control
EEWC10           0xFFD8   EEPROM write control register 10
EEWC10.EWCS102    6   EEPROM timer count clock selection bit 2
EEWC10.EWCS101    5   EEPROM timer count clock selection bit 1
EEWC10.EWCS100    4   EEPROM timer count clock selection bit 0
EEWC10.ERE10      2   ERE10 - Remark
EEWC10.EWST10     1   EEPROM write status flag
EEWC10.EWE10      0   EWE10 - Remark
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
POCF1            0xFFDD   Power-on-clear register 1
POCF1.POCOF1      2   POC output detection flag
POCF1.POCMK1      1   POC reset control
POCF1.POCMK0      0   POC operation control
LVIF1            0xFFDE   Low-voltage detection register 1
LVIF1.LVION1      7   LVI operation enable flag
LVIF1.LVF10       0   LVI output detection flag
LVIS1            0xFFDF   Low-voltage detection level selection register 1
LVIS1.LVS12       2   Selection of detection voltage (VLVI) level bit 2
LVIS1.LVS11       1   Selection of detection voltage (VLVI) level bit 1
LVIS1.LVS10       0   Selection of detection voltage (VLVI) level bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.EEIF0         4   EEIF0  - Interrupt request flag
IF0.LVIIF1        3   LVIIF1 - Interrupt request flag
IF0.TMIF40        2   TMIF40 - Interrupt request flag
IF0.TMIF30        1   TMIF30 - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.EEMK0         4   EEMK0  - Interrupt servicing control
MK0.LVIMK1        3   LVIMK1 - Interrupt servicing control
MK0.TMMK40        2   TMMK40 - Interrupt servicing control
MK0.TMMK30        1   TMMK30 - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
RESERVEDFFEC     0xFFEC   RESERVED
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
RESERVEDFFF7     0xFFF7   RESERVED
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
OSTS             0xFFFA   Oscillation stabilization time selection register (mPD789860 Subseries only)
OSTS.OSTS2        2   Oscillation stabilization time selection bit 2
OSTS.OSTS1        1   Oscillation stabilization time selection bit 1
OSTS.OSTS0        0   Oscillation stabilization time selection bit 0
PCC              0xFFFB   Processor clock control register
PCC.PCC0          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD78E9861
; U14385EJ2V0PM00.PDF, U14826EJ2V1UM00.PDF


; MEMORY MAP
area DATA EEPROM_1  0x0000:0x1000   EEPROM
area BSS RESERVED   0x1000:0xF800
area DATA EEPROM_2  0xF800:0xF820   EEPROM
area BSS RESERVED   0xF820:0xFE80
area DATA RAM_      0xFE80:0xFF00   Internal High-Speed RAM
area DATA FSR_1     0xFF00:0xFF61   Special Function Register
area BSS RESERVED   0xFF61:0xFFD8
area DATA FSR_2     0xFFD8:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTKR1_           0x0002   INTKR1
interrupt INTWDT_           0x0004   INTWDT
interrupt INTTM30_          0x0006   INTTM30
interrupt INTTM40_          0x0008   INTTM40
interrupt INTLVI1_          0x000A   INTLVI1
interrupt INTEE0_           0x000C   INTEE0


; INPUT/OUTPUT PORTS
P0               0xFF00   Port 0
RESERVEDFF01     0xFF01   RESERVED
P2               0xFF02   Port 2
RESERVEDFF03     0xFF03   RESERVED
P4               0xFF04   Port 4
RESERVEDFF05     0xFF05   RESERVED
RESERVEDFF06     0xFF06   RESERVED
RESERVEDFF07     0xFF07   RESERVED
RESERVEDFF08     0xFF08   RESERVED
RESERVEDFF09     0xFF09   RESERVED
RESERVEDFF0A     0xFF0A   RESERVED
RESERVEDFF0B     0xFF0B   RESERVED
RESERVEDFF0C     0xFF0C   RESERVED
RESERVEDFF0D     0xFF0D   RESERVED
RESERVEDFF0E     0xFF0E   RESERVED
RESERVEDFF0F     0xFF0F   RESERVED
BSFRL10          0xFF10   Bit sequential buffer 10 data register L
BSFRH10          0xFF11   Bit sequential buffer 10 data register H
RESERVEDFF12     0xFF12   RESERVED
RESERVEDFF13     0xFF13   RESERVED
RESERVEDFF14     0xFF14   RESERVED
RESERVEDFF15     0xFF15   RESERVED
RESERVEDFF16     0xFF16   RESERVED
RESERVEDFF17     0xFF17   RESERVED
RESERVEDFF18     0xFF18   RESERVED
RESERVEDFF19     0xFF19   RESERVED
RESERVEDFF1A     0xFF1A   RESERVED
RESERVEDFF1B     0xFF1B   RESERVED
RESERVEDFF1C     0xFF1C   RESERVED
RESERVEDFF1D     0xFF1D   RESERVED
RESERVEDFF1E     0xFF1E   RESERVED
RESERVEDFF1F     0xFF1F   RESERVED
PM0              0xFF20   Port mode register 0
PM0.PM07          7   P07 pin input/output mode selection
PM0.PM06          6   P06 pin input/output mode selection
PM0.PM05          5   P05 pin input/output mode selection
PM0.PM04          4   P04 pin input/output mode selection
PM0.PM03          3   P03 pin input/output mode selection
PM0.PM02          2   P02 pin input/output mode selection
PM0.PM01          1   P01 pin input/output mode selection
PM0.PM00          0   P00 pin input/output mode selection
RESERVEDFF21     0xFF21   RESERVED
PM2              0xFF22   Port mode register 2
PM2.PM21          1   P21 pin input/output mode selection
PM2.PM20          0   P20 pin input/output mode selection
RESERVEDFF23     0xFF23   RESERVED
RESERVEDFF24     0xFF24   RESERVED
RESERVEDFF25     0xFF25   RESERVED
RESERVEDFF26     0xFF26   RESERVED
RESERVEDFF27     0xFF27   RESERVED
RESERVEDFF28     0xFF28   RESERVED
RESERVEDFF29     0xFF29   RESERVED
RESERVEDFF2A     0xFF2A   RESERVED
RESERVEDFF2B     0xFF2B   RESERVED
RESERVEDFF2C     0xFF2C   RESERVED
RESERVEDFF2D     0xFF2D   RESERVED
RESERVEDFF2E     0xFF2E   RESERVED
RESERVEDFF2F     0xFF2F   RESERVED
RESERVEDFF30     0xFF30   RESERVED
RESERVEDFF31     0xFF31   RESERVED
RESERVEDFF32     0xFF32   RESERVED
RESERVEDFF33     0xFF33   RESERVED
RESERVEDFF34     0xFF34   RESERVED
RESERVEDFF35     0xFF35   RESERVED
RESERVEDFF36     0xFF36   RESERVED
RESERVEDFF37     0xFF37   RESERVED
RESERVEDFF38     0xFF38   RESERVED
RESERVEDFF39     0xFF39   RESERVED
RESERVEDFF3A     0xFF3A   RESERVED
RESERVEDFF3B     0xFF3B   RESERVED
RESERVEDFF3C     0xFF3C   RESERVED
RESERVEDFF3D     0xFF3D   RESERVED
RESERVEDFF3E     0xFF3E   RESERVED
RESERVEDFF3F     0xFF3F   RESERVED
RESERVEDFF40     0xFF40   RESERVED
RESERVEDFF41     0xFF41   RESERVED
TCL2             0xFF42   Timer clock selection register 2
TCL2.TCL22        2   Count clock selection bit 2
TCL2.TCL21        1   Count clock selection bit 1
TCL2.TCL20        0   Count clock selection bit 0
RESERVEDFF43     0xFF43   RESERVED
RESERVEDFF44     0xFF44   RESERVED
RESERVEDFF45     0xFF45   RESERVED
RESERVEDFF46     0xFF46   RESERVED
RESERVEDFF47     0xFF47   RESERVED
RESERVEDFF48     0xFF48   RESERVED
RESERVEDFF49     0xFF49   RESERVED
RESERVEDFF4A     0xFF4A   RESERVED
RESERVEDFF4B     0xFF4B   RESERVED
RESERVEDFF4C     0xFF4C   RESERVED
RESERVEDFF4D     0xFF4D   RESERVED
RESERVEDFF4E     0xFF4E   RESERVED
RESERVEDFF4F     0xFF4F   RESERVED
CR30             0xFF50   8-bit compare register 30
TM30             0xFF51   8-bit timer counter 30
TMC30            0xFF52   8-bit timer mode control register 30
TMC30.TCE30       7   TM30 count operation control
TMC30.TCL302      5   Selection of timer 30 count clock bit 2
TMC30.TCL301      4   Selection of timer 30 count clock bit 1
TMC30.TCL300      3   Selection of timer 30 count clock bit 0
TMC30.TMD301      2   Selection of timer 30 operating mode bit 1
TMC30.TMD300      1   Selection of timer 30 operating mode bit 0
CR40             0xFF53   8-bit compare register 40
CRH40            0xFF54   8-bit compare register H40
TM40             0xFF55   8-bit timer counter 40
TMC40            0xFF56   8-bit timer mode control register 40
TMC40.TCE40       7   TM40 count operation control
TMC40.TCL402      5   Selection of timer 40 count clock bit 2
TMC40.TCL401      4   Selection of timer 40 count clock bit 1
TMC40.TCL400      3   Selection of timer 40 count clock bit 0
TMC40.TMD401      2   Selection of timer 40 operating mode bit 1
TMC40.TMD400      1   Selection of timer 40 operating mode bit 0
TMC40.TOE40       0   Timer output control
TCA40            0xFF57   Carrier generator output control register 40
TCA40.RMC40       2   Remote controller output control
TCA40.NRZB40      1
TCA40.NRZ40       0   No return, zero data
RESERVEDFF58     0xFF58   RESERVED
RESERVEDFF59     0xFF59   RESERVED
RESERVEDFF5A     0xFF5A   RESERVED
RESERVEDFF5B     0xFF5B   RESERVED
RESERVEDFF5C     0xFF5C   RESERVED
RESERVEDFF5D     0xFF5D   RESERVED
RESERVEDFF5E     0xFF5E   RESERVED
RESERVEDFF5F     0xFF5F   RESERVED
BSFC10           0xFF60   Bit sequential buffer output control register 10
BSFC10.BSFE10     0   Bit sequential buffer operation control
EEWC10           0xFFD8   EEPROM write control register 10
EEWC10.EWCS102    6   EEPROM timer count clock selection bit 2
EEWC10.EWCS101    5   EEPROM timer count clock selection bit 1
EEWC10.EWCS100    4   EEPROM timer count clock selection bit 0
EEWC10.ERE10      2   ERE10 - Remark
EEWC10.EWST10     1   EEPROM write status flag
EEWC10.EWE10      0   EWE10 - Remark
RESERVEDFFD9     0xFFD9   RESERVED
RESERVEDFFDA     0xFFDA   RESERVED
RESERVEDFFDB     0xFFDB   RESERVED
RESERVEDFFDC     0xFFDC   RESERVED
POCF1            0xFFDD   Power-on-clear register 1
POCF1.POCOF1      2   POC output detection flag
POCF1.POCMK1      1   POC reset control
POCF1.POCMK0      0   POC operation control
LVIF1            0xFFDE   Low-voltage detection register 1
LVIF1.LVION1      7   LVI operation enable flag
LVIF1.LVF10       0   LVI output detection flag
LVIS1            0xFFDF   Low-voltage detection level selection register 1
LVIS1.LVS12       2   Selection of detection voltage (VLVI) level bit 2
LVIS1.LVS11       1   Selection of detection voltage (VLVI) level bit 1
LVIS1.LVS10       0   Selection of detection voltage (VLVI) level bit 0
IF0              0xFFE0   Interrupt request flag register 0
IF0.EEIF0         4   EEIF0  - Interrupt request flag
IF0.LVIIF1        3   LVIIF1 - Interrupt request flag
IF0.TMIF40        2   TMIF40 - Interrupt request flag
IF0.TMIF30        1   TMIF30 - Interrupt request flag
IF0.TMIF4         0   TMIF4  - Interrupt request flag
RESERVEDFFE1     0xFFE1   RESERVED
RESERVEDFFE2     0xFFE2   RESERVED
RESERVEDFFE3     0xFFE3   RESERVED
MK0              0xFFE4   Interrupt mask flag register 0
MK0.EEMK0         4   EEMK0  - Interrupt servicing control
MK0.LVIMK1        3   LVIMK1 - Interrupt servicing control
MK0.TMMK40        2   TMMK40 - Interrupt servicing control
MK0.TMMK30        1   TMMK30 - Interrupt servicing control
MK0.TMMK4         0   TMMK4  - Interrupt servicing control
RESERVEDFFE5     0xFFE5   RESERVED
RESERVEDFFE6     0xFFE6   RESERVED
RESERVEDFFE7     0xFFE7   RESERVED
RESERVEDFFE8     0xFFE8   RESERVED
RESERVEDFFE9     0xFFE9   RESERVED
RESERVEDFFEA     0xFFEA   RESERVED
RESERVEDFFEB     0xFFEB   RESERVED
RESERVEDFFEC     0xFFEC   RESERVED
RESERVEDFFED     0xFFED   RESERVED
RESERVEDFFEE     0xFFEE   RESERVED
RESERVEDFFEF     0xFFEF   RESERVED
RESERVEDFFF0     0xFFF0   RESERVED
RESERVEDFFF1     0xFFF1   RESERVED
RESERVEDFFF2     0xFFF2   RESERVED
RESERVEDFFF3     0xFFF3   RESERVED
RESERVEDFFF4     0xFFF4   RESERVED
RESERVEDFFF5     0xFFF5   RESERVED
RESERVEDFFF6     0xFFF6   RESERVED
RESERVEDFFF7     0xFFF7   RESERVED
RESERVEDFFF8     0xFFF8   RESERVED
WDTM             0xFFF9   Watchdog timer mode register
WDTM.RUN          7   Watchdog timer operation selection
WDTM.WDTM4        4   Watchdog timer operation mode selection bit 4
WDTM.WDTM3        3   Watchdog timer operation mode selection bit 3
RESERVEDFFFA     0xFFFA   RESERVED
PCC              0xFFFB   Processor clock control register
PCC.PCC0          1   CPU clock (fCPU) selection
RESERVEDFFFC     0xFFFC   RESERVED
RESERVEDFFFD     0xFFFD   RESERVED
RESERVEDFFFE     0xFFFE   RESERVED
RESERVEDFFFF     0xFFFF   RESERVED


.UPD789881
; U14594EE4V0PM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x4000   Internal ROM
area BSS RESERVED   0x4000:0xFA00
area DATA LCD_RAM_  0xFA00:0xFA1A   LCD Display RAM Space
area BSS RESERVED   0xFA1A:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_      0xFF00:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   Overflow of watchdog timer
interrupt INTP0_            0x0006
interrupt INTP1_            0x0008
interrupt INTP2_            0x000A
interrupt INTP3_            0x000C
interrupt INTSRE0_          0x000E   Generation of UART0 reception error
interrupt INTSR0_           0x0010   End of serial interface UART0 reception
interrupt INTST0_           0x0012   End of serial interface UART0 transmission
interrupt INTTM50_          0x0014   Coincidence signal generation of 8-bit timer/event counter 50
interrupt INTTM51_          0x0016   Coincidence signal generation of 8-bit timer/event counter 51
interrupt INTTM00_          0x0018   Coincidence signal generation of 16-bit timer/event counter 0 (CR00)
interrupt INTTM01_          0x001A   Coincidence signal generation of 16-bit timer/event counter 0 (CR01)


; INPUT/OUTPUT PORTS


.UPD78F9882
; U14594EE4V0PM00.PDF


; MEMORY MAP
area DATA ROM_      0x0000:0x8000   Internal ROM
area BSS RESERVED   0x8000:0xFA00
area DATA LCD_RAM_  0xFA00:0xFA1A   LCD Display RAM Space
area BSS RESERVED   0xFA1A:0xFD00
area DATA RAM_      0xFD00:0xFF00   Internal High-Speed RAM
area DATA FSR_      0xFF00:0x10000  Special Function Register


; Interrupt and reset vector assignments
interrupt RESET             0x0000   RESET
interrupt INTWDT_           0x0004   Overflow of watchdog timer
interrupt INTP0_            0x0006
interrupt INTP1_            0x0008
interrupt INTP2_            0x000A
interrupt INTP3_            0x000C
interrupt INTSRE0_          0x000E   Generation of UART0 reception error
interrupt INTSR0_           0x0010   End of serial interface UART0 reception
interrupt INTST0_           0x0012   End of serial interface UART0 transmission
interrupt INTTM50_          0x0014   Coincidence signal generation of 8-bit timer/event counter 50
interrupt INTTM51_          0x0016   Coincidence signal generation of 8-bit timer/event counter 51
interrupt INTTM00_          0x0018   Coincidence signal generation of 16-bit timer/event counter 0 (CR00)
interrupt INTTM01_          0x001A   Coincidence signal generation of 16-bit timer/event counter 0 (CR01)


; INPUT/OUTPUT PORTS


