Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1186 | savelij | 1 | ifndef __reg72311inc ; avoid multiple inclusion |
2 | __reg72311inc equ 1 |
||
3 | |||
4 | save |
||
5 | listing off ; no listing over this file |
||
6 | |||
7 | ;**************************************************************************** |
||
8 | ;* * |
||
9 | ;* AS 1.42 - File REG72311.INC * |
||
10 | ;* * |
||
11 | ;* contains SFR and Bit Definitions for ST72311 * |
||
12 | ;* * |
||
13 | ;* Source: ST72311 Data Sheet, Rev. 1.8, May 2001 * |
||
14 | ;* * |
||
15 | ;**************************************************************************** |
||
16 | |||
17 | ;---------------------------------------------------------------------------- |
||
18 | ; Memory Addresses |
||
19 | |||
20 | RAMSTART label $0080 ; start address internal RAM |
||
21 | switch substr(MOMCPUNAME,8,1) |
||
22 | case "2" |
||
23 | RAMEND label $01ff ; end " " " |
||
24 | case "4" |
||
25 | RAMEND label $027f ; end " " " |
||
26 | endcase |
||
27 | |||
28 | EESTART label $0c00 ; start address internal EEPROM |
||
29 | EEEND label $0cff ; end " " " |
||
30 | |||
31 | ;---------------------------------------------------------------------------- |
||
32 | ; Interrupt Vectors |
||
33 | |||
34 | EEPROM_vect label $ffe4 ; EEPROM Interrupt Vector |
||
35 | SCI_vect label $ffe6 ; SCI Interrupt Vector |
||
36 | TIMB_vect label $ffe8 ; TIMER B Interrupt Vector |
||
37 | TIMA_vect label $ffea ; TIMER A Interrupt Vector |
||
38 | SPI_vect label $ffec ; SPI Interrupt Vector |
||
39 | EI3_vect label $fff0 ; External Interrupt Vector EI3 |
||
40 | EI2_vect label $fff2 ; External Interrupt Vector EI2 |
||
41 | EI1_vect label $fff4 ; External Interrupt Vector EI1 |
||
42 | EI0_vect label $fff6 ; External Interrupt Vector EI0 |
||
43 | TRAP_vect label $fffc ; TRAP (software) Interrupt Vector |
||
44 | RESET_vect label $fffe ; RESET Vector |
||
45 | |||
46 | ;---------------------------------------------------------------------------- |
||
47 | ; GPIO |
||
48 | |||
49 | include "gpio.inc" |
||
50 | __defgpio "PA",$0000 |
||
51 | __defgpio "PC",$0004 |
||
52 | __defgpio "PB",$0008 |
||
53 | __defgpio "PE",$000c |
||
54 | __defgpio "PD",$0010 |
||
55 | __defgpio "PF",$0014 |
||
56 | |||
57 | ;---------------------------------------------------------------------------- |
||
58 | ; Miscellaneous |
||
59 | |||
60 | MISCR label $0020 ; Miscellaneous Register |
||
61 | PEI3 bit MISCR,7 ; EI3 Interrupt Polarity |
||
62 | PEI2 bit MISCR,6 ; EI2 Interrupt Polarity |
||
63 | MCO bit MISCR,5 ; Main Clock Out |
||
64 | PEI1 bit MISCR,4 ; EI1 Interrupt Polarity |
||
65 | PEI0 bit MISCR,3 ; EI0 Interrupt Polarity |
||
66 | PSM bfield MISCR,1,2 ; Prescaler for Slow Mode |
||
67 | SMS bit MISCR,0 ; Slow Mode Select |
||
68 | |||
69 | ;---------------------------------------------------------------------------- |
||
70 | ; SPI |
||
71 | |||
72 | include "spi.inc" |
||
73 | |||
74 | ;---------------------------------------------------------------------------- |
||
75 | ; Watchdog |
||
76 | |||
77 | WDGCR label $002a ; Watchdog Control Register |
||
78 | WDGA bit WDGCR,7 ; Activation bit |
||
79 | WDGSR label $002b ; Watchdog Status Register |
||
80 | WDOGF bit WDGSR,0 ; Watchdog flag |
||
81 | |||
82 | ;---------------------------------------------------------------------------- |
||
83 | ; EEPROM |
||
84 | |||
85 | EEPCR label $002c ; EEPROM Control Register |
||
86 | E2ITE bit EEPCR,2 ; Interrupt enable |
||
87 | E2LAT bit EEPCR,1 ; Read/Write mode |
||
88 | E2PGM bit EEPCR,0 ; Programming Control |
||
89 | |||
90 | ;---------------------------------------------------------------------------- |
||
91 | ; Timer A/B |
||
92 | |||
93 | include "timer.inc" |
||
94 | __deftimer "TA",$0030 |
||
95 | __deftimer "TB",$0040 |
||
96 | |||
97 | ;---------------------------------------------------------------------------- |
||
98 | ; Serial Communications Interface |
||
99 | |||
100 | include "sci.inc" |
||
101 | __defsci $0050,5 |
||
102 | |||
103 | ;---------------------------------------------------------------------------- |
||
104 | ; Analog/Digital Converter |
||
105 | |||
106 | include "adc8.inc" |
||
107 | |||
108 | restore |
||
109 | endif ; __reg72311inc |