You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

223 lines
9.4 KiB

  1. ; PAGE DEFINITIONS
  2. ACTIVE_PAGE EQU 000H
  3. DEBUG_PAGE EQU 001H
  4. ; SFR ADDRESSES BEGIN
  5. ADC0AC DATA 0B3H ; ACTIVE
  6. ADC0CF DATA 0BCH ; ACTIVE
  7. ADC0CN0 DATA 0E8H ; ACTIVE
  8. ADC0CN1 DATA 0B2H ; ACTIVE
  9. ADC0GTH DATA 0C4H ; ACTIVE
  10. ADC0GTL DATA 0C3H ; ACTIVE
  11. ADC0H DATA 0BEH ; ACTIVE
  12. ADC0L DATA 0BDH ; ACTIVE
  13. ADC0LTH DATA 0C6H ; ACTIVE
  14. ADC0LTL DATA 0C5H ; ACTIVE
  15. ADC0MX DATA 0BBH ; ACTIVE
  16. ADC0PWR DATA 0DFH ; ACTIVE
  17. ADC0TK DATA 0B9H ; ACTIVE
  18. ACC DATA 0E0H ;
  19. B DATA 0F0H ;
  20. DPH DATA 083H ;
  21. DPL DATA 082H ;
  22. PCON DATA 087H ;
  23. PSW DATA 0D0H ;
  24. SP DATA 081H ;
  25. CRC0AUTO DATA 0D2H ; ACTIVE
  26. CRC0CN DATA 0CEH ; ACTIVE
  27. CRC0CNT DATA 0D3H ; ACTIVE
  28. CRC0DAT DATA 0DEH ; ACTIVE
  29. CRC0FLIP DATA 0CFH ; ACTIVE
  30. CRC0IN DATA 0DDH ; ACTIVE
  31. CPT0CN DATA 09BH ; ACTIVE
  32. CPT0MD DATA 09DH ; ACTIVE
  33. CPT0MX DATA 09FH ; ACTIVE
  34. CPT1CN DATA 0BFH ; ACTIVE
  35. CPT1MD DATA 0ABH ; ACTIVE
  36. CPT1MX DATA 0AAH ; ACTIVE
  37. DERIVID DATA 0ADH ; ACTIVE
  38. DEVICEID DATA 0B5H ; ACTIVE
  39. FLSCL DATA 09AH ; ACTIVE
  40. REVID DATA 0B6H ; ACTIVE
  41. FLKEY DATA 0B7H ;
  42. PSCTL DATA 08FH ;
  43. EIE1 DATA 0E6H ;
  44. EIP1 DATA 0F3H ; ACTIVE
  45. IE DATA 0A8H ;
  46. IP DATA 0B8H ;
  47. IT01CF DATA 0E4H ; ACTIVE
  48. CKCON DATA 08EH ; ACTIVE
  49. CLKSEL DATA 0A9H ;
  50. OSCLCN DATA 0B1H ; ACTIVE
  51. OSCICL DATA 0C7H ; ACTIVE
  52. PCA0CENT DATA 09EH ; ACTIVE
  53. PCA0CLR DATA 09CH ; ACTIVE
  54. PCA0CN DATA 0D8H ; ACTIVE
  55. PCA0CPH0 DATA 0FCH ; ACTIVE
  56. PCA0CPH1 DATA 0EAH ; ACTIVE
  57. PCA0CPH2 DATA 0ECH ; ACTIVE
  58. PCA0CPL0 DATA 0FBH ; ACTIVE
  59. PCA0CPL1 DATA 0E9H ; ACTIVE
  60. PCA0CPL2 DATA 0EBH ; ACTIVE
  61. PCA0CPM0 DATA 0DAH ; ACTIVE
  62. PCA0CPM1 DATA 0DBH ; ACTIVE
  63. PCA0CPM2 DATA 0DCH ; ACTIVE
  64. PCA0H DATA 0FAH ; ACTIVE
  65. PCA0L DATA 0F9H ; ACTIVE
  66. PCA0MD DATA 0D9H ; ACTIVE
  67. PCA0POL DATA 096H ; ACTIVE
  68. PCA0PWM DATA 0F7H ; ACTIVE
  69. P0 DATA 080H ;
  70. P0MASK DATA 0FEH ; ACTIVE
  71. P0MAT DATA 0FDH ; ACTIVE
  72. P0MDIN DATA 0F1H ; ACTIVE
  73. P0MDOUT DATA 0A4H ; ACTIVE
  74. P0SKIP DATA 0D4H ; ACTIVE
  75. P1 DATA 090H ; ACTIVE
  76. P1MASK DATA 0EEH ; ACTIVE
  77. P1MAT DATA 0EDH ; ACTIVE
  78. P1MDIN DATA 0F2H ; ACTIVE
  79. P1MDOUT DATA 0A5H ; ACTIVE
  80. P1SKIP DATA 0D5H ; ACTIVE
  81. P2 DATA 0A0H ;
  82. P2MDOUT DATA 0A6H ; ACTIVE
  83. PRTDRV DATA 0F6H ; ACTIVE
  84. XBR0 DATA 0E1H ; ACTIVE
  85. XBR1 DATA 0E2H ; ACTIVE
  86. XBR2 DATA 0E3H ; ACTIVE
  87. RSTSRC DATA 0EFH ; ACTIVE
  88. SMB0ADM DATA 0D6H ; ACTIVE
  89. SMB0ADR DATA 0D7H ; ACTIVE
  90. SMB0CF DATA 0C1H ; ACTIVE
  91. SMB0CN DATA 0C0H ; ACTIVE
  92. SMB0DAT DATA 0C2H ; ACTIVE
  93. SMB0TC DATA 0ACH ; ACTIVE
  94. SPI0CFG DATA 0A1H ; ACTIVE
  95. SPI0CKR DATA 0A2H ; ACTIVE
  96. SPI0CN DATA 0F8H ; ACTIVE
  97. SPI0DAT DATA 0A3H ; ACTIVE
  98. TCON DATA 088H ; ACTIVE
  99. TH0 DATA 08CH ; ACTIVE
  100. TH1 DATA 08DH ; ACTIVE
  101. TL0 DATA 08AH ; ACTIVE
  102. TL1 DATA 08BH ; ACTIVE
  103. TMOD DATA 089H ; ACTIVE
  104. TMR2CN DATA 0C8H ;
  105. TMR2H DATA 0CDH ; ACTIVE
  106. TMR2L DATA 0CCH ; ACTIVE
  107. TMR2RLH DATA 0CBH ; ACTIVE
  108. TMR2RLL DATA 0CAH ; ACTIVE
  109. TMR3CN DATA 091H ; ACTIVE
  110. TMR3H DATA 095H ; ACTIVE
  111. TMR3L DATA 094H ; ACTIVE
  112. TMR3RLH DATA 093H ; ACTIVE
  113. TMR3RLL DATA 092H ; ACTIVE
  114. SBUF0 DATA 099H ; ACTIVE
  115. SCON0 DATA 098H ;
  116. REF0CN DATA 0D1H ; ACTIVE
  117. REG0CN DATA 0C9H ; ACTIVE
  118. VDM0CN DATA 0FFH ; ACTIVE
  119. WDTCN DATA 097H ;
  120. ; SFR ADDRESSES END
  121. ; BIT DEFINITIONS
  122. ; ADC0CN0 0xE8
  123. AD0EN BIT ADC0CN0.7 ;
  124. BURSTEN BIT ADC0CN0.6 ;
  125. AD0INT BIT ADC0CN0.5 ;
  126. AD0BUSY BIT ADC0CN0.4 ;
  127. AD0WINT BIT ADC0CN0.3 ;
  128. ADC0M2 BIT ADC0CN0.2 ;
  129. ADC0M1 BIT ADC0CN0.1 ;
  130. ADC0M0 BIT ADC0CN0.0 ;
  131. ; IE 0xA8
  132. EA BIT IE.7 ; Global Interrupt Enable
  133. ESPI0 BIT IE.6 ; Serial Peripheral Interface Enable
  134. ET2 BIT IE.5 ; Timer 2 Interrupt Enable
  135. ES0 BIT IE.4 ; Serial Port Interrupt Enable
  136. ET1 BIT IE.3 ; Timer 1 Interrupt Enable
  137. EX1 BIT IE.2 ; External Interrupt Enable
  138. ET0 BIT IE.1 ; Timer 0 Interrupt Enable
  139. EX0 BIT IE.0 ; External Interrupt 0 Enable
  140. ; IP 0xB8
  141. ; bit 7 UNUSED
  142. PSPI0 BIT IP.6 ; Serial Peripheral Interface Priority
  143. PT2 BIT IP.5 ; Timer 2 Priority
  144. PS0 BIT IP.4 ; Serial Port Priority
  145. PT1 BIT IP.3 ; Timer 1 Priority
  146. PX1 BIT IP.2 ; External Interrupt 1 Priority
  147. PT0 BIT IP.1 ; Timer 0 Priority
  148. PX0 BIT IP.0 ; External Interrupt 0 Priority
  149. ; PCA0CN 0xD8
  150. CF BIT PCA0CN.7 ; PCA 0 Counter Overflow Flag
  151. CR BIT PCA0CN.6 ; PCA 0 Counter Run Control Bit
  152. ; bit 5 UNUSED
  153. ; bit 4 UNUSED
  154. ; bit 3 UNUSED
  155. CCF2 BIT PCA0CN.2 ; PCA 0 Module 2 Interrupt Flag
  156. CCF1 BIT PCA0CN.1 ; PCA 0 Module 1 Interrupt Flag
  157. CCF0 BIT PCA0CN.0 ; PCA 0 Module 0 Interrupt Flag
  158. ; PSW 0xD0
  159. CY BIT PSW.7 ; Carry Flag
  160. AC BIT PSW.6 ; Auxiliary Carry Flag
  161. F0 BIT PSW.5 ; User Flag 0
  162. RS1 BIT PSW.4 ; Register Bank Select 1
  163. RS0 BIT PSW.3 ; Register Bank Select 0
  164. OV BIT PSW.2 ; Overflow Flag
  165. F1 BIT PSW.1 ; User Flag 1
  166. P BIT PSW.0 ; Accumulator Parity Flag
  167. ; SCON0 0x98
  168. S0MODE BIT SCON0.7 ; Serial Mode Control Bit 0
  169. ; bit 6 UNUSED
  170. MCE0 BIT SCON0.5 ; Multiprocessor Communication Enable
  171. REN0 BIT SCON0.4 ; Receive Enable
  172. TB80 BIT SCON0.3 ; Transmit Bit 8
  173. RB80 BIT SCON0.2 ; Receive Bit 8
  174. TI0 BIT SCON0.1 ; Transmit Interrupt Flag
  175. RI0 BIT SCON0.0 ; Receive Interrupt Flag
  176. ; SMB0CN 0xC0
  177. MASTER0 BIT SMB0CN.7 ; SMBus Master/Slave Indicator
  178. TXMODE0 BIT SMB0CN.6 ; SMBus Transmit Mode Indicator
  179. STA0 BIT SMB0CN.5 ; SMBus Start Flag
  180. STO0 BIT SMB0CN.4 ; SMBus Stop Flag
  181. ACKRQ0 BIT SMB0CN.3 ; SMBus Acknowledge Request
  182. ARBLOST0 BIT SMB0CN.2 ; SMBus Arbitration Lost Indicator
  183. ACK0 BIT SMB0CN.1 ; SMBus Acknowledge
  184. SI0 BIT SMB0CN.0 ; SMBus Interrupt
  185. ; SPI0CN 0xF8
  186. SPIF BIT SPI0CN.7 ; SPI 0 Interrupt Flag
  187. WCOL BIT SPI0CN.6 ; SPI 0 Write Collision Flag
  188. MODF BIT SPI0CN.5 ; SPI 0 Mode Fault Flag
  189. RXOVRN BIT SPI0CN.4 ; SPI 0 RX Overrun Flag
  190. NSSMD1 BIT SPI0CN.3 ; SPI 0 NSS Mode Bit 1
  191. NSSMD0 BIT SPI0CN.2 ; SPI 0 NSS Mode Bit 0
  192. TXBMT BIT SPI0CN.1 ; SPI 0 Transmit Buffer Empty Flag
  193. SPIEN BIT SPI0CN.0 ; SPI 0 SPI Enable
  194. ; TCON 0x88
  195. TF1 BIT TCON.7 ; Timer 1 Overflow Flag
  196. TR1 BIT TCON.6 ; Timer 1 On/Off Control
  197. TF0 BIT TCON.5 ; Timer 0 Overflow Flag
  198. TR0 BIT TCON.4 ; Timer 0 On/Off Control
  199. IE1 BIT TCON.3 ; Ext. Interrupt 1 Edge Flag
  200. IT1 BIT TCON.2 ; Ext. Interrupt 1 Type
  201. IE0 BIT TCON.1 ; Ext. Interrupt 0 Edge Flag
  202. IT0 BIT TCON.0 ; Ext. Interrupt 0 Type
  203. ; TMR2CN 0xC8
  204. TF2H BIT TMR2CN.7 ; T2 High-Byte Overflow Flag
  205. TF2L BIT TMR2CN.6 ; T2 Low-Byte Overflow Flag
  206. TF2LEN BIT TMR2CN.5 ; T2 Low Byte Interrupt Enable
  207. TF2CEN BIT TMR2CN.4 ; T2 Input Capture Enable
  208. T2SPLIT BIT TMR2CN.3 ; T2 Split-Mode Enable
  209. TR2 BIT TMR2CN.2 ; Timer 2 On/Off Control
  210. ; bit 1 UNUSED
  211. T2XCLK BIT TMR2CN.0 ; T2 External Clock Select