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.

431 lines
22 KiB

  1. ;------------------------------------------------------------------------------
  2. ; Copyright 2014 Silicon Laboratories, Inc.
  3. ; All rights reserved. This program and the accompanying materials
  4. ; are made available under the terms of the Silicon Laboratories End User
  5. ; License Agreement which accompanies this distribution, and is available at
  6. ; http://developer.silabs.com/legal/version/v11/Silicon_Labs_Software_License_Agreement.txt
  7. ; Original content and implementation provided by Silicon Laboratories.
  8. ;------------------------------------------------------------------------------
  9. ;Supported Devices:
  10. ; EFM8BB21F16G_QFN20
  11. ; EFM8BB21F16G_QSOP24
  12. ; EFM8BB21F16I_QFN20
  13. ; EFM8BB21F16I_QSOP24
  14. ; EFM8BB22F16G_QFN28
  15. ; EFM8BB22F16I_QFN28
  16. ;-----------------------------------------------------------------------------
  17. ; Register Definitions
  18. ;-----------------------------------------------------------------------------
  19. ACC DATA 0E0H; Accumulator
  20. ADC0AC DATA 0B3H; ADC0 Accumulator Configuration
  21. ADC0CF DATA 0BCH; ADC0 Configuration
  22. ADC0CN0 DATA 0E8H; ADC0 Control 0
  23. ADC0CN1 DATA 0B2H; ADC0 Control 1
  24. ADC0GTH DATA 0C4H; ADC0 Greater-Than High Byte
  25. ADC0GTL DATA 0C3H; ADC0 Greater-Than Low Byte
  26. ADC0H DATA 0BEH; ADC0 Data Word High Byte
  27. ADC0L DATA 0BDH; ADC0 Data Word Low Byte
  28. ADC0LTH DATA 0C6H; ADC0 Less-Than High Byte
  29. ADC0LTL DATA 0C5H; ADC0 Less-Than Low Byte
  30. ADC0MX DATA 0BBH; ADC0 Multiplexer Selection
  31. ADC0PWR DATA 0DFH; ADC0 Power Control
  32. ADC0TK DATA 0B9H; ADC0 Burst Mode Track Time
  33. B DATA 0F0H; B Register
  34. CKCON0 DATA 08EH; Clock Control 0
  35. CKCON1 DATA 0A6H; Clock Control 1
  36. CLKSEL DATA 0A9H; Clock Select
  37. CMP0CN0 DATA 09BH; Comparator 0 Control 0
  38. CMP0CN1 DATA 099H; Comparator 0 Control 1
  39. CMP0MD DATA 09DH; Comparator 0 Mode
  40. CMP0MX DATA 09FH; Comparator 0 Multiplexer Selection
  41. CMP1CN0 DATA 0BFH; Comparator 1 Control 0
  42. CMP1CN1 DATA 0ACH; Comparator 1 Control 1
  43. CMP1MD DATA 0ABH; Comparator 1 Mode
  44. CMP1MX DATA 0AAH; Comparator 1 Multiplexer Selection
  45. CRC0CN0 DATA 0CEH; CRC0 Control 0
  46. CRC0CN1 DATA 086H; CRC0 Control 1
  47. CRC0CNT DATA 0D3H; CRC0 Automatic Flash Sector Count
  48. CRC0DAT DATA 0DEH; CRC0 Data Output
  49. CRC0FLIP DATA 0CFH; CRC0 Bit Flip
  50. CRC0IN DATA 0DDH; CRC0 Data Input
  51. CRC0ST DATA 0D2H; CRC0 Automatic Flash Sector Start
  52. DERIVID DATA 0ADH; Derivative Identification
  53. DEVICEID DATA 0B5H; Device Identification
  54. DPH DATA 083H; Data Pointer High
  55. DPL DATA 082H; Data Pointer Low
  56. EIE1 DATA 0E6H; Extended Interrupt Enable 1
  57. EIE2 DATA 0CEH; Extended Interrupt Enable 2
  58. EIP1 DATA 0F3H; Extended Interrupt Priority 1 Low
  59. EIP1H DATA 0F5H; Extended Interrupt Priority 1 High
  60. EIP2 DATA 0F4H; Extended Interrupt Priority 2
  61. EIP2H DATA 0F6H; Extended Interrupt Priority 2 High
  62. EMI0CN DATA 0E7H; External Memory Interface Control
  63. FLKEY DATA 0B7H; Flash Lock and Key
  64. HFO0CAL DATA 0C7H; High Frequency Oscillator 0 Calibration
  65. HFO1CAL DATA 0D6H; High Frequency Oscillator 1 Calibration
  66. HFOCN DATA 0EFH; High Frequency Oscillator Control
  67. I2C0CN0 DATA 0BAH; I2C0 Control
  68. I2C0DIN DATA 0BCH; I2C0 Received Data
  69. I2C0DOUT DATA 0BBH; I2C0 Transmit Data
  70. I2C0FCN0 DATA 0ADH; I2C0 FIFO Control 0
  71. I2C0FCN1 DATA 0ABH; I2C0 FIFO Control 1
  72. I2C0FCT DATA 0F5H; I2C0 FIFO Count
  73. I2C0SLAD DATA 0BDH; I2C0 Slave Address
  74. I2C0STAT DATA 0B9H; I2C0 Status
  75. IE DATA 0A8H; Interrupt Enable
  76. IP DATA 0B8H; Interrupt Priority
  77. IPH DATA 0F2H; Interrupt Priority High
  78. IT01CF DATA 0E4H; INT0/INT1 Configuration
  79. LFO0CN DATA 0B1H; Low Frequency Oscillator Control
  80. P0 DATA 080H; Port 0 Pin Latch
  81. P0MASK DATA 0FEH; Port 0 Mask
  82. P0MAT DATA 0FDH; Port 0 Match
  83. P0MDIN DATA 0F1H; Port 0 Input Mode
  84. P0MDOUT DATA 0A4H; Port 0 Output Mode
  85. P0SKIP DATA 0D4H; Port 0 Skip
  86. P1 DATA 090H; Port 1 Pin Latch
  87. P1MASK DATA 0EEH; Port 1 Mask
  88. P1MAT DATA 0EDH; Port 1 Match
  89. P1MDIN DATA 0F2H; Port 1 Input Mode
  90. P1MDOUT DATA 0A5H; Port 1 Output Mode
  91. P1SKIP DATA 0D5H; Port 1 Skip
  92. P2 DATA 0A0H; Port 2 Pin Latch
  93. P2MASK DATA 0FCH; Port 2 Mask
  94. P2MAT DATA 0FBH; Port 2 Match
  95. P2MDIN DATA 0F3H; Port 2 Input Mode
  96. P2MDOUT DATA 0A6H; Port 2 Output Mode
  97. P2SKIP DATA 0CCH; Port 2 Skip
  98. P3 DATA 0B0H; Port 3 Pin Latch
  99. P3MDIN DATA 0F4H; Port 3 Input Mode
  100. P3MDOUT DATA 09CH; Port 3 Output Mode
  101. PCA0CENT DATA 09EH; PCA Center Alignment Enable
  102. PCA0CLR DATA 09CH; PCA Comparator Clear Control
  103. PCA0CN0 DATA 0D8H; PCA Control
  104. PCA0CPH0 DATA 0FCH; PCA Channel 0 Capture Module High Byte
  105. PCA0CPH1 DATA 0EAH; PCA Channel 1 Capture Module High Byte
  106. PCA0CPH2 DATA 0ECH; PCA Channel 2 Capture Module High Byte
  107. PCA0CPL0 DATA 0FBH; PCA Channel 0 Capture Module Low Byte
  108. PCA0CPL1 DATA 0E9H; PCA Channel 1 Capture Module Low Byte
  109. PCA0CPL2 DATA 0EBH; PCA Channel 2 Capture Module Low Byte
  110. PCA0CPM0 DATA 0DAH; PCA Channel 0 Capture/Compare Mode
  111. PCA0CPM1 DATA 0DBH; PCA Channel 1 Capture/Compare Mode
  112. PCA0CPM2 DATA 0DCH; PCA Channel 2 Capture/Compare Mode
  113. PCA0H DATA 0FAH; PCA Counter/Timer High Byte
  114. PCA0L DATA 0F9H; PCA Counter/Timer Low Byte
  115. PCA0MD DATA 0D9H; PCA Mode
  116. PCA0POL DATA 096H; PCA Output Polarity
  117. PCA0PWM DATA 0F7H; PCA PWM Configuration
  118. PCON0 DATA 087H; Power Control
  119. PCON1 DATA 09AH; Power Control 1
  120. PFE0CN DATA 0C1H; Prefetch Engine Control
  121. PRTDRV DATA 0F6H; Port Drive Strength
  122. PSCTL DATA 08FH; Program Store Control
  123. PSW DATA 0D0H; Program Status Word
  124. REF0CN DATA 0D1H; Voltage Reference Control
  125. REG0CN DATA 0C9H; Voltage Regulator 0 Control
  126. REG1CN DATA 0C6H; Voltage Regulator 1 Control
  127. REVID DATA 0B6H; Revision Identifcation
  128. RSTSRC DATA 0EFH; Reset Source
  129. SBCON1 DATA 094H; UART1 Baud Rate Generator Control
  130. SBRLH1 DATA 096H; UART1 Baud Rate Generator High Byte
  131. SBRLL1 DATA 095H; UART1 Baud Rate Generator Low Byte
  132. SBUF0 DATA 099H; UART0 Serial Port Data Buffer
  133. SBUF1 DATA 092H; UART1 Serial Port Data Buffer
  134. SCON0 DATA 098H; UART0 Serial Port Control
  135. SCON1 DATA 0C8H; UART1 Serial Port Control
  136. SFRPAGE DATA 0A7H; SFR Page
  137. SFRPGCN DATA 0CFH; SFR Page Control
  138. SFRSTACK DATA 0D7H; SFR Page Stack
  139. SMB0ADM DATA 0D6H; SMBus 0 Slave Address Mask
  140. SMB0ADR DATA 0D7H; SMBus 0 Slave Address
  141. SMB0CF DATA 0C1H; SMBus 0 Configuration
  142. SMB0CN0 DATA 0C0H; SMBus 0 Control
  143. SMB0DAT DATA 0C2H; SMBus 0 Data
  144. SMB0FCN0 DATA 0C3H; SMBus 0 FIFO Control 0
  145. SMB0FCN1 DATA 0C4H; SMBus 0 FIFO Control 1
  146. SMB0FCT DATA 0EFH; SMBus 0 FIFO Count
  147. SMB0RXLN DATA 0C5H; SMBus 0 Receive Length Counter
  148. SMB0TC DATA 0ACH; SMBus 0 Timing and Pin Control
  149. SMOD1 DATA 093H; UART1 Mode
  150. SP DATA 081H; Stack Pointer
  151. SPI0CFG DATA 0A1H; SPI0 Configuration
  152. SPI0CKR DATA 0A2H; SPI0 Clock Rate
  153. SPI0CN0 DATA 0F8H; SPI0 Control
  154. SPI0DAT DATA 0A3H; SPI0 Data
  155. SPI0FCN0 DATA 09AH; SPI0 FIFO Control 0
  156. SPI0FCN1 DATA 09BH; SPI0 FIFO Control 1
  157. SPI0FCT DATA 0F7H; SPI0 FIFO Count
  158. TCON DATA 088H; Timer 0/1 Control
  159. TH0 DATA 08CH; Timer 0 High Byte
  160. TH1 DATA 08DH; Timer 1 High Byte
  161. TL0 DATA 08AH; Timer 0 Low Byte
  162. TL1 DATA 08BH; Timer 1 Low Byte
  163. TMOD DATA 089H; Timer 0/1 Mode
  164. TMR2CN0 DATA 0C8H; Timer 2 Control 0
  165. TMR2CN1 DATA 0FDH; Timer 2 Control 1
  166. TMR2H DATA 0CDH; Timer 2 High Byte
  167. TMR2L DATA 0CCH; Timer 2 Low Byte
  168. TMR2RLH DATA 0CBH; Timer 2 Reload High Byte
  169. TMR2RLL DATA 0CAH; Timer 2 Reload Low Byte
  170. TMR3CN0 DATA 091H; Timer 3 Control 0
  171. TMR3CN1 DATA 0FEH; Timer 3 Control 1
  172. TMR3H DATA 095H; Timer 3 High Byte
  173. TMR3L DATA 094H; Timer 3 Low Byte
  174. TMR3RLH DATA 093H; Timer 3 Reload High Byte
  175. TMR3RLL DATA 092H; Timer 3 Reload Low Byte
  176. TMR4CN0 DATA 098H; Timer 4 Control 0
  177. TMR4CN1 DATA 0FFH; Timer 4 Control 1
  178. TMR4H DATA 0A5H; Timer 4 High Byte
  179. TMR4L DATA 0A4H; Timer 4 Low Byte
  180. TMR4RLH DATA 0A3H; Timer 4 Reload High Byte
  181. TMR4RLL DATA 0A2H; Timer 4 Reload Low Byte
  182. UART1FCN0 DATA 09DH; UART1 FIFO Control 0
  183. UART1FCN1 DATA 0D8H; UART1 FIFO Control 1
  184. UART1FCT DATA 0FAH; UART1 FIFO Count
  185. UART1LIN DATA 09EH; UART1 LIN Configuration
  186. VDM0CN DATA 0FFH; Supply Monitor Control
  187. WDTCN DATA 097H; Watchdog Timer Control
  188. XBR0 DATA 0E1H; Port I/O Crossbar 0
  189. XBR1 DATA 0E2H; Port I/O Crossbar 1
  190. XBR2 DATA 0E3H; Port I/O Crossbar 2
  191. ;------------------------------------------------------------------------------
  192. ; 16-bit Register Definitions (may not work on all compilers)
  193. ;------------------------------------------------------------------------------
  194. ADC0GT DATA 0C3H ; ADC0 Greater-Than Low Byte
  195. ADC0 DATA 0BDH ; ADC0 Data Word Low Byte
  196. ADC0LT DATA 0C5H ; ADC0 Less-Than Low Byte
  197. DP DATA 082H ; Data Pointer Low
  198. PCA0CP0 DATA 0FBH ; PCA Channel 0 Capture Module Low Byte
  199. PCA0CP1 DATA 0E9H ; PCA Channel 1 Capture Module Low Byte
  200. PCA0CP2 DATA 0EBH ; PCA Channel 2 Capture Module Low Byte
  201. PCA0 DATA 0F9H ; PCA Counter/Timer Low Byte
  202. SBRL1 DATA 095H ; UART1 Baud Rate Generator Low Byte
  203. TMR2 DATA 0CCH ; Timer 2 Low Byte
  204. TMR2RL DATA 0CAH ; Timer 2 Reload Low Byte
  205. TMR3 DATA 094H ; Timer 3 Low Byte
  206. TMR3RL DATA 092H ; Timer 3 Reload Low Byte
  207. TMR4 DATA 0A4H ; Timer 4 Low Byte
  208. TMR4RL DATA 0A2H ; Timer 4 Reload Low Byte
  209. ;------------------------------------------------------------------------------
  210. ; Indirect Register Definitions
  211. ;------------------------------------------------------------------------------
  212. ;------------------------------------------------------------------------------
  213. ; Bit Definitions
  214. ;------------------------------------------------------------------------------
  215. ; ACC 0xE0 (Accumulator)
  216. ACC_ACC0 BIT ACC.0 ; Accumulator Bit 0
  217. ACC_ACC1 BIT ACC.1 ; Accumulator Bit 1
  218. ACC_ACC2 BIT ACC.2 ; Accumulator Bit 2
  219. ACC_ACC3 BIT ACC.3 ; Accumulator Bit 3
  220. ACC_ACC4 BIT ACC.4 ; Accumulator Bit 4
  221. ACC_ACC5 BIT ACC.5 ; Accumulator Bit 5
  222. ACC_ACC6 BIT ACC.6 ; Accumulator Bit 6
  223. ACC_ACC7 BIT ACC.7 ; Accumulator Bit 7
  224. ; ADC0CN0 0xE8 (ADC0 Control 0)
  225. ADC0CN0_ADCM0 BIT ADC0CN0.0 ; Start of Conversion Mode Select Bit 0
  226. ADC0CN0_ADCM1 BIT ADC0CN0.1 ; Start of Conversion Mode Select Bit 1
  227. ADC0CN0_ADCM2 BIT ADC0CN0.2 ; Start of Conversion Mode Select Bit 2
  228. ADC0CN0_ADWINT BIT ADC0CN0.3 ; Window Compare Interrupt Flag
  229. ADC0CN0_ADBUSY BIT ADC0CN0.4 ; ADC Busy
  230. ADC0CN0_ADINT BIT ADC0CN0.5 ; Conversion Complete Interrupt Flag
  231. ADC0CN0_ADBMEN BIT ADC0CN0.6 ; Burst Mode Enable
  232. ADC0CN0_ADEN BIT ADC0CN0.7 ; ADC Enable
  233. ; B 0xF0 (B Register)
  234. B_B0 BIT B.0 ; B Register Bit 0
  235. B_B1 BIT B.1 ; B Register Bit 1
  236. B_B2 BIT B.2 ; B Register Bit 2
  237. B_B3 BIT B.3 ; B Register Bit 3
  238. B_B4 BIT B.4 ; B Register Bit 4
  239. B_B5 BIT B.5 ; B Register Bit 5
  240. B_B6 BIT B.6 ; B Register Bit 6
  241. B_B7 BIT B.7 ; B Register Bit 7
  242. ; IE 0xA8 (Interrupt Enable)
  243. IE_EX0 BIT IE.0 ; External Interrupt 0 Enable
  244. IE_ET0 BIT IE.1 ; Timer 0 Interrupt Enable
  245. IE_EX1 BIT IE.2 ; External Interrupt 1 Enable
  246. IE_ET1 BIT IE.3 ; Timer 1 Interrupt Enable
  247. IE_ES0 BIT IE.4 ; UART0 Interrupt Enable
  248. IE_ET2 BIT IE.5 ; Timer 2 Interrupt Enable
  249. IE_ESPI0 BIT IE.6 ; SPI0 Interrupt Enable
  250. IE_EA BIT IE.7 ; All Interrupts Enable
  251. ; IP 0xB8 (Interrupt Priority)
  252. IP_PX0 BIT IP.0 ; External Interrupt 0 Priority Control LSB
  253. IP_PT0 BIT IP.1 ; Timer 0 Interrupt Priority Control LSB
  254. IP_PX1 BIT IP.2 ; External Interrupt 1 Priority Control LSB
  255. IP_PT1 BIT IP.3 ; Timer 1 Interrupt Priority Control LSB
  256. IP_PS0 BIT IP.4 ; UART0 Interrupt Priority Control LSB
  257. IP_PT2 BIT IP.5 ; Timer 2 Interrupt Priority Control LSB
  258. IP_PSPI0 BIT IP.6 ; Serial Peripheral Interface (SPI0) Interrupt Priority Control LSB
  259. ; P0 0x80 (Port 0 Pin Latch)
  260. P0_B0 BIT P0.0 ; Port 0 Bit 0 Latch
  261. P0_B1 BIT P0.1 ; Port 0 Bit 1 Latch
  262. P0_B2 BIT P0.2 ; Port 0 Bit 2 Latch
  263. P0_B3 BIT P0.3 ; Port 0 Bit 3 Latch
  264. P0_B4 BIT P0.4 ; Port 0 Bit 4 Latch
  265. P0_B5 BIT P0.5 ; Port 0 Bit 5 Latch
  266. P0_B6 BIT P0.6 ; Port 0 Bit 6 Latch
  267. P0_B7 BIT P0.7 ; Port 0 Bit 7 Latch
  268. ; P1 0x90 (Port 1 Pin Latch)
  269. P1_B0 BIT P1.0 ; Port 1 Bit 0 Latch
  270. P1_B1 BIT P1.1 ; Port 1 Bit 1 Latch
  271. P1_B2 BIT P1.2 ; Port 1 Bit 2 Latch
  272. P1_B3 BIT P1.3 ; Port 1 Bit 3 Latch
  273. P1_B4 BIT P1.4 ; Port 1 Bit 4 Latch
  274. P1_B5 BIT P1.5 ; Port 1 Bit 5 Latch
  275. P1_B6 BIT P1.6 ; Port 1 Bit 6 Latch
  276. P1_B7 BIT P1.7 ; Port 1 Bit 7 Latch
  277. ; P2 0xA0 (Port 2 Pin Latch)
  278. P2_B0 BIT P2.0 ; Port 2 Bit 0 Latch
  279. P2_B1 BIT P2.1 ; Port 2 Bit 1 Latch
  280. P2_B2 BIT P2.2 ; Port 2 Bit 2 Latch
  281. P2_B3 BIT P2.3 ; Port 2 Bit 3 Latch
  282. ; P3 0xB0 (Port 3 Pin Latch)
  283. P3_B0 BIT P3.0 ; Port 3 Bit 0 Latch
  284. P3_B1 BIT P3.1 ; Port 3 Bit 1 Latch
  285. ; PCA0CN0 0xD8 (PCA Control)
  286. PCA0CN0_CCF0 BIT PCA0CN0.0 ; PCA Module 0 Capture/Compare Flag
  287. PCA0CN0_CCF1 BIT PCA0CN0.1 ; PCA Module 1 Capture/Compare Flag
  288. PCA0CN0_CCF2 BIT PCA0CN0.2 ; PCA Module 2 Capture/Compare Flag
  289. PCA0CN0_CR BIT PCA0CN0.6 ; PCA Counter/Timer Run Control
  290. PCA0CN0_CF BIT PCA0CN0.7 ; PCA Counter/Timer Overflow Flag
  291. ; PSW 0xD0 (Program Status Word)
  292. PSW_PARITY BIT PSW.0 ; Parity Flag
  293. PSW_F1 BIT PSW.1 ; User Flag 1
  294. PSW_OV BIT PSW.2 ; Overflow Flag
  295. PSW_RS0 BIT PSW.3 ; Register Bank Select Bit 0
  296. PSW_RS1 BIT PSW.4 ; Register Bank Select Bit 1
  297. PSW_F0 BIT PSW.5 ; User Flag 0
  298. PSW_AC BIT PSW.6 ; Auxiliary Carry Flag
  299. PSW_CY BIT PSW.7 ; Carry Flag
  300. ; SCON0 0x98 (UART0 Serial Port Control)
  301. SCON0_RI BIT SCON0.0 ; Receive Interrupt Flag
  302. SCON0_TI BIT SCON0.1 ; Transmit Interrupt Flag
  303. SCON0_RB8 BIT SCON0.2 ; Ninth Receive Bit
  304. SCON0_TB8 BIT SCON0.3 ; Ninth Transmission Bit
  305. SCON0_REN BIT SCON0.4 ; Receive Enable
  306. SCON0_MCE BIT SCON0.5 ; Multiprocessor Communication Enable
  307. SCON0_SMODE BIT SCON0.7 ; Serial Port 0 Operation Mode
  308. ; SCON1 0xC8 (UART1 Serial Port Control)
  309. SCON1_RI BIT SCON1.0 ; Receive Interrupt Flag
  310. SCON1_TI BIT SCON1.1 ; Transmit Interrupt Flag
  311. SCON1_RBX BIT SCON1.2 ; Extra Receive Bit
  312. SCON1_TBX BIT SCON1.3 ; Extra Transmission Bit
  313. SCON1_REN BIT SCON1.4 ; Receive Enable
  314. SCON1_PERR BIT SCON1.6 ; Parity Error Flag
  315. SCON1_OVR BIT SCON1.7 ; Receive FIFO Overrun Flag
  316. ; SMB0CN0 0xC0 (SMBus 0 Control)
  317. SMB0CN0_SI BIT SMB0CN0.0 ; SMBus Interrupt Flag
  318. SMB0CN0_ACK BIT SMB0CN0.1 ; SMBus Acknowledge
  319. SMB0CN0_ARBLOST BIT SMB0CN0.2 ; SMBus Arbitration Lost Indicator
  320. SMB0CN0_ACKRQ BIT SMB0CN0.3 ; SMBus Acknowledge Request
  321. SMB0CN0_STO BIT SMB0CN0.4 ; SMBus Stop Flag
  322. SMB0CN0_STA BIT SMB0CN0.5 ; SMBus Start Flag
  323. SMB0CN0_TXMODE BIT SMB0CN0.6 ; SMBus Transmit Mode Indicator
  324. SMB0CN0_MASTER BIT SMB0CN0.7 ; SMBus Master/Slave Indicator
  325. ; SPI0CN0 0xF8 (SPI0 Control)
  326. SPI0CN0_SPIEN BIT SPI0CN0.0 ; SPI0 Enable
  327. SPI0CN0_TXNF BIT SPI0CN0.1 ; TX FIFO Not Full
  328. SPI0CN0_NSSMD0 BIT SPI0CN0.2 ; Slave Select Mode Bit 0
  329. SPI0CN0_NSSMD1 BIT SPI0CN0.3 ; Slave Select Mode Bit 1
  330. SPI0CN0_RXOVRN BIT SPI0CN0.4 ; Receive Overrun Flag
  331. SPI0CN0_MODF BIT SPI0CN0.5 ; Mode Fault Flag
  332. SPI0CN0_WCOL BIT SPI0CN0.6 ; Write Collision Flag
  333. SPI0CN0_SPIF BIT SPI0CN0.7 ; SPI0 Interrupt Flag
  334. ; TCON 0x88 (Timer 0/1 Control)
  335. TCON_IT0 BIT TCON.0 ; Interrupt 0 Type Select
  336. TCON_IE0 BIT TCON.1 ; External Interrupt 0
  337. TCON_IT1 BIT TCON.2 ; Interrupt 1 Type Select
  338. TCON_IE1 BIT TCON.3 ; External Interrupt 1
  339. TCON_TR0 BIT TCON.4 ; Timer 0 Run Control
  340. TCON_TF0 BIT TCON.5 ; Timer 0 Overflow Flag
  341. TCON_TR1 BIT TCON.6 ; Timer 1 Run Control
  342. TCON_TF1 BIT TCON.7 ; Timer 1 Overflow Flag
  343. ; TMR2CN0 0xC8 (Timer 2 Control 0)
  344. TMR2CN0_T2XCLK0 BIT TMR2CN0.0 ; Timer 2 External Clock Select Bit 0
  345. TMR2CN0_T2XCLK1 BIT TMR2CN0.1 ; Timer 2 External Clock Select Bit 1
  346. TMR2CN0_TR2 BIT TMR2CN0.2 ; Timer 2 Run Control
  347. TMR2CN0_T2SPLIT BIT TMR2CN0.3 ; Timer 2 Split Mode Enable
  348. TMR2CN0_TF2CEN BIT TMR2CN0.4 ; Timer 2 Capture Enable
  349. TMR2CN0_TF2LEN BIT TMR2CN0.5 ; Timer 2 Low Byte Interrupt Enable
  350. TMR2CN0_TF2L BIT TMR2CN0.6 ; Timer 2 Low Byte Overflow Flag
  351. TMR2CN0_TF2H BIT TMR2CN0.7 ; Timer 2 High Byte Overflow Flag
  352. ; TMR4CN0 0x98 (Timer 4 Control 0)
  353. TMR4CN0_T4XCLK0 BIT TMR4CN0.0 ; Timer 4 External Clock Select Bit 0
  354. TMR4CN0_T4XCLK1 BIT TMR4CN0.1 ; Timer 4 External Clock Select Bit 1
  355. TMR4CN0_TR4 BIT TMR4CN0.2 ; Timer 4 Run Control
  356. TMR4CN0_T4SPLIT BIT TMR4CN0.3 ; Timer 4 Split Mode Enable
  357. TMR4CN0_TF4CEN BIT TMR4CN0.4 ; Timer 4 Capture Enable
  358. TMR4CN0_TF4LEN BIT TMR4CN0.5 ; Timer 4 Low Byte Interrupt Enable
  359. TMR4CN0_TF4L BIT TMR4CN0.6 ; Timer 4 Low Byte Overflow Flag
  360. TMR4CN0_TF4H BIT TMR4CN0.7 ; Timer 4 High Byte Overflow Flag
  361. ; UART1FCN1 0xD8 (UART1 FIFO Control 1)
  362. UART1FCN1_RIE BIT UART1FCN1.0 ; Receive Interrupt Enable
  363. UART1FCN1_RXTO0 BIT UART1FCN1.1 ; Receive Timeout Bit 0
  364. UART1FCN1_RXTO1 BIT UART1FCN1.2 ; Receive Timeout Bit 1
  365. UART1FCN1_RFRQ BIT UART1FCN1.3 ; Receive FIFO Request
  366. UART1FCN1_TIE BIT UART1FCN1.4 ; Transmit Interrupt Enable
  367. UART1FCN1_TXHOLD BIT UART1FCN1.5 ; Transmit Hold
  368. UART1FCN1_TXNF BIT UART1FCN1.6 ; TX FIFO Not Full
  369. UART1FCN1_TFRQ BIT UART1FCN1.7 ; Transmit FIFO Request
  370. ;------------------------------------------------------------------------------
  371. ; Interrupt Definitions
  372. ;------------------------------------------------------------------------------
  373. INT0_IRQn EQU 0 ; External Interrupt 0
  374. TIMER0_IRQn EQU 1 ; Timer 0 Overflow
  375. INT1_IRQn EQU 2 ; External Interrupt 1
  376. TIMER1_IRQn EQU 3 ; Timer 1 Overflow
  377. UART0_IRQn EQU 4 ; UART0
  378. TIMER2_IRQn EQU 5 ; Timer 2 Overflow / Capture
  379. SPI0_IRQn EQU 6 ; SPI0
  380. SMBUS0_IRQn EQU 7 ; SMBus 0
  381. PMATCH_IRQn EQU 8 ; Port Match
  382. ADC0WC_IRQn EQU 9 ; ADC0 Window Compare
  383. ADC0EOC_IRQn EQU 10 ; ADC0 End of Conversion
  384. PCA0_IRQn EQU 11 ; PCA0
  385. CMP0_IRQn EQU 12 ; Comparator 0
  386. CMP1_IRQn EQU 13 ; Comparator 1
  387. TIMER3_IRQn EQU 14 ; Timer 3 Overflow / Capture
  388. UART1_IRQn EQU 17 ; UART1
  389. I2C0_IRQn EQU 18 ; I2C0 Slave
  390. TIMER4_IRQn EQU 19 ; Timer 4 Overflow / Capture
  391. ;------------------------------------------------------------------------------
  392. ; SFR Page Definitions
  393. ;------------------------------------------------------------------------------
  394. CRC0_PAGE EQU 000H ; CRC0 Page
  395. LEGACY_PAGE EQU 000H ; Legacy SFR Page
  396. PCA0_PAGE EQU 000H ; PCA0 Page
  397. PG2_PAGE EQU 010H ; Page2
  398. TIMER2_PAGE EQU 010H ; Timer 2 Page
  399. TIMER3_PAGE EQU 010H ; Timer 3 Page
  400. TIMER4_PAGE EQU 010H ; Timer 4 Page
  401. I2CSLAVE0_PAGE EQU 020H ; I2C Slave 0 Page
  402. PG3_PAGE EQU 020H ; Page3
  403. SMB0_PAGE EQU 020H ; SMBus 0 Page
  404. SPI0_PAGE EQU 020H ; SPI0 Page
  405. UART0_PAGE EQU 020H ; UART0 Page
  406. UART1_PAGE EQU 020H ; UART1 Page