SPCE061A.inc
上传用户:sdjqgc
上传日期:2022-08-06
资源大小:2404k
文件大小:13k
开发平台:

Asm

  1. // ========================================================================= //
  2. // File Name   : SPCE061A.inc  //
  3. // Description : SPCE061A register definitions  //
  4. // Processor   : SPCE061A  //
  5. // Revision    : v1.00, 2005-10-19  //
  6. // ========================================================================= //
  7. //***************************************************************************//
  8. // Register definitions  //
  9. //***************************************************************************//
  10. // IO port control registers
  11. .DEFINE P_IOA_Data 0x7000
  12. .DEFINE P_IOA_Buffer 0x7001
  13. .DEFINE P_IOA_Dir 0x7002
  14. .DEFINE P_IOA_Attrib 0x7003
  15. .DEFINE P_IOA_Latch 0x7004
  16. .DEFINE P_IOB_Data 0x7005
  17. .DEFINE P_IOB_Buffer 0x7006
  18. .DEFINE P_IOB_Dir 0x7007
  19. .DEFINE P_IOB_Attrib 0x7008
  20. // Timer control registers
  21. .DEFINE P_TimerA_Data 0x700A
  22. .DEFINE P_TimerA_Ctrl 0x700B
  23. .DEFINE P_TimerB_Data 0x700C
  24. .DEFINE P_TimerB_Ctrl 0x700D
  25. // Timebase control registers
  26. .DEFINE P_TimeBase_Setup 0x700E
  27. .DEFINE P_Timebase_Setup 0x700E // Same as P_TimeBase_Setup
  28. .DEFINE P_TimeBase_Clear 0x700F
  29. .DEFINE P_Timebase_Clear 0x700F // Same as P_TimeBase_Clear
  30. // Interrupt control registers
  31. .DEFINE P_INT_Ctrl 0x7010
  32. .DEFINE P_INT_Clear 0x7011
  33. .DEFINE P_INT_Mask 0x702D
  34. .DEFINE P_INT_Ctrl_New 0x702D // Same as P_INT_Mask
  35. // Analog functions control registers
  36. .DEFINE P_ADC 0x7014
  37. .DEFINE P_ADC_Ctrl 0x7015
  38. .DEFINE P_ADC_MUX_Ctrl 0x702B
  39. .DEFINE P_ADC_MUX_Data 0x702C
  40. .DEFINE P_ADC_LINEIN_Data 0x702C // Same as P_ADC_MUX_Data
  41. .DEFINE P_ADC_LineIn_Data 0x702C // Same as P_ADC_MUX_Data
  42. .DEFINE P_DAC_Ctrl 0x702A
  43. .DEFINE P_DAC1 0x7017
  44. .DEFINE P_DAC2 0x7016
  45. // Serial functions control registers
  46. .DEFINE P_SIO_Data 0x701A
  47. .DEFINE P_SIO_Addr_Low 0x701B
  48. .DEFINE P_SIO_Addr_Mid 0x701C
  49. .DEFINE P_SIO_Addr_High 0x701D
  50. .DEFINE P_SIO_Ctrl 0x701E
  51. .DEFINE P_SIO_Start 0x701F
  52. .DEFINE P_SIO_Stop 0x7020
  53. .DEFINE P_UART_Command1 0x7021
  54. .DEFINE P_UART_Command2 0x7022
  55. .DEFINE P_UART_Data 0x7023
  56. .DEFINE P_UART_BaudScalarLow 0x7024
  57. .DEFINE P_UART_BaudScalarHigh 0x7025
  58. // Other control registers
  59. .DEFINE P_Feedback 0x7009
  60. .DEFINE P_SystemClock 0x7013
  61. .DEFINE P_Watchdog_Clear 0x7012
  62. .DEFINE P_LVD_Ctrl 0x7019
  63. .DEFINE P_Flash_Ctrl 0x7555
  64. //***************************************************************************//
  65. // Constant definitions  //
  66. //***************************************************************************//
  67. // Constants for interrupt
  68. .DEFINE C_FIQ_PWM 0x8000 // P_INT_Ctrl
  69. .DEFINE C_FIQ_TMA 0x2000 // P_INT_Ctrl
  70. .DEFINE C_FIQ_TMB 0x0800 // P_INT_Ctrl
  71. .DEFINE C_IRQ0_PWM 0x4000 // P_INT_Ctrl
  72. .DEFINE C_IRQ1_TMA 0x1000 // P_INT_Ctrl
  73. .DEFINE C_IRQ2_TMB 0x0400 // P_INT_Ctrl
  74. .DEFINE C_IRQ3_KEY 0x0080 // P_INT_Ctrl
  75. .DEFINE C_IRQ3_EXT1 0x0100 // P_INT_Ctrl
  76. .DEFINE C_IRQ3_EXT2 0x0200 // P_INT_Ctrl
  77. .DEFINE C_IRQ4_1KHz 0x0010 // P_INT_Ctrl
  78. .DEFINE C_IRQ4_2KHz 0x0020 // P_INT_Ctrl
  79. .DEFINE C_IRQ4_4KHz 0x0040 // P_INT_Ctrl
  80. .DEFINE C_IRQ5_2Hz 0x0004 // P_INT_Ctrl
  81. .DEFINE C_IRQ5_4Hz 0x0008 // P_INT_Ctrl
  82. .DEFINE C_IRQ6_TMB1 0x0002 // P_INT_Ctrl
  83. .DEFINE C_IRQ6_TMB2 0x0001 // P_INT_Ctrl
  84. // Constants for TimerA & TimerB
  85. .DEFINE C_TMA1_FOSC_2 0x0000 // P_TimerA_Ctrl
  86. .DEFINE C_TMA1_FOSC_256 0x0001 // P_TimerA_Ctrl
  87. .DEFINE C_TMA1_32KHz 0x0002 // P_TimerA_Ctrl
  88. .DEFINE C_TMA1_8KHz 0x0003 // P_TimerA_Ctrl
  89. .DEFINE C_TMA1_4KHz 0x0004 // P_TimerA_Ctrl
  90. .DEFINE C_TMA1_1 0x0005 // P_TimerA_Ctrl
  91. .DEFINE C_TMA1_0 0x0006 // P_TimerA_Ctrl
  92. .DEFINE C_TMA1_EXT1 0x0007 // P_TimerA_Ctrl
  93. .DEFINE C_TMA2_2KHz 0x0000 // P_TimerA_Ctrl
  94. .DEFINE C_TMA2_1KHz 0x0008 // P_TimerA_Ctrl
  95. .DEFINE C_TMA2_256Hz 0x0010 // P_TimerA_Ctrl
  96. .DEFINE C_TMA2_TMB1 0x0018 // P_TimerA_Ctrl
  97. .DEFINE C_TMA2_4Hz 0x0020 // P_TimerA_Ctrl
  98. .DEFINE C_TMA2_2Hz 0x0028 // P_TimerA_Ctrl
  99. .DEFINE C_TMA2_1 0x0030 // P_TimerA_Ctrl
  100. .DEFINE C_TMA2_EXT2 0x0038 // P_TimerA_Ctrl
  101. .DEFINE C_TMA_PWM_OFF 0x0000 // P_TimerA_Ctrl
  102. .DEFINE C_TMA_PWM_D1 0x0040 // P_TimerA_Ctrl
  103. .DEFINE C_TMA_PWM_D2 0x0080 // P_TimerA_Ctrl
  104. .DEFINE C_TMA_PWM_D3 0x00C0 // P_TimerA_Ctrl
  105. .DEFINE C_TMA_PWM_D4 0x0100 // P_TimerA_Ctrl
  106. .DEFINE C_TMA_PWM_D5 0x0140 // P_TimerA_Ctrl
  107. .DEFINE C_TMA_PWM_D6 0x0180 // P_TimerA_Ctrl
  108. .DEFINE C_TMA_PWM_D7 0x01C0 // P_TimerA_Ctrl
  109. .DEFINE C_TMA_PWM_D8 0x0200 // P_TimerA_Ctrl
  110. .DEFINE C_TMA_PWM_D9 0x0240 // P_TimerA_Ctrl
  111. .DEFINE C_TMA_PWM_D10 0x0280 // P_TimerA_Ctrl
  112. .DEFINE C_TMA_PWM_D11 0x02C0 // P_TimerA_Ctrl
  113. .DEFINE C_TMA_PWM_D12 0x0300 // P_TimerA_Ctrl
  114. .DEFINE C_TMA_PWM_D13 0x0340 // P_TimerA_Ctrl
  115. .DEFINE C_TMA_PWM_D14 0x0380 // P_TimerA_Ctrl
  116. .DEFINE C_TMA_PWM_TA 0x03C0 // P_TimerA_Ctrl
  117.     
  118. .DEFINE C_TMB_FOSC_2 0x0000 // P_TimerB_Ctrl
  119. .DEFINE C_TMB_FOSC_256 0x0001 // P_TimerB_Ctrl
  120. .DEFINE C_TMB_32KHz 0x0002 // P_TimerB_Ctrl
  121. .DEFINE C_TMB_8KHz 0x0003 // P_TimerB_Ctrl
  122. .DEFINE C_TMB_4KHz 0x0004 // P_TimerB_Ctrl
  123. .DEFINE C_TMB_1 0x0005 // P_TimerB_Ctrl
  124. .DEFINE C_TMB_0 0x0006 // P_TimerB_Ctrl
  125. .DEFINE C_TMB_EXT1 0x0007 // P_TimerB_Ctrl
  126. .DEFINE C_TMB_PWM_OFF 0x0000 // P_TimerB_Ctrl
  127. .DEFINE C_TMB_PWM_D1 0x0040 // P_TimerB_Ctrl
  128. .DEFINE C_TMB_PWM_D2 0x0080 // P_TimerB_Ctrl
  129. .DEFINE C_TMB_PWM_D3 0x00C0 // P_TimerB_Ctrl
  130. .DEFINE C_TMB_PWM_D4 0x0100 // P_TimerB_Ctrl
  131. .DEFINE C_TMB_PWM_D5 0x0140 // P_TimerB_Ctrl
  132. .DEFINE C_TMB_PWM_D6 0x0180 // P_TimerB_Ctrl
  133. .DEFINE C_TMB_PWM_D7 0x01C0 // P_TimerB_Ctrl
  134. .DEFINE C_TMB_PWM_D8 0x0200 // P_TimerB_Ctrl
  135. .DEFINE C_TMB_PWM_D9 0x0240 // P_TimerB_Ctrl
  136. .DEFINE C_TMB_PWM_D10 0x0280 // P_TimerB_Ctrl
  137. .DEFINE C_TMB_PWM_D11 0x02C0 // P_TimerB_Ctrl
  138. .DEFINE C_TMB_PWM_D12 0x0300 // P_TimerB_Ctrl
  139. .DEFINE C_TMB_PWM_D13 0x0340 // P_TimerB_Ctrl
  140. .DEFINE C_TMB_PWM_D14 0x0380 // P_TimerB_Ctrl
  141. .DEFINE C_TMB_PWM_TB 0x03C0 // P_TimerB_Ctrl
  142. // Constants for TimeBase
  143. .DEFINE C_TMB1_8Hz 0x0000 // P_Timebase_Setup
  144. .DEFINE C_TMB1_16Hz 0x0001 // P_Timebase_Setup
  145. .DEFINE C_TMB1_32Hz 0x0002 // P_Timebase_Setup
  146. .DEFINE C_TMB1_64Hz 0x0003 // P_Timebase_Setup
  147. .DEFINE C_TMB2_128Hz 0x0000 // P_Timebase_Setup
  148. .DEFINE C_TMB2_256Hz 0x0004 // P_Timebase_Setup
  149. .DEFINE C_TMB2_512Hz 0x0008 // P_Timebase_Setup
  150. .DEFINE C_TMB2_1024Hz 0x000c // P_Timebase_Setup
  151. // Constants for system clock
  152. .DEFINE C_Fosc_49M 0x0080 // P_SystemClock
  153. .DEFINE C_Fosc_40M 0x0060 // P_SystemClock
  154. .DEFINE C_Fosc_32M 0x0040 // P_SystemClock
  155. .DEFINE C_Fosc_24M 0x0000 // P_SystemClock
  156. .DEFINE C_Fosc_20M 0x0020 // P_SystemClock
  157.     
  158. .DEFINE C_Fosc 0x0000 // P_SystemClock
  159. .DEFINE C_Fosc_Div_2 0x0001 // P_SystemClock
  160. .DEFINE C_Fosc_Div_4 0x0002 // P_SystemClock
  161. .DEFINE C_Fosc_Div_8 0x0003 // P_SystemClock
  162. .DEFINE C_Fosc_Div_16 0x0004 // P_SystemClock
  163. .DEFINE C_Fosc_Div_32 0x0005 // P_SystemClock
  164. .DEFINE C_Fosc_Div_64 0x0006 // P_SystemClock
  165. .DEFINE C_Sleep 0x0007 // P_SystemClock
  166. .DEFINE C_StrongMode 0x0008 // P_SystemClock
  167. .DEFINE C_AutoMode 0x0000 // P_SystemClock
  168. .DEFINE C_32K_Work 0x0010 // P_SystemClock
  169. .DEFINE C_32K_Off 0x0000 // P_SystemClock
  170. // Constants for ADC & DAC
  171. .DEFINE C_ADC_EN 0x0001 // P_ADC_Ctrl
  172. .DEFINE C_ADC_DIS 0x0000 // P_ADC_Ctrl
  173. .DEFINE C_MIC_RDY 0x8000 // P_ADC_Ctrl
  174. .DEFINE C_MIC_EN 0x0000 // P_ADC_Ctrl
  175. .DEFINE C_MIC_DIS 0x0002 // P_ADC_Ctrl
  176. .DEFINE C_MIC_AGC_EN 0x0000 // P_ADC_Ctrl
  177. .DEFINE C_MIC_AGC_DIS 0x0000 // P_ADC_Ctrl
  178. .DEFINE C_VEXTREF_EN 0x0080 // P_ADC_Ctrl
  179. .DEFINE C_VEXTREF_DIS 0x0000 // P_ADC_Ctrl
  180. .DEFINE C_2V_EN 0x0100 // P_ADC_Ctrl
  181. .DEFINE C_2V_DIS 0x0000 // P_ADC_Ctrl
  182. .DEFINE C_DAC_3mA 0x0040 // P_ADC_Ctrl
  183. .DEFINE C_DAC_2mA 0x0000 // P_ADC_Ctrl
  184. .DEFINE C_ADC_MUX_MIC 0x0000 // P_ADC_MUX_Ctrl
  185. .DEFINE C_ADC_MUX_IOA0 0x0001 // P_ADC_MUX_Ctrl
  186. .DEFINE C_ADC_MUX_IOA1 0x0002 // P_ADC_MUX_Ctrl
  187. .DEFINE C_ADC_MUX_IOA2 0x0003 // P_ADC_MUX_Ctrl
  188. .DEFINE C_ADC_MUX_IOA3 0x0004 // P_ADC_MUX_Ctrl
  189. .DEFINE C_ADC_MUX_IOA4 0x0005 // P_ADC_MUX_Ctrl
  190. .DEFINE C_ADC_MUX_IOA5 0x0006 // P_ADC_MUX_Ctrl
  191. .DEFINE C_ADC_MUX_IOA6 0x0007 // P_ADC_MUX_Ctrl
  192. .DEFINE C_LINEIN_FAIL 0x4000 // P_ADC_MUX_Ctrl
  193. .DEFINE C_LINEIN_RDY 0x8000 // P_ADC_MUX_Ctrl
  194. .DEFINE C_DAC1_DIRECT 0x0000 // P_DAC_Ctrl
  195. .DEFINE C_DAC1_LATCH_A 0x0080 // P_DAC_Ctrl
  196. .DEFINE C_DAC1_LATCH_B 0x0100 // P_DAC_Ctrl
  197. .DEFINE C_DAC1_LATCH_AB 0x0180 // P_DAC_Ctrl
  198. .DEFINE C_DAC2_DIRECT 0x0000 // P_DAC_Ctrl
  199. .DEFINE C_DAC2_LATCH_A 0x0020 // P_DAC_Ctrl
  200. .DEFINE C_DAC2_LATCH_B 0x0040 // P_DAC_Ctrl
  201. .DEFINE C_DAC2_LATCH_AB 0x0060 // P_DAC_Ctrl
  202. .DEFINE C_MIC_DIRECT 0x0000 // P_DAC_Ctrl
  203. .DEFINE C_MIC_LATCH_A 0x0008 // P_DAC_Ctrl
  204. .DEFINE C_MIC_LATCH_B 0x0010 // P_DAC_Ctrl
  205. .DEFINE C_MIC_LATCH_AB 0x0018 // P_DAC_Ctrl
  206. .DEFINE C_DAC_DIS 0x0002 // P_DAC_Ctrl
  207. // Constants for SIO
  208. .DEFINE C_SIO_CONFIG 0x0080 // P_SIO_Ctrl
  209. .DEFINE C_SIO_READ 0x0000 // P_SIO_Ctrl
  210. .DEFINE C_SIO_WRITE 0x0040 // P_SIO_Ctrl
  211. .DEFINE C_SIO_CLOCK_32 0x0018 // P_SIO_Ctrl
  212. .DEFINE C_SIO_CLOCK_16 0x0000 // P_SIO_Ctrl
  213. .DEFINE C_SIO_CLOCK_8 0x0010 // P_SIO_Ctrl
  214. .DEFINE C_SIO_ADDR_24 0x0003 // P_SIO_Ctrl
  215. .DEFINE C_SIO_ADDR_16 0x0000 // P_SIO_Ctrl
  216. .DEFINE C_SIO_ADDR_8 0x0002 // P_SIO_Ctrl
  217. .DEFINE C_SIO_ADDR_NO 0x0001 // P_SIO_Ctrl
  218. .DEFINE C_SIO_BUSY 0x0080 // P_SIO_Start
  219. // Constants for UART
  220. .DEFINE C_UART_RX_INT 0x0080 // P_UART_Command1
  221. .DEFINE C_UART_TX_INT 0x0040 // P_UART_Command1
  222. .DEFINE C_UART_RESET 0x0020 // P_UART_Command1
  223. .DEFINE C_UART_PARITY_EVEN 0x0008 // P_UART_Command1
  224. .DEFINE C_UART_PARITY_ODD 0x0000 // P_UART_Command1
  225. .DEFINE C_UART_PARITY_EN 0x0004 // P_UART_Command1
  226. .DEFINE C_UART_PARITY_DIS 0x0000 // P_UART_Command1
  227. .DEFINE C_UART_RX_RDY 0x0080 // P_UART_Command2
  228. .DEFINE C_UART_TX_RDY 0x0040 // P_UART_Command2
  229. .DEFINE C_UART_RX_EN 0x0080 // P_UART_Command2
  230. .DEFINE C_UART_TX_EN 0x0040 // P_UART_Command2
  231. .DEFINE C_UART_PE 0x0008 // P_UART_Command2
  232. .DEFINE C_UART_OE 0x0010 // P_UART_Command2
  233. .DEFINE C_UART_FE 0x0020 // P_UART_Command2
  234. // Constants for Feedback
  235. .DEFINE C_FEEDBACK1_EN 0x0004 // P_Feedback
  236. .DEFINE C_FEEDBACK2_EN 0x0008 // P_Feedback
  237. .DEFINE C_IRTX_EN 0x0001 // P_Feedback
  238. // Constants for LVD
  239. .DEFINE C_LVD33V 0x0002 // P_LVD_Ctrl
  240. .DEFINE C_LVD29V 0x0001 // P_LVD_Ctrl
  241. // Other Constants
  242. .DEFINE C_WDTCLR 0x0001 // P_Watchdog_Clear
  243. ///////////////////////////////////////////////////////////////////
  244. // Old definitions for LVD @'hardware.inc'
  245. .DEFINE C_LVD24V 0x0000 // P_LVD_Ctrl
  246. .DEFINE C_LVD28V 0x0001 // P_LVD_Ctrl
  247. .DEFINE C_LVD32V 0x0002 // P_LVD_Ctrl
  248. .DEFINE C_LVD36V 0x0003 // P_LVD_Ctrl
  249. // Old definitions for TimerA & TimerB @'hardware.inc'
  250. .DEFINE C_Fosc_2 0x0000 // P_TimerA_Ctrl
  251. .DEFINE C_Fosc_256      0x0001 // P_TimerA_Ctrl
  252. .DEFINE C_32768Hz 0x0002 // P_TimerA_Ctrl
  253. .DEFINE C_8192Hz 0x0003 // P_TimerA_Ctrl
  254. .DEFINE C_4096Hz 0x0004 // P_TimerA_Ctrl
  255. .DEFINE C_A1 0x0005 // P_TimerA_Ctrl
  256. .DEFINE C_A0 0x0006 // P_TimerA_Ctrl
  257. .DEFINE C_Ext1 0x0007 // P_TimerA_Ctrl
  258. .DEFINE C_2048Hz 0x0000 // P_TimerA_Ctrl, P_TimerB_Ctrl
  259. .DEFINE C_1024Hz 0x0008 // P_TimerA_Ctrl, P_TimerB_Ctrl
  260. .DEFINE C_256Hz 0x0010 // P_TimerA_Ctrl, P_TimerB_Ctrl
  261. .DEFINE C_TMB1Hz 0x0018 // P_TimerA_Ctrl, P_TimerB_Ctrl
  262. .DEFINE C_4Hz 0x0020 // P_TimerA_Ctrl, P_TimerB_Ctrl
  263. .DEFINE C_2Hz 0x0028 // P_TimerA_Ctrl, P_TimerB_Ctrl
  264. .DEFINE C_B1 0x0030 // P_TimerA_Ctrl, P_TimerB_Ctrl
  265. .DEFINE C_Ext2 0x0038 // P_TimerA_Ctrl, P_TimerB_Ctrl
  266. .DEFINE C_Off 0x0000 // P_TimerA_Ctrl, P_TimerB_Ctrl
  267. .DEFINE C_D1 0x0040 // P_TimerA_Ctrl, P_TimerB_Ctrl
  268. .DEFINE C_D2 0x0080 // P_TimerA_Ctrl, P_TimerB_Ctrl
  269. .DEFINE C_D3 0x00C0 // P_TimerA_Ctrl, P_TimerB_Ctrl
  270. .DEFINE C_D4 0x0100 // P_TimerA_Ctrl, P_TimerB_Ctrl
  271. .DEFINE C_D5 0x0140 // P_TimerA_Ctrl, P_TimerB_Ctrl
  272. .DEFINE C_D6 0x0180 // P_TimerA_Ctrl, P_TimerB_Ctrl
  273. .DEFINE C_D7 0x01C0 // P_TimerA_Ctrl, P_TimerB_Ctrl
  274. .DEFINE C_D8 0x0200 // P_TimerA_Ctrl, P_TimerB_Ctrl
  275. .DEFINE C_D9 0x0240 // P_TimerA_Ctrl, P_TimerB_Ctrl
  276. .DEFINE C_D10 0x0280 // P_TimerA_Ctrl, P_TimerB_Ctrl
  277. .DEFINE C_D11 0x02C0 // P_TimerA_Ctrl, P_TimerB_Ctrl
  278. .DEFINE C_D12 0x0300 // P_TimerA_Ctrl, P_TimerB_Ctrl
  279. .DEFINE C_D13 0x0340 // P_TimerA_Ctrl, P_TimerB_Ctrl
  280. .DEFINE C_D14 0x0380 // P_TimerA_Ctrl, P_TimerB_Ctrl
  281. .DEFINE C_TA_Div_2 0x03C0 // P_TimerA_Ctrl
  282. .DEFINE C_TB_Div_2 0x03C0 // P_TimerB_Ctrl
  283. //========================================================================================
  284. // End of SPCE061A.inc
  285. //========================================================================================