[Cortex-M0技术交流] 菜鸟学习M0第十八帖——RTC续(通过串口可设置时间及闹钟)

[复制链接]
 楼主| lixiaoxu2meng 发表于 2011-9-27 11:02 | 显示全部楼层 |阅读模式
本帖最后由 lixiaoxu2meng 于 2011-9-27 11:20 编辑

当时发了个RTC的帖子不过是基于 半主机模式的 当时没多想  经过菜农老师的提醒: 说如何进行时间校准呢 于是我将半主机模式改为利用串口 来进行时间校准 初步已经可以设置 时间及闹钟了  
如果想进行时间校准 向下位机发送 a 然后按照提示 逐个 进行设置 然后输入 b结束
如果想进行闹钟设置 向下位机发送 c然后按照提示 逐个 进行设置 然后输入 d结束
功能是实现了 但是自己感觉不太满意 无论是功能还是程序结构 等有时间进行进一步的完善 还请一起学的兄弟们多多指教
main函数
  1. /*---------------------------------------------------------------------------------------------------------*/
  2. /* */
  3. /* Copyright(c) 2011 Nuvoton Technology Corp. All rights reserved. */
  4. /* */
  5. /*---------------------------------------------------------------------------------------------------------*/
  6. #include "includes.h" //包含所需的头文件
  7. S_DRVRTC_TIME_DATA_T Curren_Time;
  8. int32_t AD_Value;
  9. /*************************************************************************************
  10. ** Function name: main
  11. ** Descriptions: 本函数实现:RTC功能及闹钟 (同时也包括:AD温度模块 按键模块 串口模块 定时器模块 GPIO模块 LED数码管显示模块)
  12. 相当一个大杂烩吧
  13. ** input parameters: 无
  14. ** output parameters: 无
  15. ** Returned value: 无
  16. *************************************************************************************/
  17. int main (void)
  18. {
  19. uint8_t i;
  20. Set_System(); //封装一些初始化模块
  21. printf("======RTC实验=====\n");
  22. while(1)
  23. {
  24. if(ID == 1)//查询是否去RTC时间
  25. {
  26. ID = 0;
  27. DrvRTC_Read(DRVRTC_CURRENT_TIME, &Curren_Time);
  28. DrvADC_StartConvert(); // 开启ADC转换
  29. while(DrvADC_IsConversionDone()==FALSE); // 判断ADC是否转换结束 并送串口显示
  30. AD_Value = DrvADC_GetConversionData(7);
  31. AD_Value = AD_Value*3300/4095- 730; // 将电压值转换成温度 经过校准后 确认0度为730mv左右
  32. AD_Value = AD_Value/-2;

  33. printf("当前日期为: %d年%d月%d日 星期%d\n",Curren_Time.u32Year,Curren_Time.u32cMonth,Curren_Time.u32cDay,Curren_Time.u32cDayOfWeek);

  34. printf("当前时间为: %d:%d:%d\n",Curren_Time.u32cHour,Curren_Time.u32cMinute,Curren_Time.u32cSecond);
  35. printf("当前温度为: %d度\n",AD_Value);
  36. }
  37. if(ID == 4)
  38. {
  39. ID = 0;
  40. for(i=0;i<14;i++)
  41. {
  42. Adjust = DATE;
  43. }
  44. RTC_Configuration();
  45. }
  46. if(ID == 5)
  47. {
  48. ID = 0;
  49. for(i=0;i<14;i++)
  50. {
  51. Alarm = DATE;
  52. }
  53. RTC_Configuration();
  54. }
  55. KeyCode = GetKey();
  56. switch(KeyCode)
  57. {
  58. case KEY1_DOWN_USER:
  59. {
  60. DrvGPIO_ClrBit(E_GPB,10); //关闭蜂鸣器
  61. }
  62. break;
  63. case KEY2_DOWN_USER:
  64. {
  65. DrvGPIO_SetBit(E_GPB,10); //开启蜂鸣器
  66. }
  67. break;
  68. default:break;
  69. }
  70. }
  71. }


hw_config函数
  1. #include "includes.h" //包含所需的头文件

  2. /*************************************************************************************
  3. ** Function name: Set_System
  4. ** Descriptions: 封装一些初始化模块
  5. ** input parameters: count
  6. ** output parameters: 无
  7. ** Returned value: 无
  8. *************************************************************************************/
  9. void Set_System(void)
  10. {
  11. RCC_Configuration(); //配置系统时钟

  12. InitButtonVar(); //按键初始化

  13. GPIO_Configuration(); //配置GPIO

  14. USART_Configuration(); //配置USART

  15. ADC_Configuration(); //配置ADC

  16. TIMER_Configuration(); //配置TIMER

  17. RTC_Configuration(); //配置RTC
  18. }
  19. /*************************************************************************************
  20. ** Function name: RCC_Configuration
  21. ** Descriptions: 系统时钟源设置
  22. ** input parameters: none
  23. ** output parameters: none
  24. ** Returned value: none
  25. *************************************************************************************/
  26. void RCC_Configuration(void)
  27. {
  28. UNLOCKREG(); // 对写保护位操作时 需要一次向0x50000 0100写入 0x59,0x16,0x88,
  29. DrvSYS_SetOscCtrl(E_SYS_XTL12M, 1);// 与其 SYSCLK->WRCON.XTL12M_EN = 1; 等同
  30. // PWRCON寄存器(这些寄存器在上电复位到用户解锁定之前是锁定的)除了 BIT[6]位其他位都受写保护
  31. // 解除这些需要向 0x50000 0100写入 0x59,0x16,0x88,
  32. // 令PWRCON寄存器的BITP[0]为1(即设定12M外部晶振)
  33. delay_ms(100); // while (DrvSYS_GetChipClockSourceStatus(E_SYS_XTL12M) != 1);//等待外部12MHZ晶振就绪
  34. LOCKREG(); // 向“0x5000_0100”写入任何值,就可以重锁保护寄存器
  35. }
  36. /*************************************************************************************
  37. ** Function name: GPIO_Configuration
  38. ** Descriptions: GPIO配置
  39. ** input parameters: none
  40. ** output parameters: none
  41. ** Returned value: none
  42. *************************************************************************************/
  43. void GPIO_Configuration()
  44. {
  45. DrvGPIO_Open( E_GPB, 0, E_IO_INPUT ); //RX
  46. DrvGPIO_Open( E_GPB, 1, E_IO_OUTPUT ); //TX

  47. DrvGPIO_Open( E_GPB, 14, E_IO_INPUT ); //按键端口设置为输入
  48. DrvGPIO_Open( E_GPB, 15, E_IO_INPUT );

  49. DrvGPIO_Open( E_GPB, 10, E_IO_OUTPUT );//蜂鸣器引脚设置为输出
  50. DrvGPIO_ClrBit(E_GPB,10); //关闭蜂鸣器

  51. DrvGPIO_Open( E_GPA, 2, E_IO_OUTPUT );//数码管段选
  52. DrvGPIO_Open( E_GPA, 3, E_IO_OUTPUT );
  53. DrvGPIO_Open( E_GPA, 4, E_IO_OUTPUT );
  54. DrvGPIO_Open( E_GPA, 5, E_IO_OUTPUT );
  55. DrvGPIO_Open( E_GPA, 6, E_IO_OUTPUT );
  56. DrvGPIO_Open( E_GPA, 7, E_IO_OUTPUT );
  57. DrvGPIO_Open( E_GPA, 8, E_IO_OUTPUT );
  58. DrvGPIO_Open( E_GPA, 9, E_IO_OUTPUT );
  59. DrvGPIO_Open( E_GPC, 14, E_IO_OUTPUT );//数码管位选
  60. DrvGPIO_Open( E_GPC, 15, E_IO_OUTPUT );
  61. DrvGPIO_Open( E_GPC, 6, E_IO_OUTPUT );
  62. DrvGPIO_Open( E_GPC, 7, E_IO_OUTPUT );
  63. }
  64. /*************************************************************************************
  65. ** Function name: USART_Configuration
  66. ** Descriptions: USART配置
  67. ** input parameters: none
  68. ** output parameters: none
  69. ** Returned value: none
  70. *************************************************************************************/
  71. void USART_Configuration()
  72. {
  73. STR_UART_T param;
  74. DrvSYS_SelectIPClockSource(E_SYS_UART_CLKSRC, 0); //使用外设时注意必须设置该外设的时钟 设置USART的时钟源为外部12MHZ
  75. DrvGPIO_InitFunction(E_FUNC_UART0); // 复用功能引脚设置
  76. param.u32BaudRate = 9600; // 波特率 9600
  77. param.u8cDataBits = DRVUART_DATABITS_8; // 数据位
  78. param.u8cStopBits = DRVUART_STOPBITS_1; // 停止位
  79. param.u8cParity = DRVUART_PARITY_NONE; // 校验位
  80. param.u8cRxTriggerLevel = DRVUART_FIFO_1BYTES; // FIFO存储深度 1 字节
  81. param.u8TimeOut = 0; // FIFO超时设定
  82. DrvUART_Open(UART_PORT0, ¶m); // 串口usart0开启、结构体整体赋值
  83. DrvUART_EnableInt(UART_PORT0, DRVUART_RDAINT,UART_INT_HANDLE);// 使能串口1接收中断并建立一个中断回调函数
  84. }
  85. /*************************************************************************************
  86. ** Function name: UART_INT_HANDLE
  87. ** Descriptions: 串口接收中断
  88. ** input parameters: none
  89. ** output parameters: none
  90. ** Returned value: none
  91. *************************************************************************************/
  92. void UART_INT_HANDLE (uint32_t u32IntStatus)
  93. {
  94. static uint8_t step = 0;
  95. uint8_t buffer[1]={0xFF};
  96. if(u32IntStatus & DRVUART_RDAINT) //如果是接收中断
  97. {
  98. if(UART0->ISR.RDA_IF==1) //如果是串口0接收中断
  99. {
  100. if(ID == 0)
  101. {
  102. DrvUART_Read(UART_PORT0,buffer,1);
  103. if(buffer[0] == 97) //输入'a'进行时间校准
  104. {
  105. ID = 2;
  106. printf("请输入要校准的日期及时间: \n");
  107. printf("请逐个输入两位年份:\n");
  108. step = 0;
  109. }
  110. else if(buffer[0] == 99) //输入'c'进行闹钟设置
  111. {
  112. ID = 3;
  113. printf("请输入闹钟需要设置的日期及时间: \n");
  114. printf("请逐个输入两位年份:\n");
  115. step = 0;
  116. }
  117. }
  118. else if(ID >= 2)
  119. {
  120. switch(step)
  121. {
  122. case 0:
  123. DrvUART_Read(UART_PORT0,buffer,1);
  124. DATE[0] = buffer[0] - 0x30;
  125. step = 1;
  126. break;
  127. case 1:
  128. DrvUART_Read(UART_PORT0,buffer,1);
  129. DATE[1] = buffer[0] - 0x30;
  130. printf("请逐个输入两位月:\n");
  131. step = 2;
  132. break;
  133. case 2:
  134. DrvUART_Read(UART_PORT0,buffer,1);
  135. DATE[2] = buffer[0] - 0x30;
  136. step = 3;
  137. break;
  138. case 3:
  139. DrvUART_Read(UART_PORT0,buffer,1);
  140. DATE[3] = buffer[0] - 0x30;
  141. printf("请逐个输入两位日:\n");
  142. step = 4;
  143. break;
  144. case 4:
  145. DrvUART_Read(UART_PORT0,buffer,1);
  146. DATE[4] = buffer[0] - 0x30;
  147. step = 5;
  148. break;
  149. case 5:
  150. DrvUART_Read(UART_PORT0,buffer,1);
  151. DATE[5] = buffer[0] - 0x30;
  152. printf("请逐个输入两位时:\n");
  153. step = 6;
  154. break;
  155. case 6:
  156. DrvUART_Read(UART_PORT0,buffer,1);
  157. DATE[6] = buffer[0] - 0x30;
  158. step = 7;
  159. break;
  160. case 7:
  161. DrvUART_Read(UART_PORT0,buffer,1);
  162. DATE[7] = buffer[0] - 0x30;
  163. printf("请逐个输入两位分:\n");
  164. step = 8;
  165. break;
  166. case 8:
  167. DrvUART_Read(UART_PORT0,buffer,1);
  168. DATE[8] = buffer[0] - 0x30;
  169. step = 9;
  170. break;
  171. case 9:
  172. DrvUART_Read(UART_PORT0,buffer,1);
  173. DATE[9] = buffer[0] - 0x30;
  174. printf("请逐个输入两位秒:\n");
  175. step = 10;
  176. break;
  177. case 10:
  178. DrvUART_Read(UART_PORT0,buffer,1);
  179. DATE[10] = buffer[0] - 0x30;
  180. step = 11;
  181. break;
  182. case 11:
  183. DrvUART_Read(UART_PORT0,buffer,1);
  184. DATE[11] = buffer[0] - 0x30;
  185. step = 12;
  186. printf("请输入星期:\n");
  187. //printf("请输入b结束:\n");
  188. break;
  189. case 12:
  190. DrvUART_Read(UART_PORT0,buffer,1);
  191. DATE[12] = buffer[0] - 0x30;
  192. step = 13;
  193. if(ID == 2)
  194. printf("请输入b结束时间校准:\n");
  195. else if(ID == 3)
  196. printf("请输入d结束闹钟设置:\n");
  197. break;
  198. case 13:
  199. DrvUART_Read(UART_PORT0,buffer,1);
  200. if(buffer[0] == 98)
  201. ID = 4;
  202. else if(buffer[0] == 100)
  203. ID = 5;
  204. break;
  205. case 14:
  206. break;
  207. case 15:
  208. break;
  209. case 16:
  210. break;
  211. case 17:
  212. break;

  213. default:break;
  214. }
  215. }
  216. }
  217. }


  218. }
  219. /*************************************************************************************
  220. ** Function name: ADC_Configuration
  221. ** Descriptions: 配置USART
  222. ** input parameters: none
  223. ** output parameters: none
  224. ** Returned value: none
  225. *************************************************************************************/
  226. void ADC_Configuration()
  227. {
  228. DrvSYS_SelectIPClockSource(E_SYS_ADC_CLKSRC, 0); //使用外设时注意必须设置该外设的时钟 设置ADC的时钟源为外部12MHZ
  229. DrvADC_Open(ADC_SINGLE_END, ADC_SINGLE_OP, 0, EXTERNAL_12MHZ, 3); // ADC_SINGLE_END AD为单端输入模式
  230. // ADC_SINGLE_OP 单一转换
  231. // 1 GA0作为输入 模式输入通道使能
  232. // EXTERNAL_12MHZ ADC时钟为 外部12MHZ
  233. // 3 AD时钟频率 = ADC时钟/(3+1) = 3MHZ
  234. DrvADC_SetADCChannel(0x10,ADC_SINGLE_END); // 8 设置为模拟通道7
  235. // ADC_SINGLE_END AD为单端输入模式
  236. ADC->ADCR.DMOF = 0; //转化结果无符号
  237. ADC->ADCHER.PRESEL = 0x02; //内部温度传感器
  238. ADC->ADCHER.CHEN = 0x80; //模拟输入通道7使能
  239. SYS->TEMPCR = 0x01; //使能温度传感器

  240. }
  241. /*************************************************************************************
  242. ** Function name: TIMER_Configuration
  243. ** Descriptions: TIMER配置
  244. ** input parameters: none
  245. ** output parameters: none
  246. ** Returned value: none
  247. *************************************************************************************/
  248. void TIMER_Configuration()
  249. {
  250. DrvTIMER_Init(); //初始化定时器

  251. DrvSYS_SelectIPClockSource(E_SYS_TMR0_CLKSRC,0); //使用外设时注意必须设置该外设的时钟 设置TIMER0的时钟源为外部12MHZ

  252. DrvTIMER_Open(E_TMR0,1000,E_PERIODIC_MODE); //设定定时器timer0的tick周期,并且启动定时器:定时器通道 TMR0 每秒1000次 周期模式

  253. DrvTIMER_SetTimerEvent(E_TMR0,5,(TIMER_CALLBACK) Timer0_Callback,0); //安装一个定时处理事件到 timer0通道

  254. DrvTIMER_EnableInt(E_TMR0); //使能定时器中断 //TIMER0->TCSR.IE = 1

  255. DrvTIMER_Start(E_TMR0); //定时器timer0开始计数 //TIMER0->TCSR.CEN = 1;
  256. }
  257. /*************************************************************************************
  258. ** Function name: Timer0_Callback
  259. ** Descriptions: 定时处理事件,LED动态扫描
  260. ** input parameters: none
  261. ** output parameters: none
  262. ** Returned value: none
  263. *************************************************************************************/
  264. void Timer0_Callback (void)
  265. {

  266. static uint8_t count= 0;
  267. static uint8_t count1= 0;
  268. static uint8_t i,xx[4];
  269. uint32_t data;
  270. uint16_t ValueBuff ;
  271. ValueBuff = value;
  272. KeyPro(); //按键扫描 该函数在 button.c 中实现
  273. count++;
  274. count1++;
  275. if(count1>=100)
  276. {
  277. count1 = 0;
  278. if(ID == 0)
  279. ID = 1; //每500ms 将获取RTC时间的标志置一
  280. }
  281. if(count >= 5)
  282. count = 1;
  283. for(i=0;i<4;i++)
  284. {
  285. xx = ValueBuff%10;
  286. ValueBuff = ValueBuff/10;
  287. }
  288. switch(count)
  289. {
  290. case 1:
  291. DrvGPIO_SetBit(E_GPC,14);
  292. DrvGPIO_ClrBit(E_GPC,15);
  293. DrvGPIO_ClrBit(E_GPC,6);
  294. DrvGPIO_ClrBit(E_GPC,7);
  295. data = Table[xx[0]]<<2;
  296. GPIOA->DOUT = data;
  297. break;
  298. case 2:
  299. DrvGPIO_SetBit(E_GPC,15);
  300. DrvGPIO_ClrBit(E_GPC,14);
  301. DrvGPIO_ClrBit(E_GPC,6);
  302. DrvGPIO_ClrBit(E_GPC,7);
  303. data = Table[xx[1]]<<2;
  304. GPIOA->DOUT = data;
  305. break;
  306. case 3:
  307. DrvGPIO_SetBit(E_GPC,7);
  308. DrvGPIO_ClrBit(E_GPC,14);
  309. DrvGPIO_ClrBit(E_GPC,15);
  310. DrvGPIO_ClrBit(E_GPC,6);
  311. data = Table[xx[2]]<<2;
  312. GPIOA->DOUT = data;
  313. break;
  314. case 4:
  315. DrvGPIO_SetBit(E_GPC,6);
  316. DrvGPIO_ClrBit(E_GPC,14);
  317. DrvGPIO_ClrBit(E_GPC,15);
  318. DrvGPIO_ClrBit(E_GPC,7);
  319. data = Table[xx[3]]<<2;
  320. GPIOA->DOUT = data;
  321. //DrvGPIO_ClrBit(E_GPA,9); //显示小数点
  322. break;
  323. default:break;
  324. }
  325. }
  326. /*************************************************************************************
  327. ** Function name: RTC_Configuration
  328. ** Descriptions: RTC配置
  329. ** input parameters: none
  330. ** output parameters: none
  331. ** Returned value: none
  332. *************************************************************************************/
  333. void RTC_Configuration()
  334. {
  335. UNLOCKREG();
  336. /* Step 1. Enable and Select RTC clock source */
  337. SYSCLK->WRCON.XTL32K_EN = 1;//Enable 32Khz for RTC clock source
  338. SYSCLK->APBCLK.RTC_EN =1;//Enable RTC clock source
  339. LOCKREG();
  340. /* Step 2. Initiate and unlock RTC module */
  341. START_RTC();
  342. /* Step 3. Initiate Time and Calendar setting */
  343. RTC->TSSR.HR24 =Adjust[13];//Set 24hour mode
  344. RTC->DWR.DWR =Adjust[12];//Set Sunday
  345. //Set time and calendar for loading register, Calendar: 11/9/18, Time: 12:58:00
  346. Set_CLR(Adjust[0],Adjust[1],Adjust[2],Adjust[3],Adjust[4],Adjust[5]);//设置日期载入寄存器CLR
  347. Set_TLR(Adjust[6],Adjust[7],Adjust[8],Adjust[9],Adjust[10],Adjust[11]);//设置时间载入寄存器TLR
  348. /* Step 4. Set alarm interrupt */
  349. //Set time and calendar for alarm register , Calendar: 11/9/18, Time: 13:10:00
  350. Set_CAR(Alarm[0],Alarm[1],Alarm[2],Alarm[3],Alarm[4],Alarm[5]);//设置日历闹钟寄存器CAR
  351. Set_TAR(Alarm[6],Alarm[7],Alarm[8],Alarm[9],Alarm[10],Alarm[11]);//设置时间闹钟寄存器TAR
  352. DrvRTC_EnableInt(DRVRTC_ALARM_INT, RTC_AlarmCallBackfn); //闹钟中断使能 并设置中断回调函数
  353. }
  354. /*************************************************************************************
  355. ** Function name: RTC_AlarmCallBackfn
  356. ** Descriptions: 闹钟中断函数
  357. ** input parameters: none
  358. ** output parameters: none
  359. ** Returned value: none
  360. *************************************************************************************/
  361. void RTC_AlarmCallBackfn()
  362. {
  363. DrvGPIO_SetBit(E_GPB,10); //开启蜂鸣器
  364. }
  365. /*************************************************************************************
  366. ** Function name: START_RTC
  367. ** Descriptions: 启动RTC
  368. ** input parameters: none
  369. ** output parameters: none
  370. ** Returned value: none
  371. *************************************************************************************/
  372. void START_RTC(void)
  373. {
  374. while(1)
  375. {
  376. RTC->INIR = 0xa5eb1357; //RTC初始化
  377. if(inpw(&RTC->INIR)==1)
  378. break;
  379. }
  380. while(1)
  381. {
  382. RTC->AER.AER = 0xA965; //RTC读/写使能
  383. if(inpw(&RTC->AER)&0x10000)// AER bit
  384. break;
  385. }
  386. }
  387. /*************************************************************************************
  388. ** Function name: Set_TLR
  389. ** Descriptions: 设置RTC的TLR寄存器
  390. ** input parameters: int32_t a,int32_t b,int32_t c,int32_t d,int32_t e,int32_t f
  391. ** output parameters: none
  392. ** Returned value: none
  393. *************************************************************************************/
  394. void Set_TLR (int32_t a,int32_t b,int32_t c,int32_t d,int32_t e,int32_t f)
  395. {
  396. outpw(&RTC->TLR, a<<20|b<<16|c<<12|d<<8|e<<4|f) ;
  397. }
  398. /*************************************************************************************
  399. ** Function name: Set_CLR
  400. ** Descriptions: 设置RTC的CLR寄存器
  401. ** input parameters: int32_t a,int32_t b,int32_t c,int32_t d,int32_t e,int32_t f
  402. ** output parameters: none
  403. ** Returned value: none
  404. *************************************************************************************/
  405. void Set_CLR (int32_t a,int32_t b,int32_t c,int32_t d,int32_t e,int32_t f)
  406. {
  407. outpw(&RTC->CLR, a<<20|b<<16|c<<12|d<<8|e<<4|f) ;
  408. }
  409. /*************************************************************************************
  410. ** Function name: Set_TAR
  411. ** Descriptions: 设置RTC的TAR寄存器
  412. ** input parameters: int32_t a,int32_t b,int32_t c,int32_t d,int32_t e,int32_t f
  413. ** output parameters: none
  414. ** Returned value: none
  415. *************************************************************************************/
  416. void Set_TAR(int32_t a,int32_t b,int32_t c,int32_t d,int32_t e,int32_t f)
  417. {
  418. outpw(&RTC->TAR, a<<20|b<<16|c<<12|d<<8|e<<4|f) ;
  419. }
  420. /*************************************************************************************
  421. ** Function name: Set_CAR
  422. ** Descriptions: 设置RTC的CAR寄存器
  423. ** input parameters: int32_t a,int32_t b,int32_t c,int32_t d,int32_t e,int32_t f
  424. ** output parameters: none
  425. ** Returned value: none
  426. *************************************************************************************/
  427. void Set_CAR (int32_t a,int32_t b,int32_t c,int32_t d,int32_t e,int32_t f)
  428. {
  429. outpw(&RTC->CAR, a<<20|b<<16|c<<12|d<<8|e<<4|f) ;
  430. }
  431. /*************************************************************************************
  432. ** Function name: delay_ms
  433. ** Descriptions: 1ms(晶振为12MHZ)延时子程序
  434. ** input parameters: count
  435. ** output parameters: 无
  436. ** Returned value: 无
  437. *************************************************************************************/
  438. void delay_ms(uint32_t count)
  439. {
  440. uint32_t i,j;
  441. for(i=count;i>0;i--)
  442. for(j=2395;j>0;j--);
  443. }
其他的就不传了
下面传两张图片



工程

注意:工程与半主机的略不同 就是 retarget.c函数
对了 如果校准完时间想要下次启动时为校准时间 只需将存放校准时间的数组更新一下即可

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
Swallow_0322 发表于 2011-9-27 11:19 | 显示全部楼层
沙发!
已下班,走人......
hotpower 发表于 2011-9-27 11:36 | 显示全部楼层
很好!
俺在定助学板的通用串口协议。
plc_avr 发表于 2011-9-27 12:51 | 显示全部楼层
这个不错,顶!
哈哈,终于看到有人用和我一样的上位机串口调试软件了。我现在串口软件一堆,这个倒没怎么用了。
hotpower 发表于 2011-9-27 13:01 | 显示全部楼层
哈哈,俺一般都是自己做
 楼主| lixiaoxu2meng 发表于 2011-9-27 13:06 | 显示全部楼层
4# plc_avr

呵呵 我感觉这个比较好用 呵呵
 楼主| lixiaoxu2meng 发表于 2011-9-27 13:07 | 显示全部楼层
5# hotpower
老师狠人 向老师的方向努力
hotpower 发表于 2011-9-27 13:52 | 显示全部楼层
这个软件界面不错,不过没有DTR和RTS的控制。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

1679

帖子

2

粉丝
快速回复 在线客服 返回列表 返回顶部