Specifications

Program Examples
B-5
Program Examples
;************************************************************************
; File name: 240x.h
;
; Description: 240x register definitions, Bit codes for BIT instruction
;************************************************************************
; 240x CPU core registers
IMR .set 0004h ; Interrupt Mask Register
IFR .set 0006h ; Interrupt Flag Register
; System configuration and interrupt registers
SCSR1 .set 7018h ; System Control & Status register. 1
SCSR2 .set 7019h ; System Control & Status register. 2
DINR .set 701Ch ; Device Identification Number register.
PIVR .set 701Eh ; Peripheral Interrupt Vector register.
PIRQR0 .set 7010h ; Peripheral Interrupt Request register 0
PIRQR1 .set 7011h ; Peripheral Interrupt Request register 1
PIRQR2 .set 7012h ; Peripheral Interrupt Request register 2
PIACKR0 .set 7014h ; Peripheral Interrupt Acknowledge register 0
PIACKR1 .set 7015h ; Peripheral Interrupt Acknowledge register 1
PIACKR2 .set 7016h ; Peripheral Interrupt Acknowledge register 2
; External interrupt configuration registers
XINT1CR .set 7070h ; External interrupt 1 control register
XINT2CR .set 7071h ; External interrupt 2 control register
; Digital I/O registers
MCRA .set 7090h ; I/O Mux Control Register A
MCRB .set 7092h ; I/O Mux Control Register B
MCRC .set 7094h ; I/O Mux Control Register C
PADATDIR .set 7098h ; I/O port A Data & Direction register
PBDATDIR .set 709Ah ; I/O port B Data & Direction register
PCDATDIR .set 709Ch ; I/O port C Data & Direction register
PDDATDIR .set 709Eh ; I/O port D Data & Direction register
PEDATDIR .set 7095h ; I/O port E Data & Direction register
PFDATDIR .set 7096h ; I/O port F Data & Direction register
; Watchdog (WD) registers
WDCNTR .set 7023h ; WD Counter register
WDKEY .set 7025h ; WD Key register
WDCR .set 7029h ; WD Control register
; ADC registers
ADCTRL1 .set 70A0h ; ADC Control register 1
ADCTRL2 .set 70A1h ; ADC Control register 2
MAXCONV .set 70A2h ; Maximum conversion channels register
CHSELSEQ1 .set 70A3h ; Channel select Sequencing control register 1
CHSELSEQ2 .set 70A4h ; Channel select Sequencing control register 2
CHSELSEQ3 .set 70A5h ; Channel select Sequencing control register 3