芯片解密|单片机解密|IC解密|芯片破解|芯片复制| PCB抄板|软件开发

飞芯科技-芯片解密|单片机解密|IC解密|芯片破解|芯片复制| PCB抄板|软件开发

芯片复制TM4C123简易信号发生器源码

芯片复制简易信号发生器
1启用定时器中断,从微控制器引脚输出占空比为x%, x kHz的方波。
其中x为你的学号后2位,当后两位为00时,可使用学号倒数4-3位
2 同时在液晶上按如下格式显示:
3 简易信号发生器
4定时器m,引脚n
5Fre=x,Duty=x
6你的姓名


注:在本目录存放整个工程项目,包括源文件、头文件、说明等

芯片复制单片机源程序如下:

  1. #include <stdint.h>
  2. #include <stdbool.h>
  3. #include <stdio.h>
  4. #include <stdarg.h>
  5. #include <string.h>

  6. #include "inc/hw_memmap.h"
  7. #include "inc/hw_types.h"
  8. #include "inc/hw_timer.h"
  9. #include "inc/hw_ints.h"
  10. #include "inc/hw_gpio.h"
  11. #include "inc/hw_i2c.h"
  12. #include "inc/hw_sysctl.h"
  13. #include "driverlib/timer.h"
  14. #include "driverlib/interrupt.h"
  15. #include "driverlib/sysctl.h"
  16. #include "driverlib/systick.h"
  17. #include "driverlib/gpio.h"
  18. #include "driverlib/pin_map.h"
  19. #include "driverlib/ssi.h"
  20. #include "driverlib/i2c.h"
  21. #include "driverlib/udma.h"
  22. #include "driverlib/fpu.h"
  23. #include "driverlib/rom.h"
  24. #include "uc1701.h"

  25. //*****************************************************************************
  26. //Attention
  27. //TM4C123 NMI unlock - To those who want to use PF0 and PD7, be reminded that these pins defaults as NMI ! ! !
  28. //
  29. //*****************************************************************************

  30. //*****************************************************************************
  31. //
  32. // The error routine that is called if the driver library encounters an error.
  33. //
  34. //*****************************************************************************
  35. #ifdef DEBUG
  36. void
  37. __error__(char *pcFilename, unsigned long ulLine)
  38. {
  39. }
  40. #endif

  41. //*****************************************************************************
  42. //
  43. // Global variables
  44. //
  45. //
  46. //
  47. //*****************************************************************************
  48. unsigned char flag;
  49. unsigned int i;
  50. //*****************************************************************************
  51. //
  52. // The interrupt application.  
  53. // Timer interrupt
  54. //
  55. //
  56. //*****************************************************************************
  57. void Timer0IntHandler(void)
  58. {
  59.     // Clear the timer interrupt
  60.     TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);


  61.         if(i<7)
  62.         GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_4, 1<<4);  // 绿LED灯:亮;
  63.    
  64.                           else
  65.                           GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_4, 0<<4);  // 绿LED灯:亮
  66.                                 
  67.                                 i=i+1;
  68.                                 if(i==60)
  69.                                         i=0;
  70.    
  71. }



联系方式

地址:石家庄市新华区民族路77号华强广场D座2009
电话:0311-88816616/87087811
手机:13315190088
传真:0311-67901001
联系人:张工
网址:www.feixindz.com
邮箱:feixindz@163.com
微信:xinpianjiemi
QQ:527263666/568069805

在线客服
热线电话

企业微信