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.

204 lines
9.0 KiB

12 years ago
  1. ;---------------------------------------------------------------------------
  2. ;
  3. ;
  4. ;
  5. ;
  6. ; FILE NAME: C8051F330.INC
  7. ; TARGET MCUs: C8051F330, F331
  8. ; DESCRIPTION: Register/bit definitions for the C8051F330 product family.
  9. ;
  10. ; REVISION 1.0
  11. ;
  12. ;---------------------------------------------------------------------------
  13. ;REGISTER DEFINITIONS
  14. ;
  15. P0 DATA 080H ; PORT 0 LATCH
  16. SP DATA 081H ; STACK POINTER
  17. DPL DATA 082H ; DATA POINTER LOW
  18. DPH DATA 083H ; DATA POINTER HIGH
  19. PCON DATA 087H ; POWER CONTROL
  20. TCON DATA 088H ; TIMER/COUNTER CONTROL
  21. TMOD DATA 089H ; TIMER/COUNTER MODE
  22. TL0 DATA 08AH ; TIMER/COUNTER 0 LOW
  23. TL1 DATA 08BH ; TIMER/COUNTER 1 LOW
  24. TH0 DATA 08CH ; TIMER/COUNTER 0 HIGH
  25. TH1 DATA 08DH ; TIMER/COUNTER 1 HIGH
  26. CKCON DATA 08EH ; CLOCK CONTROL
  27. PSCTL DATA 08FH ; PROGRAM STORE R/W CONTROL
  28. P1 DATA 090H ; PORT 1 LATCH
  29. TMR3CN DATA 091H ; TIMER/COUNTER 3 CONTROL
  30. TMR3RLL DATA 092H ; TIMER/COUNTER 3 RELOAD LOW
  31. TMR3RLH DATA 093H ; TIMER/COUNTER 3 RELOAD HIGH
  32. TMR3L DATA 094H ; TIMER/COUNTER 3 LOW
  33. TMR3H DATA 095H ; TIMER/COUNTER 3 HIGH
  34. IDA0L DATA 096H ; CURRENT MODE DAC0 LOW
  35. IDA0H DATA 097H ; CURRENT MODE DAC0 HIGH
  36. SCON0 DATA 098H ; UART0 CONTROL
  37. SBUF0 DATA 099H ; UART0 DATA BUFFER
  38. CPT0CN DATA 09BH ; COMPARATOR0 CONTROL
  39. CPT0MD DATA 09DH ; COMPARATOR0 MODE SELECTION
  40. CPT0MX DATA 09FH ; COMPARATOR0 MUX SELECTION
  41. P2 DATA 0A0H ; PORT 2 LATCH
  42. SPI0CFG DATA 0A1H ; SPI CONFIGURATION
  43. SPI0CKR DATA 0A2H ; SPI CLOCK RATE CONTROL
  44. SPI0DAT DATA 0A3H ; SPI DATA
  45. P0MDOUT DATA 0A4H ; PORT 0 OUTPUT MODE CONFIGURATION
  46. P1MDOUT DATA 0A5H ; PORT 1 OUTPUT MODE CONFIGURATION
  47. P2MDOUT DATA 0A6H ; PORT 2 OUTPUT MODE CONFIGURATION
  48. IE DATA 0A8H ; INTERRUPT ENABLE
  49. CLKSEL DATA 0A9H ; CLOCK SELECT
  50. EMI0CN DATA 0AAH ; EXTERNAL MEMORY INTERFACE CONTROL
  51. OSCXCN DATA 0B1H ; EXTERNAL OSCILLATOR CONTROL
  52. OSCICN DATA 0B2H ; INTERNAL OSCILLATOR CONTROL
  53. OSCICL DATA 0B3H ; INTERNAL OSCILLATOR CALIBRATION
  54. FLSCL DATA 0B6H ; FLASH SCALE
  55. FLKEY DATA 0B7H ; FLASH LOCK AND KEY
  56. IP DATA 0B8H ; INTERRUPT PRIORITY
  57. IDA0CN DATA 0B9H ; CURRENT MODE DAC0 CONTROL
  58. AMX0N DATA 0BAH ; AMUX0 NEGATIVE CHANNEL SELECT
  59. AMX0P DATA 0BBH ; AMUX0 POSITIVE CHANNEL SELECT
  60. ADC0CF DATA 0BCH ; ADC0 CONFIGURATION
  61. ADC0L DATA 0BDH ; ADC0 LOW
  62. ADC0H DATA 0BEH ; ADC0 HIGH
  63. SMB0CN DATA 0C0H ; SMBUS CONTROL
  64. SMB0CF DATA 0C1H ; SMBUS CONFIGURATION
  65. SMB0DAT DATA 0C2H ; SMBUS DATA
  66. ADC0GTL DATA 0C3H ; ADC0 GREATER-THAN COMPARE LOW
  67. ADC0GTH DATA 0C4H ; ADC0 GREATER-THAN COMPARE HIGH
  68. ADC0LTL DATA 0C5H ; ADC0 LESS-THAN COMPARE WORD LOW
  69. ADC0LTH DATA 0C6H ; ADC0 LESS-THAN COMPARE WORD HIGH
  70. TMR2CN DATA 0C8H ; TIMER/COUNTER 2 CONTROL
  71. TMR2RLL DATA 0CAH ; TIMER/COUNTER 2 RELOAD LOW
  72. TMR2RLH DATA 0CBH ; TIMER/COUNTER 2 RELOAD HIGH
  73. TMR2L DATA 0CCH ; TIMER/COUNTER 2 LOW
  74. TMR2H DATA 0CDH ; TIMER/COUNTER 2 HIGH
  75. PSW DATA 0D0H ; PROGRAM STATUS WORD
  76. REF0CN DATA 0D1H ; VOLTAGE REFERENCE CONTROL
  77. P0SKIP DATA 0D4H ; PORT 0 SKIP
  78. P1SKIP DATA 0D5H ; PORT 1 SKIP
  79. PCA0CN DATA 0D8H ; PCA CONTROL
  80. PCA0MD DATA 0D9H ; PCA MODE
  81. PCA0CPM0 DATA 0DAH ; PCA MODULE 0 MODE REGISTER
  82. PCA0CPM1 DATA 0DBH ; PCA MODULE 1 MODE REGISTER
  83. PCA0CPM2 DATA 0DCH ; PCA MODULE 2 MODE REGISTER
  84. ACC DATA 0E0H ; ACCUMULATOR
  85. XBR0 DATA 0E1H ; PORT I/O CROSSBAR CONTROL 0
  86. XBR1 DATA 0E2H ; PORT I/O CROSSBAR CONTROL 1
  87. OSCLCN DATA 0E3H ; LOW-FREQUENCY OSCILLATOR CONTROL
  88. IT01CF DATA 0E4H ; INT0/INT1 CONFIGURATION
  89. EIE1 DATA 0E6H ; EXTENDED INTERRUPT ENABLE 1
  90. ADC0CN DATA 0E8H ; ADC0 CONTROL
  91. PCA0CPL1 DATA 0E9H ; PCA CAPTURE 1 LOW
  92. PCA0CPH1 DATA 0EAH ; PCA CAPTURE 1 HIGH
  93. PCA0CPL2 DATA 0EBH ; PCA CAPTURE 2 LOW
  94. PCA0CPH2 DATA 0ECH ; PCA CAPTURE 2 HIGH
  95. RSTSRC DATA 0EFH ; RESET SOURCE CONFIGURATION/STATUS
  96. B DATA 0F0H ; B REGISTER
  97. P0MDIN DATA 0F1H ; PORT 0 INPUT MODE CONFIGURATION
  98. P1MDIN DATA 0F2H ; PORT 1 INPUT MODE CONFIGURATION
  99. EIP1 DATA 0F6H ; EXTENDED INTERRUPT PRIORITY 1
  100. SPI0CN DATA 0F8H ; SPI CONTROL
  101. PCA0L DATA 0F9H ; PCA COUNTER LOW
  102. PCA0H DATA 0FAH ; PCA COUNTER HIGH
  103. PCA0CPL0 DATA 0FBH ; PCA CAPTURE 0 LOW
  104. PCA0CPH0 DATA 0FCH ; PCA CAPTURE 0 HIGH
  105. VDM0CN DATA 0FFH ; VDD MONITOR CONTROL
  106. ;
  107. ;------------------------------------------------------------------------------
  108. ;BIT DEFINITIONS
  109. ;
  110. ; TCON 088H
  111. TF1 BIT 08FH ; TIMER 1 OVERFLOW FLAG
  112. TR1 BIT 08EH ; TIMER 1 ON/OFF CONTROL
  113. TF0 BIT 08DH ; TIMER 0 OVERFLOW FLAG
  114. TR0 BIT 08CH ; TIMER 0 ON/OFF CONTROL
  115. IE1 BIT 08BH ; EXT. INTERRUPT 1 EDGE FLAG
  116. IT1 BIT 08AH ; EXT. INTERRUPT 1 TYPE
  117. IE0 BIT 089H ; EXT. INTERRUPT 0 EDGE FLAG
  118. IT0 BIT 088H ; EXT. INTERRUPT 0 TYPE
  119. ; SCON0 098H
  120. S0MODE BIT 09FH ; UART 0 MODE
  121. MCE0 BIT 09DH ; UART 0 MCE
  122. REN0 BIT 09CH ; UART 0 RX ENABLE
  123. TB80 BIT 09BH ; UART 0 TX BIT 8
  124. RB80 BIT 09AH ; UART 0 RX BIT 8
  125. TI0 BIT 099H ; UART 0 TX INTERRUPT FLAG
  126. RI0 BIT 098H ; UART 0 RX INTERRUPT FLAG
  127. ; IE 0A8H
  128. EA BIT 0AFH ; GLOBAL INTERRUPT ENABLE
  129. ESPI0 BIT 0AEH ; SPI0 INTERRUPT ENABLE
  130. ET2 BIT 0ADH ; TIMER 2 INTERRUPT ENABLE
  131. ES0 BIT 0ACH ; UART0 INTERRUPT ENABLE
  132. ET1 BIT 0ABH ; TIMER 1 INTERRUPT ENABLE
  133. EX1 BIT 0AAH ; EXTERNAL INTERRUPT 1 ENABLE
  134. ET0 BIT 0A9H ; TIMER 0 INTERRUPT ENABLE
  135. EX0 BIT 0A8H ; EXTERNAL INTERRUPT 0 ENABLE
  136. ; IP 0B8H
  137. PSPI0 BIT 0BEH ; SPI0 PRIORITY
  138. PT2 BIT 0BDH ; TIMER 2 PRIORITY
  139. PS0 BIT 0BCH ; UART0 PRIORITY
  140. PT1 BIT 0BBH ; TIMER 1 PRIORITY
  141. PX1 BIT 0BAH ; EXTERNAL INTERRUPT 1 PRIORITY
  142. PT0 BIT 0B9H ; TIMER 0 PRIORITY
  143. PX0 BIT 0B8H ; EXTERNAL INTERRUPT 0 PRIORITY
  144. ; SMB0CN 0C0H
  145. MASTER BIT 0C7H ; SMBUS 0 MASTER/SLAVE
  146. TXMODE BIT 0C6H ; SMBUS 0 TRANSMIT MODE
  147. STA BIT 0C5H ; SMBUS 0 START FLAG
  148. STO BIT 0C4H ; SMBUS 0 STOP FLAG
  149. ACKRQ BIT 0C3H ; SMBUS 0 ACKNOWLEDGE REQUEST
  150. ARBLOST BIT 0C2H ; SMBUS 0 ARBITRATION LOST
  151. ACK BIT 0C1H ; SMBUS 0 ACKNOWLEDGE FLAG
  152. SI BIT 0C0H ; SMBUS 0 INTERRUPT PENDING FLAG
  153. ; TMR2CN 0C8H
  154. TF2H BIT 0CFH ; TIMER 2 HIGH BYTE OVERFLOW FLAG
  155. TF2L BIT 0CEH ; TIMER 2 LOW BYTE OVERFLOW FLAG
  156. TF2LEN BIT 0CDH ; TIMER 2 LOW BYTE INTERRUPT ENABLE
  157. TF2CEN BIT 0CCH ; TIMER 2 LFO CAPTURE ENABLE
  158. T2SPLIT BIT 0CBH ; TIMER 2 SPLIT MODE ENABLE
  159. TR2 BIT 0CAH ; TIMER 2 ON/OFF CONTROL
  160. T2XCLK BIT 0C8H ; TIMER 2 EXTERNAL CLOCK SELECT
  161. ; PSW 0D0H
  162. CY BIT 0D7H ; CARRY FLAG
  163. AC BIT 0D6H ; AUXILIARY CARRY FLAG
  164. F0 BIT 0D5H ; USER FLAG 0
  165. RS1 BIT 0D4H ; REGISTER BANK SELECT 1
  166. RS0 BIT 0D3H ; REGISTER BANK SELECT 0
  167. OV BIT 0D2H ; OVERFLOW FLAG
  168. F1 BIT 0D1H ; USER FLAG 1
  169. P BIT 0D0H ; ACCUMULATOR PARITY FLAG
  170. ; PCA0CN 0D8H
  171. CF BIT 0DFH ; PCA 0 COUNTER OVERFLOW FLAG
  172. CR BIT 0DEH ; PCA 0 COUNTER RUN CONTROL BIT
  173. CCF2 BIT 0DAH ; PCA 0 MODULE 2 INTERRUPT FLAG
  174. CCF1 BIT 0D9H ; PCA 0 MODULE 1 INTERRUPT FLAG
  175. CCF0 BIT 0D8H ; PCA 0 MODULE 0 INTERRUPT FLAG
  176. ; ADC 0 WINDOW INTERRUPT FLAG
  177. ; ADC0CN 0E8H
  178. AD0EN BIT 0EFH ; ADC 0 ENABLE
  179. AD0TM BIT 0EEH ; ADC 0 TRACK MODE
  180. AD0INT BIT 0EDH ; ADC 0 EOC INTERRUPT FLAG
  181. AD0BUSY BIT 0ECH ; ADC 0 BUSY FLAG
  182. AD0WINT BIT 0EBH ; ADC 0 WINDOW INTERRUPT FLAG
  183. AD0CM2 BIT 0EAH ; ADC 0 CONVERT START MODE BIT 2
  184. AD0CM1 BIT 0E9H ; ADC 0 CONVERT START MODE BIT 1
  185. AD0CM0 BIT 0E8H ; ADC 0 CONVERT START MODE BIT 0
  186. ; SPI0CN 0F8H
  187. SPIF BIT 0FFH ; SPI 0 INTERRUPT FLAG
  188. WCOL BIT 0FEH ; SPI 0 WRITE COLLISION FLAG
  189. MODF BIT 0FDH ; SPI 0 MODE FAULT FLAG
  190. RXOVRN BIT 0FCH ; SPI 0 RX OVERRUN FLAG
  191. NSSMD1 BIT 0FBH ; SPI 0 SLAVE SELECT MODE 1
  192. NSSMD0 BIT 0FAH ; SPI 0 SLAVE SELECT MODE 0
  193. TXBMT BIT 0F9H ; SPI 0 TX BUFFER EMPTY FLAG
  194. SPIEN BIT 0F8H ; SPI 0 SPI ENABLE