1        LIST
2
3;==========================================================================
4; Build date : Oct 21 2015
5;  MPASM PIC16C58A 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 PIC16C58A 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 /PIC16C58A
22;       2. LIST directive in the source file
23;               LIST   P=PIC16C58A
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 __16C58A
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'
68PA2              EQU  H'0007'
69
70
71;----- PORTA Bits -----------------------------------------------------
72RA0              EQU  H'0000'
73RA1              EQU  H'0001'
74RA2              EQU  H'0002'
75RA3              EQU  H'0003'
76T0CKI            EQU  H'0004'
77
78
79;----- PORTB Bits -----------------------------------------------------
80RB0              EQU  H'0000'
81RB1              EQU  H'0001'
82RB2              EQU  H'0002'
83RB3              EQU  H'0003'
84RB4              EQU  H'0004'
85RB5              EQU  H'0005'
86RB6              EQU  H'0006'
87RB7              EQU  H'0007'
88
89
90
91;----- OPTION_REG Bits -----------------------------------------------------
92PSA              EQU  H'0003'
93T0SE             EQU  H'0004'
94T0CS             EQU  H'0005'
95
96
97;----- TRISB Bits -----------------------------------------------------
98TRISB0           EQU  H'0000'
99TRISB1           EQU  H'0001'
100TRISB2           EQU  H'0002'
101TRISB3           EQU  H'0003'
102TRISB4           EQU  H'0004'
103TRISB5           EQU  H'0005'
104TRISB6           EQU  H'0006'
105TRISB7           EQU  H'0007'
106
107
108;----- TRISA Bits -----------------------------------------------------
109TRISA0           EQU  H'0000'
110TRISA1           EQU  H'0001'
111TRISA2           EQU  H'0002'
112TRISA3           EQU  H'0003'
113TRISA4           EQU  H'0004'
114
115
116
117;==========================================================================
118;
119;       RAM Definitions
120;
121;==========================================================================
122       __MAXRAM  H'007F'
123
124;==========================================================================
125;
126;       Configuration Bits
127;
128;   NAME            Address
129;   CONFIG             FFFh
130;
131;==========================================================================
132
133; The following is an assignment of address values for all of the
134; configuration registers for the purpose of table reads
135_CONFIG          EQU  H'FFF'
136
137;----- CONFIG Options --------------------------------------------------
138_OSC_LP              EQU  H'0FFC'    ; LP oscillator
139_LP_OSC              EQU  H'0FFC'    ; LP oscillator
140_OSC_XT              EQU  H'0FFD'    ; XT oscillator
141_XT_OSC              EQU  H'0FFD'    ; XT oscillator
142_OSC_HS              EQU  H'0FFE'    ; HS oscillator
143_HS_OSC              EQU  H'0FFE'    ; HS oscillator
144_OSC_RC              EQU  H'0FFF'    ; RC oscillator
145_RC_OSC              EQU  H'0FFF'    ; RC oscillator
146
147_WDT_OFF             EQU  H'0FFB'    ; WDT disabled
148_WDT_ON              EQU  H'0FFF'    ; WDT enabled
149
150_CP_ON               EQU  H'0FF7'    ; Code protection on
151_CP_OFF              EQU  H'0FFF'    ; Code protection off
152
153
154;----- IDLOC Equates --------------------------------------------------
155_IDLOC0          EQU  H'800'
156_IDLOC1          EQU  H'801'
157_IDLOC2          EQU  H'802'
158_IDLOC3          EQU  H'803'
159
160        LIST
161