[DemoCode下载] ML51的Clock输出

[复制链接]
899|1
 楼主| 捉虫天师 发表于 2019-11-29 21:27 | 显示全部楼层 |阅读模式
  1. /*---------------------------------------------------------------------------------------------------------*/
  2. /*                                                                                                         */
  3. /* Copyright(c) 2019 Nuvoton Technology Corp. All rights reserved.                                         */
  4. /*                                                                                                         */
  5. /*---------------------------------------------------------------------------------------------------------*/

  6. //***********************************************************************************************************
  7. //  Website: http://www.nuvoton.com
  8. //  E-Mail : MicroC-8bit@nuvoton.com
  9. //***********************************************************************************************************

  10. //***********************************************************************************************************
  11. //  File Function: ML51 simple GPIO toggle out demo code
  12. //***********************************************************************************************************

  13. #include "ML51.h"

  14. /**
  15. * [url=home.php?mod=space&uid=247401]@brief[/url]       Clock output enable
  16. * @param       None
  17. * [url=home.php?mod=space&uid=266161]@return[/url]      None
  18. * [url=home.php?mod=space&uid=1543424]@Details[/url]     P3.2 / P4.6 / P5.6 can be setting as clock out function.
  19. */

  20. void main (void)
  21. {
  22. /* Setting P3.2 or P4.6 or P5.6 Multi function pin setting for GPIO clock out toggle
  23.          * include gipo.c in Common for GPIO mode setting
  24. */
  25.                 MFP_P32_GPIO;
  26.                 P32_PUSHPULL_MODE;

  27.                 MFP_P46_GPIO;
  28.                 P46_PUSHPULL_MODE;
  29.                  
  30.                 MFP_P56_GPIO;
  31.                 P56_PUSHPULL_MODE;
  32.        
  33. /*
  34. Clock out enable setting
  35. */
  36.                 set_CKCON_CLOEN;

  37.                 while(1);                                                                //check the pin setting as clock output.


  38. }





jiekou001 发表于 2019-11-29 21:36 | 显示全部楼层
时钟输出,可以检测时钟,或者给外部需要时钟的设备提供时钟源,而且内部的RC时钟源是非常可靠的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

213

主题

3276

帖子

7

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