Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1126 | savelij | 1 | ifndef __pmc251inc ; avoid multiple inclusion |
| 2 | __pmc251inc equ 1 |
||
| 3 | |||
| 4 | save |
||
| 5 | listing off ; no listing over this file |
||
| 6 | |||
| 7 | ;**************************************************************************** |
||
| 8 | ;* * |
||
| 9 | ;* AS 1.42 - File PMC251.INC * |
||
| 10 | ;* * |
||
| 11 | ;* contains SFR and Bit Definitions for PMC251 * |
||
| 12 | ;* * |
||
| 13 | ;* Sources: PMC251 Data Sheet, Ver. 0.12, Mar 20, 2014 * |
||
| 14 | ;* * |
||
| 15 | ;**************************************************************************** |
||
| 16 | |||
| 17 | ;---------------------------------------------------------------------------- |
||
| 18 | ; Interrupt Control |
||
| 19 | |||
| 20 | inten sfr 0x04 ; Interrupt Enable |
||
| 21 | timer16_inten bit inten.2 ; Timer16 Interrupt Enable |
||
| 22 | pb0_inten bit inten.1 ; PB0 Interrupt Enable |
||
| 23 | pa0_inten bit inten.0 ; PA0 Interrupt Enable |
||
| 24 | |||
| 25 | intrq sfr 0x05 ; Interrupt Request Register |
||
| 26 | timer16_intrq bit intrq.2 ; Timer16 Interrupt Request |
||
| 27 | pb0_intrq bit intrq.1 ; PB0 Interrupt Request |
||
| 28 | pa0_intrq bit intrq.0 ; PA0 Interrupt Request |
||
| 29 | |||
| 30 | integs sfr 0x0c ; Interrupt Edge Register |
||
| 31 | timer16_egs bit integs.4 ; Timer16 Edge Selection |
||
| 32 | pb0_egs _bfield integs,2,2 ; PB0 Edge Selection |
||
| 33 | pa0_egs _bfield integs,0,2 ; PA0 Edge Selection |
||
| 34 | |||
| 35 | ;---------------------------------------------------------------------------- |
||
| 36 | ; CPU Core |
||
| 37 | |||
| 38 | __numcpus equ 2 |
||
| 39 | |||
| 40 | clkmd sfr 0x03 ; Clock Mode Register |
||
| 41 | clkselect _bfield clkmd,5,3 ; System Clock Selection |
||
| 42 | ihrc_enable bit clkmd.4 ; IHRC Enable |
||
| 43 | clktype bit clkmd.3 ; Clock Type Select |
||
| 44 | ilrc_enable bit clkmd.2 ; ILRC Enable |
||
| 45 | wd_enable bit clkmd.1 ; Watch Dog Enable |
||
| 46 | pa5_prst bit clkmd.0 ; Pin PA5/RESET# Function |
||
| 47 | |||
| 48 | ihrcr sfr 0x0b ; Internal High RC Oscillator Control Register |
||
| 49 | |||
| 50 | eoscr sfr 0x0a ; External Oscillator Setting Register |
||
| 51 | enxtal bit eoscr.7 ; Enable external crystal |
||
| 52 | xtalsel _bfield eoscr,5,2 ; External Crystal Oscillator Selection |
||
| 53 | pwrdn bit eoscr.0 ; Power Down Band Gap and LVR Hardware |
||
| 54 | |||
| 55 | misc sfr 0x3b ; MISC Register |
||
| 56 | en32k_lcur bit misc.6 ; Enable 32 kHz low current after osc. |
||
| 57 | en_fwkup bit misc.5 ; Enable Fast Wakeup |
||
| 58 | lvr_rec bit misc.3 ; LVR Recover Time |
||
| 59 | dis_lvr bit misc.2 ; Disable LVR Function |
||
| 60 | wdperiod _bfield misc,0,2 ; Watchdog Timeout Period |
||
| 61 | |||
| 62 | ;---------------------------------------------------------------------------- |
||
| 63 | ; GPIO |
||
| 64 | |||
| 65 | padier sfr 0x0d ; Port A Digital Input Enable Register |
||
| 66 | pbdier sfr 0x0e ; Port B Digital Input Enable Register |
||
| 67 | |||
| 68 | pa sfr 0x10 ; Port A Data Register |
||
| 69 | pb sfr 0x14 ; Port B Data Register |
||
| 70 | |||
| 71 | pac sfr 0x11 ; Port A Control Register |
||
| 72 | pbc sfr 0x15 ; Port B Control Register |
||
| 73 | |||
| 74 | paph sfr 0x12 ; Port A Pull High Register |
||
| 75 | pbph sfr 0x16 ; Port B Pull High Register |
||
| 76 | |||
| 77 | ;---------------------------------------------------------------------------- |
||
| 78 | ; Timer |
||
| 79 | |||
| 80 | t16m sfr 0x06 ; Timer 16 Mode Register |
||
| 81 | tm16_clksrc _bfield t16m,5,3 ; Timer Clock Source Selection |
||
| 82 | tm16_clkdiv _bfield t16m,3,2 ; Internal Clock Divider |
||
| 83 | tm16_isrc _bfield t16m,0,3 ; Interrupt Source |
||
| 84 | |||
| 85 | restore |
||
| 86 | endif ; __pmc251inc |