Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1186 | savelij | 1 | ifndef __timer1inc ; avoid multiple inclusion |
2 | __timer1inc equ 1 |
||
3 | |||
4 | save |
||
5 | listing off ; no listing over this file |
||
6 | |||
7 | ;**************************************************************************** |
||
8 | ;* * |
||
9 | ;* AS 1.42 - File TIMER1.INC * |
||
10 | ;* * |
||
11 | ;* contains common SFR and Bit Definitions for ST62xx Timer1 * |
||
12 | ;* * |
||
13 | ;**************************************************************************** |
||
14 | |||
15 | __deftimer macro BASE,NUM |
||
16 | __NS eval "\{NUM}" |
||
17 | PSCR{__NS} sfr BASE+0 ; Prescaler Register |
||
18 | TCR{__NS} sfr BASE+1 ; Downcounter Register |
||
19 | TSCR{__NS} sfr BASE+2 ; Status Control Register |
||
20 | TMZ{__NS} bit 7,TSCR{__NS} ; Timer Zero Bit |
||
21 | ETI{__NS} bit 6,TSCR{__NS} ; Enable Timer Interrupt |
||
22 | PSI{__NS} bit 3,TSCR{__NS} ; Prescaler Initialize Bit |
||
23 | PS{__NS} bfield TSCR{__NS},0,3 ; Prescaler Mux. Select |
||
24 | endm |
||
25 | |||
26 | restore |
||
27 | endif ; __timer1inc |