1        LIST
2
3;==========================================================================
4; Build date : Oct 21 2015
5;  MPASM PIC16CR54C processor include
6;
7;  (c) Copyright 1999-2015 Microchip Technology, All rights reserved
8;==========================================================================
9
10        NOLIST
11
12;==========================================================================
13;  This header file defines configurations, registers, and other useful
14;  bits of information for the PIC16CR54C microcontroller.  These names
15;  are taken to match the data sheets as closely as possible.
16;
17;  Note that the processor must be selected before this file is included.
18;  The processor may be selected the following ways:
19;
20;       1. Command line switch:
21;               C:\MPASM MYFILE.ASM /PIC16CR54C
22;       2. LIST directive in the source file
23;               LIST   P=PIC16CR54C
24;       3. Processor Type entry in the MPASM full-screen interface
25;       4. Setting the processor in the MPLAB Project Dialog
26;==========================================================================
27
28;==========================================================================
29;
30;       Verify Processor
31;
32;==========================================================================
33        IFNDEF __16CR54C
34           MESSG "Processor-header file mismatch.  Verify selected processor."
35        ENDIF
36
37
38
39;==========================================================================
40;
41;       Register Definitions
42;
43;==========================================================================
44
45W                EQU  H'0000'
46F                EQU  H'0001'
47
48;----- Register Files -----------------------------------------------------
49
50;-----Bank0------------------
51INDF             EQU  H'0000'
52TMR0             EQU  H'0001'
53PCL              EQU  H'0002'
54STATUS           EQU  H'0003'
55FSR              EQU  H'0004'
56PORTA            EQU  H'0005'
57PORTB            EQU  H'0006'
58
59;----- STATUS Bits -----------------------------------------------------
60C                EQU  H'0000'
61DC               EQU  H'0001'
62Z                EQU  H'0002'
63NOT_PD           EQU  H'0003'
64NOT_TO           EQU  H'0004'
65
66PA0              EQU  H'0005'
67PA1              EQU  H'0006'
68
69
70;----- PORTA Bits -----------------------------------------------------
71RA0              EQU  H'0000'
72RA1              EQU  H'0001'
73RA2              EQU  H'0002'
74RA3              EQU  H'0003'
75T0CKI            EQU  H'0004'
76
77
78;----- PORTB Bits -----------------------------------------------------
79RB0              EQU  H'0000'
80RB1              EQU  H'0001'
81RB2              EQU  H'0002'
82RB3              EQU  H'0003'
83RB4              EQU  H'0004'
84RB5              EQU  H'0005'
85RB6              EQU  H'0006'
86RB7              EQU  H'0007'
87
88
89
90;----- OPTION_REG Bits -----------------------------------------------------
91PSA              EQU  H'0003'
92T0SE             EQU  H'0004'
93T0CS             EQU  H'0005'
94
95
96;----- TRISB Bits -----------------------------------------------------
97TRISB0           EQU  H'0000'
98TRISB1           EQU  H'0001'
99TRISB2           EQU  H'0002'
100TRISB3           EQU  H'0003'
101TRISB4           EQU  H'0004'
102TRISB5           EQU  H'0005'
103TRISB6           EQU  H'0006'
104TRISB7           EQU  H'0007'
105
106
107;----- TRISA Bits -----------------------------------------------------
108TRISA0           EQU  H'0000'
109TRISA1           EQU  H'0001'
110TRISA2           EQU  H'0002'
111TRISA3           EQU  H'0003'
112TRISA4           EQU  H'0004'
113
114
115
116;==========================================================================
117;
118;       RAM Definitions
119;
120;==========================================================================
121       __MAXRAM  H'001F'
122
123;==========================================================================
124;
125;       Configuration Bits
126;
127;   NAME            Address
128;   CONFIG             FFFh
129;
130;==========================================================================
131
132; The following is an assignment of address values for all of the
133; configuration registers for the purpose of table reads
134_CONFIG          EQU  H'FFF'
135
136;----- CONFIG Options --------------------------------------------------
137_OSC_LP              EQU  H'0FFC'    ; LP oscillator
138_LP_OSC              EQU  H'0FFC'    ; LP oscillator
139_OSC_XT              EQU  H'0FFD'    ; XT oscillator
140_XT_OSC              EQU  H'0FFD'    ; XT oscillator
141_OSC_HS              EQU  H'0FFE'    ; HS oscillator
142_HS_OSC              EQU  H'0FFE'    ; HS oscillator
143_OSC_RC              EQU  H'0FFF'    ; RC oscillator
144_RC_OSC              EQU  H'0FFF'    ; RC oscillator
145
146_WDT_OFF             EQU  H'0FFB'    ; WDT disabled
147_WDT_ON              EQU  H'0FFF'    ; WDT enabled
148
149_CP_ON               EQU  H'0007'    ; Code protection on
150_CP_OFF              EQU  H'0FFF'    ; Code protection off
151
152
153;----- IDLOC Equates --------------------------------------------------
154_IDLOC0          EQU  H'200'
155_IDLOC1          EQU  H'201'
156_IDLOC2          EQU  H'202'
157_IDLOC3          EQU  H'203'
158
159        LIST
160