[文档下载] 求助贴

[复制链接]
1864|20
 楼主| aiwosuoai1992 发表于 2016-12-26 14:14 | 显示全部楼层 |阅读模式
谁有N79E715的例程库啊,急求!网上找不到啊
langziwuliao 发表于 2016-12-26 16:53 | 显示全部楼层
715的我这边有,加我QQ,我发给你吧
稳稳の幸福 发表于 2016-12-26 22:09 | 显示全部楼层
http://www.wpgholdings.com/hotch ... cn/smart_home/15243
看这个,官方的,需要联系他们的人吧
稳稳の幸福 发表于 2016-12-26 22:10 | 显示全部楼层
稳稳の幸福 发表于 2016-12-26 22:11 | 显示全部楼层
这个是例程,上面的链接还有手册之类的。
N79E715_SampleCode_Keil_C51_V1.0.0.zip (1.35 MB, 下载次数: 14)



稳稳の幸福 发表于 2016-12-26 22:33 | 显示全部楼层
希望上面的例程可以帮助到楼主。
 楼主| aiwosuoai1992 发表于 2016-12-27 08:31 | 显示全部楼层
langziwuliao 发表于 2016-12-26 16:53
715的我这边有,加我QQ,我发给你吧

谢谢
 楼主| aiwosuoai1992 发表于 2016-12-27 08:31 | 显示全部楼层
稳稳の幸福 发表于 2016-12-26 22:09
http://www.wpgholdings.com/hotchannel/procurement_detail/zhcn/smart_home/15243
看这个,官方的,需要 ...

谢谢您的帮助
 楼主| aiwosuoai1992 发表于 2016-12-27 08:34 | 显示全部楼层
稳稳の幸福 发表于 2016-12-26 22:10
http://www.nuvoton.com/hq/resource-download.jsp?tp_GUID=EC0120150923114343

http://www.nuvoton.com/h ...

谢谢您的慷慨相助!
 楼主| aiwosuoai1992 发表于 2016-12-27 08:39 | 显示全部楼层
不过新唐的资料真的不太多啊,初次接触想找点资料也不好找,幸而热心人还是比较多滴,真是雪中送炭哪,甚是感激
落叶行健ywm 发表于 2016-12-27 08:44 | 显示全部楼层
找资料,到官网。一切都解决了!
wahahaheihei 发表于 2016-12-27 20:22 | 显示全部楼层
不错不错,有问题在这论坛发帖,肯定有人帮忙解决。
捉虫天师 发表于 2016-12-27 23:51 | 显示全部楼层
  1. /*---------------------------------------------------------------------------------------------------------*/
  2. /*                                                                                                         */
  3. /* Copyright(c) 2015 Nuvoton Technology Corp. All rights reserved.                                         */
  4. /*                                                                                                         */
  5. /*---------------------------------------------------------------------------------------------------------*/

  6. //***********************************************************************************************************
  7. //  Nuvoton Technology Corp.
  8. //  E-mail: MicroC-8bit@nuvoton.com
  9. //***********************************************************************************************************
  10. //  Application: Power Down Wake up
  11. //  External interrupt 0 Wake up  => P1.3 input low(falling edge).
  12. //  External interrupt 1 Wake up  => P1.4 input low(falling edge).
  13. //  Keyboard interrupt   Wake up  => P0 input low(falling edge)
  14. //  Brown out interrupt  Wake up  => Vdd < 3.8V
  15. //  Watch dog interrupt  Wake up  => Watch dog timer time out
  16. //  ADC interrupt        Wake up  => ADC conversion finish
  17. //
  18. //  Output : UART show result on hyper-terminal
  19. //           P1.7 toggle when MCU wake up every once
  20. //           P1.4 flash when power down pass
  21. //           P2.1 flash when power down pass
  22. //***********************************************************************************************************

  23. //------------------------- <<< Use Configuration Wizard in Context Menu >>> --------------------------------
  24. // <h> Power down wake up source
  25. //          <o0.0> External interrupt0
  26. //                  <0=> Disable
  27. //                  <1=> Enable
  28. //          <o1.0> External interrupt1
  29. //                  <0=> Disable
  30. //                  <1=> Enable
  31. //          <o2.0> Key board interrupt
  32. //                  <0=> Disable
  33. //                  <1=> Enable
  34. //          <o3.0> Brown out detect interrupt
  35. //                  <0=> Disable
  36. //                  <1=> Enable
  37. //          <o4.0> Watch dog timer interrupt
  38. //                  <0=> Disable
  39. //                  <1=> Enable
  40. //          <o5.0> ADC interrupt
  41. //                  <0=> Disable
  42. //                  <1=> Enable
  43. // </h>
  44. // <h> KBI  Enable
  45. //          <q6.0> KBI.0
  46. //          <q6.1> KBI.1
  47. //          <q6.2> KBI.2
  48. //          <q6.3> KBI.3
  49. //          <q6.4> KBI.4
  50. //          <q6.5> KBI.5
  51. //          <q6.6> KBI.6
  52. //          <q6.7> KBI.7
  53. // </h>
  54. //<o7.0..2> WDT Prescalar Select
  55. //      <0=> 1/1    <1=> 1/2    <2=> 1/8    <3=> 1/16
  56. //      <4=> 1/32   <5=> 1/64   <6=> 1/128  <7=> 1/256
  57. //
  58. //     <o8.6> UART pin Select
  59. //          <0=> Select P1.0, P1.1 as UART pin(default)
  60. //          <1=> Select P2.6, P2.7 as UART pin(28 pin only)
  61. //-------------------------------- <<< end of configuration section >>> -------------------------------------

  62. #define  EXT_INT0_EN        1
  63. #define  EXT_INT1_EN        1
  64. #define  KBI_INT_EN         1
  65. #define  BOD_INT_EN         1
  66. #define  WDT_INT_EN         1
  67. #define  ADC_INT_EN         1
  68. #define  KBI_Enable         0xFF
  69. #define  WDT_CLK_DIV        0x07
  70. #define  Uart_Port_Sel      0x00

  71. #include <stdio.h>
  72. #include "N79E715.h"
  73. #include "Typedef.h"
  74. #include "Define.h"
  75. #include "Common.h"
  76. #include "Delay.h"
  77. #include "ISR.h"
  78. #include "wdt.h"
  79. #include "Version.h"

  80. UINT16 i;
  81. bit EA_Save_bit;
  82. //-----------------------------------------------------------------------------------------------------------
  83. void main()
  84. {
  85.     AUXR1 |= Uart_Port_Sel;                 // Select P10/P11 as UART pin(default)
  86.     InitialUART0_Timer1(9600);              // 9600 Baud Rate [url=home.php?mod=space&uid=72445]@[/url] 11.0592MHz
  87.     printf ("\n*===================================================================");
  88.     printf ("\n*  Name: N79E715 Series PowerDown Wake-up Sample Code.");
  89.     printf ("\n*===================================================================");
  90.     printf ("\nPower Down Wake up Demo Start.\n");
  91.     P0 = 0x00;
  92.     for(i = 0; i<60000; i++);
  93.     P0 = 0xFF;
  94.     P17 = 0;
  95.     EA = 1;

  96.     //********************** External interrupt0 ************************
  97.     #if EXT_INT0_EN == 1
  98.         printf ("\nDemo INT0 Wake Up Function...");
  99.         clr_IE0;                            // Clear external interrupt0 flag first
  100.         EX0 = 1;                            // Enable External interrupt0
  101.         PCON |= SET_BIT1;                   // Enter power down mode
  102.         printf ("\nMCU Wake Up...");
  103.         P17 = ~P17;
  104.     #endif
  105.     //********************** External interrupt1 ************************
  106.     #if EXT_INT1_EN == 1
  107.         printf ("\nDemo INT1 Wake Up Function...");
  108.         clr_IE1;                            // Clear external interrupt1 first
  109.         EX1 = 1;                            // Enable external interrupt1
  110.         PCON |= SET_BIT1;                   // Enter power down mode
  111.         printf ("\nMCU Wake Up...");
  112.         P17 = ~P17;
  113.     #endif
  114.     //********************** Keyboard interrupt **************************
  115.     #if KBI_INT_EN == 1
  116.         printf ("\nDemo KBI Wake Up Function...");
  117.         clr_KBIF0;                          // Clear keyboard interrupt flag first
  118.         KBIE = KBI_Enable;                  // Enable P1 that cause keyboard
  119.         EKB = 1;                            // Enable key board interrupt
  120.         PCON |= SET_BIT1;                   // Enter power down mode
  121.         printf ("\nMCU Wake Up...");
  122.         P17 = ~P17;
  123.     #endif
  124.     //********************** Brown out detect ***************************
  125.     #if BOD_INT_EN == 1
  126.         printf ("\nDemo Brown-Out Wake Up Function...");
  127.         TA = 0xAA;
  128.         TA = 0x55;
  129.         PMCR = 0xC0;
  130.         EBO = 1;                            // Enable brown out detect
  131.         PCON |= SET_BIT1;
  132.         printf ("\nMCU Wake Up...");
  133.         P17 = ~P17;
  134.     #endif
  135.     //********************** Watch dog timer ****************************
  136.     #if WDT_INT_EN == 1
  137.         printf ("\nDemo Watch Dog Wake Up Function...");
  138.         TA = 0xAA;
  139.         TA = 0x55;
  140.         WDCON0 |= WDT_CLK_DIV;              // Select bit length of WDT counter
  141.         TA = 0xAA;
  142.         TA = 0x55;
  143.         WDCON0 |= SET_BIT4;
  144.         clr_WDTF;                           // Clear WDT flag
  145.         EWDI = 1;                           // Enable WDT interrupt
  146.         set_WDCLR;                          // Clear WDT counter
  147.         set_WDTEN;                          // Enable WDT
  148.         PCON |= SET_BIT1;                   // Enter power down mode
  149.         printf ("\nMCU Wake Up...");
  150.         P17 = ~P17;
  151.     #endif
  152.     //********************** ADC interrupt ******************************
  153.     #if ADC_INT_EN == 1
  154.         printf ("\nDemo ADC Wake Up Function...");
  155.         clr_ADCI;                           // Clear ADC flag first
  156.         ADCCON1 |= 0x82;                    // ADC clock is RC/2 clock and enable ADC
  157.         EADC = 1;                           // Enable ADC interrupt
  158.         ADCS = 1;                           // ADC run
  159.         PCON |= SET_BIT1;                   // Enter power down mode
  160.         printf ("\nMCU Wake Up...");
  161.         P17 = ~P17;
  162.     #endif
  163.     printf ("\nPower Down Wake Up Test OK!");
  164.     P17 = 1;
  165.     while(1)
  166.     {
  167.         P14 = 1;
  168.         P21 = 1;
  169.         Delay1ms(500);
  170.         P14 = 0;
  171.         P21 = 0;
  172.         Delay1ms(500);
  173.     }
  174. }
  175. //-----------------------------------------------------------------------------------------------------------
  176. void INT0_ISR(void) interrupt 0             // Vector @  0x03
  177. {
  178.     clr_IE0;
  179.     EX0 = 0;
  180. }
  181. //-----------------------------------------------------------------------------------------------------------
  182. void INT1_ISR(void) interrupt 2             // Vector @  0x13
  183. {
  184.     clr_IE1;
  185.     EX1 = 0;
  186. }
  187. //-----------------------------------------------------------------------------------------------------------
  188. void KBI_ISR(void)  interrupt 7             // Vector @  0x3B
  189. {
  190.     clr_KBIF0;
  191.     EKB = 0;
  192. }
  193. //-----------------------------------------------------------------------------------------------------------
  194. void BOD_ISR(void)  interrupt 8             // Vector @  0x43
  195. {
  196.     clr_BOF;
  197.     EBO = 0;
  198. }
  199. //-----------------------------------------------------------------------------------------------------------
  200. void WDT_ISR(void)  interrupt 10            // Vector @  0x53
  201. {
  202.     clr_WDTF;
  203.     clr_WDTEN;
  204.     EWDI = 0;
  205. }
  206. //-----------------------------------------------------------------------------------------------------------
  207. void ADC_ISR(void)  interrupt 11            // Vector @  0x5B
  208. {
  209.     clr_ADCI;
  210.     EADC = 0;
  211. }
  212. //-----------------------------------------------------------------------------------------------------------


 楼主| aiwosuoai1992 发表于 2016-12-28 16:01 | 显示全部楼层
huangcunxiake 发表于 2016-12-28 21:34 | 显示全部楼层
不错,竟然有例程,收了。
zhuotuzi 发表于 2016-12-30 17:13 | 显示全部楼层
哥们,一般都是先去官方网站搜一下啊
nobleliom 发表于 2016-12-30 19:55 | 显示全部楼层
官网肯定有的,不过不是在新唐的官网,在以前华邦的官网有。
捉虫天师 发表于 2016-12-31 20:17 | 显示全部楼层
楼上的,华邦早改成新唐了。
稳稳の幸福 发表于 2017-1-9 23:26 | 显示全部楼层
哈哈,新手都是不知道从何下手。
稳稳の幸福 发表于 2017-1-9 23:27 | 显示全部楼层
aiwosuoai1992 发表于 2016-12-27 08:34
谢谢您的慷慨相助!

不用谢,大家都从新手过来过。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2

主题

48

帖子

0

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