Blame | Last modification | View Log | Download | RSS feed
ifndef __reg80f92inc__reg80f92inc equ 1savelisting off ; no listing over this file;****************************************************************************;* *;* AS(L) - File REG80F92.INC *;* *;* Contains Bit & Register Definitions for Zilog eZ80[F,L]92/eZ80F93 *;* *;****************************************************************************include "spi.inc"include "uart.inc"include "i2c.inc"include "gpio.inc"include "rtc.inc";----------------------------------------------------------------------------; Memory Limitsswitch MOMCPUNAMEcase "EZ80F92"RAMSTART equ 0e000h ; assumes RAM_ADDR_U = 00hRAMEND equ RAMSTART+1fffhFLASHSIZE equ 20000hcase "EZ80F93"RAMSTART equ 0f000h ; assumes RAM_ADDR_U = 00hRAMEND equ RAMSTART+0fffhFLASHSIZE equ 10000hcase "EZ80L92"endcase;----------------------------------------------------------------------------; TimerTMR0_CTL port 80h ; Timer 0 Control Register (r/w)PRT_IRQ equ 1 << 7 ; Timer Interrupt occuredPRT_IRQ_EN equ 1 << 6 ; Interrupt EnablePRT_MODE equ 1 << 4 ; Continuous ModeCLK_DIV_S equ 2 ; Clock DividerCLK_DIV_M equ 3 << CLK_DIV_SCLK_DIV_4 equ 0 << CLK_DIV_S ; Source = Clock/4CLK_DIV_16 equ 1 << CLK_DIV_S ; Source = Clock/16CLK_DIV_64 equ 2 << CLK_DIV_S ; Source = Clock/64CLK_DIV_256 equ 3 << CLK_DIV_S ; Source = Clock/256RST_EN equ 1 << 1 ; Automatic Restart EnablePRT_EN equ 1 << 0 ; Timer EnableTMR0_DR_L port 81h ; Timer 0 Data Register Low (r)TMR0_RR_L port 81h ; Timer 0 Reload Register Low (w)TMR0_DR_H port 82h ; Timer 0 Data Register High (r)TMR0_RR_H port 82h ; Timer 0 Reload Register High (w)IVEC_PRT0 equ 0ah ; Timer 0 Interrupt VectorTMR1_CTL port 83h ; Timer 1 Control Register (r/w)TMR1_DR_L port 84h ; Timer 1 Data Register Low (r)TMR1_RR_L port 84h ; Timer 1 Reload Register Low (w)TMR1_DR_H port 85h ; Timer 1 Data Register High (r)TMR1_RR_H port 85h ; Timer 1 Reload Register High (w)IVEC_PRT1 equ 0ch ; Timer 1 Interrupt VectorTMR2_CTL port 86h ; Timer 2 Control Register (r/w)TMR2_DR_L port 87h ; Timer 2 Data Register Low (r)TMR2_RR_L port 87h ; Timer 2 Reload Register Low (w)TMR2_DR_H port 88h ; Timer 2 Data Register High (r)TMR2_RR_H port 88h ; Timer 2 Reload Register High (w)IVEC_PRT2 equ 0eh ; Timer 2 Interrupt VectorTMR3_CTL port 89h ; Timer 3 Control Register (r/w)TMR3_DR_L port 8ah ; Timer 3 Data Register Low (r)TMR3_RR_L port 8ah ; Timer 3 Reload Register Low (w)TMR3_DR_H port 8bh ; Timer 3 Data Register High (r)TMR3_RR_H port 8bh ; Timer 3 Reload Register High (w)IVEC_PRT3 equ 10h ; Timer 3 Interrupt VectorTMR4_CTL port 8ch ; Timer 4 Control Register (r/w)TMR4_DR_L port 8dh ; Timer 4 Data Register Low (r)TMR4_RR_L port 8dh ; Timer 4 Reload Register Low (w)TMR4_DR_H port 8eh ; Timer 4 Data Register High (r)TMR4_RR_H port 8eh ; Timer 4 Reload Register High (w)IVEC_PRT4 equ 12h ; Timer 4 Interrupt VectorTMR5_CTL port 8fh ; Timer 5 Control Register (r/w)TMR5_DR_L port 90h ; Timer 5 Data Register Low (r)TMR5_RR_L port 90h ; Timer 5 Reload Register Low (w)TMR5_DR_H port 91h ; Timer 5 Data Register High (r)TMR5_RR_H port 91h ; Timer 5 Reload Register High (w)IVEC_PRT5 equ 14h ; Timer 5 Interrupt VectorTMR_ISS port 92h ; Timer Input Source Select RegisterTMR3_IN_S equ 6 ; Timer 3 InputTMR3_IN_M equ 3 << TMR3_IN_STMR3_IN_SYS equ 0 << TMR3_IN_S ; system clockTMR3_IN_RTC equ 1 << TMR3_IN_S ; RTCTMR3_IN_B1 equ 2 << TMR3_IN_S ; GPIO B1TMR2_IN_S equ 6 ; Timer 2 InputTMR2_IN_M equ 3 << TMR2_IN_STMR2_IN_SYS equ 0 << TMR2_IN_S ; system clockTMR2_IN_RTC equ 1 << TMR2_IN_S ; RTCTMR2_IN_B1 equ 2 << TMR2_IN_S ; GPIO B0TMR1_IN_S equ 6 ; Timer 1 InputTMR1_IN_M equ 3 << TMR1_IN_STMR1_IN_SYS equ 0 << TMR1_IN_S ; system clockTMR1_IN_RTC equ 1 << TMR1_IN_S ; RTCTMR1_IN_B1 equ 2 << TMR1_IN_S ; GPIO B1TMR0_IN_S equ 6 ; Timer 0 InputTMR0_IN_M equ 3 << TMR0_IN_STMR0_IN_SYS equ 0 << TMR0_IN_S ; system clockTMR0_IN_RTC equ 1 << TMR0_IN_S ; RTCTMR0_IN_B1 equ 2 << TMR0_IN_S ; GPIO B0;----------------------------------------------------------------------------; Watchdog TimerWDT_CTL port 93h ; Watchdog Timer Control Register (r/w)WDT_EN equ 1 << 7 ; Watchdog Timer EnableNMI_OUT equ 1 << 6 ; NMI instead of resetRST_FLAG equ 1 << 5 ; Reset caused by WDTWDT_CLK_S equ 3 ; Clock SourceWDT_CLK_M equ 3 << WDT_CLK_SWDT_CLK_SYS equ 0 << WDT_CLK_S ; System ClockWDT_CLK_RTC equ 1 << WDT_CLK_S ; RTC ClockWDT_PERIOD_S equ 0 ; WDT PeriodWDT_PERIOD_M equ 3 << WDT_PERIOD_SWDT_PERIOD_27 equ 0 << WDT_PERIOD_S ; WDT period is 2**27 clock cyclesWDT_PERIOD_25 equ 1 << WDT_PERIOD_S ; WDT period is 2**25 clock cyclesWDT_PERIOD_22 equ 2 << WDT_PERIOD_S ; WDT period is 2**22 clock cyclesWDT_PERIOD_18 equ 3 << WDT_PERIOD_S ; WDT period is 2**18 clock cyclesWDT_RR port 94h ; Watchdog Timer Reset Register (w);----------------------------------------------------------------------------; General-Purpose Input/Output Ports__defgpio "B",9ahIVEC_PB0 equ 30h ; Port B 0 Interrupt VectorIVEC_PB1 equ 32h ; Port B 1 Interrupt VectorIVEC_PB2 equ 34h ; Port B 2 Interrupt VectorIVEC_PB3 equ 36h ; Port B 3 Interrupt VectorIVEC_PB4 equ 38h ; Port B 4 Interrupt VectorIVEC_PB5 equ 3ah ; Port B 5 Interrupt VectorIVEC_PB6 equ 3ch ; Port B 6 Interrupt VectorIVEC_PB7 equ 3eh ; Port B 7 Interrupt Vector__defgpio "C",9ehIVEC_PC0 equ 40h ; Port C 0 Interrupt VectorIVEC_PC1 equ 42h ; Port C 1 Interrupt VectorIVEC_PC2 equ 44h ; Port C 2 Interrupt VectorIVEC_PC3 equ 46h ; Port C 3 Interrupt VectorIVEC_PC4 equ 48h ; Port C 4 Interrupt VectorIVEC_PC5 equ 4ah ; Port C 5 Interrupt VectorIVEC_PC6 equ 4ch ; Port C 6 Interrupt VectorIVEC_PC7 equ 4eh ; Port C 7 Interrupt Vector__defgpio "D",0a2hIVEC_PD0 equ 50h ; Port D 0 Interrupt VectorIVEC_PD1 equ 52h ; Port D 1 Interrupt VectorIVEC_PD2 equ 54h ; Port D 2 Interrupt VectorIVEC_PD3 equ 56h ; Port D 3 Interrupt VectorIVEC_PD4 equ 58h ; Port D 4 Interrupt VectorIVEC_PD5 equ 5ah ; Port D 5 Interrupt VectorIVEC_PD6 equ 5ch ; Port D 6 Interrupt VectorIVEC_PD7 equ 5eh ; Port D 7 Interrupt Vector;----------------------------------------------------------------------------; Chip Select/Wait State GeneratorCS0_LBR port 0a8h ; Chip Select 0 Lower Bound Register (r/w)CS0_UBR port 0a9h ; Chip Select 0 Upper Bound Register (r/w)CS0_CTL port 0aah ; Chip Select 0 Control Register (r/w)CS_WAIT_S equ 5 ; # of wait statesCS_WAIT_M equ 7 << CS_WAIT_SCS_IO equ 1 << 4 ; Match I/O rangeCS_EN equ 1 << 3 ; Enable Chip SelectCS0_BMC equ 0f0h ; Chip Select 0 Bus Mode Control Register (r/w)BUS_MODE_S equ 6 ; Bus ModeBUS_MODE_M equ 3 << BUS_MODE_SBUS_MODE_EZ80 equ 0 << BUS_MODE_S ; eZ80 ModeBUS_MODE_Z80 equ 1 << BUS_MODE_S ; Z80 ModeBUS_MODE_INTEL equ 2 << BUS_MODE_S ; Intel ModeBUS_MODE_MOTO equ 3 << BUS_MODE_S ; Motorola ModeAD_MUX equ 1 << 5 ; Multiplexed Address/DataBUS_CYCLE_S equ 0 ; Length of bus cycleBUS_CYCLE_M equ 15 << BUS_CYCLE_SCS1_LBR port 0abh ; Chip Select 1 Lower Bound Register (r/w)CS1_UBR port 0ach ; Chip Select 1 Upper Bound Register (r/w)CS1_CTL port 0adh ; Chip Select 1 Control Register (r/w)CS1_BMC equ 0f1h ; Chip Select 1 Bus Mode Control Register (r/w)CS2_LBR port 0aeh ; Chip Select 2 Lower Bound Register (r/w)CS2_UBR port 0afh ; Chip Select 2 Upper Bound Register (r/w)CS2_CTL port 0b0h ; Chip Select 2 Control Register (r/w)CS2_BMC equ 0f2h ; Chip Select 2 Bus Mode Control Register (r/w)CS3_LBR port 0b1h ; Chip Select 3 Lower Bound Register (r/w)CS3_UBR port 0b2h ; Chip Select 3 Upper Bound Register (r/w)CS3_CTL port 0b3h ; Chip Select 3 Control Register (r/w)CS3_BMC equ 0f3h ; Chip Select 3 Bus Mode Control Register (r/w);----------------------------------------------------------------------------; On-Chip RAM Controlifdef RAMSTARTRAM_CTL port 0b4h ; RAM Control Register (r/w)RAM_ADDR_U port 0b5h ; RAM Address Upper Byte (r/w)endif;----------------------------------------------------------------------------; SPISPI_BRG_L port 0b8h ; SPI Baud Rate Generator Register - Low ByteSPI_BRG_H port 0b9h ; SPI Baud Rate Generator Register - High Byte__defspi "",0bahIVEC_SPI label 1eh ; SPI Interrupt Vector;----------------------------------------------------------------------------; InfraredIR_CTL port 0bfh ; Infrared Encoder/Decoder Control (r/w)MIN_PULSE_S equ 4 ; Minimum receive pulse width controlMIN_PULSE_M equ 15 << MIN_PULSE_SLOOP_BACK equ 1 << 2 ; Internal LOOP BACK modeIR_RxEN equ 1 << 1 ; IR_RxD data is passed to UART0 RxDIR_EN equ 1 << 0 ; Endec is disabled;----------------------------------------------------------------------------; UART 0__defuart "0",0c0hTCIE equ 1 << 4 ; UARTx_IER Transmission complete interrupt enableFSTS_S equ 6 ; UARTx_IIR FIFO StatusFSTS_M equ 3 << FSTS_SFSTS_DIS equ 0 << FSTS_S ; FIFO is disabledFSTS_RXDIS equ 2 << FSTS_S ; Receive FIFO is disabled (MULTIDROP mode)FSTS_EN equ 3 << FSTS_S ; FIFO is enabledINTSTS_TC equ 5 << INTSTS_S ; UARTx_IIR Transmission CompleteMDM equ 1 << 5 ; UARTx_MCR Multidrop Mode enableIVEC_UART0 label 18h ; UART0 Interrupt Vector;----------------------------------------------------------------------------; I2C__defi2c "",0c8hIVEC_I2C label 1ch ; I2C Interrupt Vector;----------------------------------------------------------------------------; UART 1__defuart "1",0d0hIVEC_UART1 label 1ah ; UART1 Interrupt Vector;----------------------------------------------------------------------------; Low-Power ControlCLK_PPD1 port 0dbh ; Clock Peripheral Power-Down Register 1 (r/w)GPIO_D_OFF equ 1 << 7 ; Power down system clock to GPIO Port DGPIO_C_OFF equ 1 << 6 ; Power down system clock to GPIO Port CGPIO_B_OFF equ 1 << 5 ; Power down system clock to GPIO Port BSPI_OFF equ 1 << 3 ; Power down system clock to SPII2C_OFF equ 1 << 2 ; Power down system clock to I2CUART1_OFF equ 1 << 1 ; Power down system clock to UART1UART0_OFF equ 1 << 0 ; Power down system clock to UART0 and IrDA endecCLK_PPD2 port 0dch ; Clock Peripheral Power-Down Register 2 (r/w)PHI_OFF equ 1 << 7 ; Disable PHI Clock outputPRT5_OFF equ 1 << 5 ; Power down system clock to PRT5PRT4_OFF equ 1 << 4 ; Power down system clock to PRT4PRT3_OFF equ 1 << 3 ; Power down system clock to PRT3PRT2_OFF equ 1 << 2 ; Power down system clock to PRT2PRT1_OFF equ 1 << 1 ; Power down system clock to PRT1PRT0_OFF equ 1 << 0 ; Power down system clock to PRT0;----------------------------------------------------------------------------; Real-Time Clock__defrtcIVEC_RTC label 6ch ; RTC Interrupt Vector;----------------------------------------------------------------------------; Flash Controllerifdef FLASHSIZEinclude "flash.inc"__defflashIVEC_FLASH label 08hendif;----------------------------------------------------------------------------restoreendif ; __reg80f92inc