基本信息
源码名称:k60信号发生器
源码大小:1.23M
文件格式:.rar
开发语言:C/C++
更新时间:2020-12-11
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 2 元 
   源码介绍

void main(void)
{
    //自行添加代码
uint16 x,i;
int sin_data[2000]={0};

FS_1S = 0;
FS_10S = 0;
x =0;


  DisableInterrupts;                         //禁止总中断  
  
  //按键IO口初始化
  INIT_KEY_IO();
  
  uart_init(UART4,115200);
  
  hw_pit_init(PIT0,bus_clk_khz/100);        //初始化PIT0,定时时间为: 1000ms   
  hw_pit_init(PIT1,bus_clk_khz);        //初始化PIT0,定时时间为: 1000ms 
  hw_enable_pit_int(PIT0);                   //开pit中断   
  hw_enable_pit_int(PIT1);                   //开pit中断
  
  //DAC初始化
  hw_dac_init(0,1);
  hw_dac_convert(0,2048);
  
  EnableInterrupts;                         //开总中断    
  

  
 
 
 while(1)
 {  
   if(FS_1S){FS_1S = 0;}
    if(FS_10S > 40000)
    {break;}
 
 }
 
 LCD_init(UART4);
 
 LCD_MAIN(1,1,1,1,buf);
 
 while(1)
 {
     if(1 == Scn_Key)
      {
       Scan_Key();            //按键扫描模块
       Scn_Key = 0;
      } 
   //按键处理
   KEY_FUN();
   
   
   //波形输出
   if(ONE_BO == 1)
   {
    for(i=0;i<2000;i )
       {
       sin_data[i] = (int)((cos(i*0.00314))*fuzhi*Menu3_Data) 2047;
       }     
    while(1)
      {
       if(FS_1S)
        {
        FS_1S = 0;
        hw_dac_convert(0,sin_data[x]);
        x ;
        if(x>1999){x= 0;hw_dac_convert(0,2047);break;}
        }
        }
    ONE_BO = 0;
     }
   
   
   
 }
 
 }

【源码目录】

k60-DAC

├── Debug
│   ├── Exe
│   │   ├── k60.hex
│   │   ├── k60.out
│   │   └── k60.sim
│   ├── List
│   │   └── k60.map
│   └── Obj
│       ├── KEY.o
│       ├── LCD_Drv.o
│       ├── LCD_MENU.o
│       ├── LED.o
│       ├── NRF905.o
│       ├── adc.o
│       ├── alloc.o
│       ├── arm_cm4.o
│       ├── assert.o
│       ├── crt0.o
│       ├── delay.o
│       ├── gpio.o
│       ├── hw_dac.o
│       ├── io.o
│       ├── isr.o
│       ├── k60.pbd
│       ├── main.o
│       ├── mcg.o
│       ├── memtest.o
│       ├── pit.o
│       ├── printf.o
│       ├── queue.o
│       ├── rtc.o
│       ├── spi.o
│       ├── start.o
│       ├── startup.o
│       ├── stdlib.o
│       ├── sysinit.o
│       ├── uart.o
│       ├── uif.o
│       ├── vectors.o
│       └── wdog.o
├── Release
│   ├── Exe
│   ├── List
│   └── Obj
│       ├── LCD_MENU.o
│       ├── k60.pbd
│       └── memtest.o
├── config files
│   ├── 128KB_Pflash.icf
│   ├── 128KB_Pflash_128KB_Dflash.icf
│   ├── 128KB_Ram.icf
│   ├── 256KB_Pflash.icf
│   ├── 256KB_Pflash_256KB_Dflash.icf
│   ├── 32KB_Ram.icf
│   ├── 512KB_Pflash.icf
│   ├── 64KB_Pflash_64KB_Dflash.icf
│   └── 64KB_Ram.icf
├── k60.dep
├── k60.ewd
├── k60.ewp
├── k60.eww
├── settings
│   ├── k60.cspy.bat
│   ├── k60.dbgdt
│   ├── k60.dni
│   ├── k60.wsdt
│   └── k60_Debug.jlink
└── src
    ├── LIB
    │   ├── arm_common_tables.h
    │   ├── arm_math.h
    │   ├── core_cm0.h
    │   ├── core_cm3.h
    │   ├── core_cm4.h
    │   ├── core_cm4_simd.h
    │   ├── core_cmFunc.h
    │   ├── core_cmInstr.h
    │   └── iar_cortexM4l_math.a
    ├── app
    │   ├── iar.h
    │   ├── include.h
    │   ├── isr.c
    │   ├── isr.h
    │   └── main.c
    ├── common
    │   ├── alloc.c
    │   ├── assert.c
    │   ├── assert.h
    │   ├── common.h
    │   ├── io.c
    │   ├── io.h
    │   ├── memtest.c
    │   ├── memtest.h
    │   ├── printf.c
    │   ├── queue.c
    │   ├── queue.h
    │   ├── startup.c
    │   ├── startup.h
    │   ├── stdlib.c
    │   ├── stdlib.h
    │   ├── uif.c
    │   └── uif.h
    ├── cpu
    │   ├── arm_cm4.c
    │   ├── arm_cm4.h
    │   ├── crt0.s
    │   ├── cw_crt0.s
    │   ├── dma_channels.h
    │   ├── headers
    │   │   ├── MK10DZ10.h
    │   │   ├── MK20DZ10.h
    │   │   ├── MK30DZ10.h
    │   │   ├── MK40DZ10.h
    │   │   ├── MK50DZ10.h
    │   │   ├── MK51DZ10.h
    │   │   ├── MK52DZ10.h
    │   │   ├── MK53DZ10.h
    │   │   └── MK60DZ10.h
    │   ├── start.c
    │   ├── start.h
    │   ├── sysinit.c
    │   ├── sysinit.h
    │   ├── vectors.c
    │   └── vectors.h
    ├── drivers
    │   ├── KEY
    │   │   ├── KEY.c
    │   │   └── KEY.h
    │   ├── LCD
    │   │   ├── LCD_Drv.c
    │   │   ├── LCD_Drv.h
    │   │   ├── LCD_MENU.c
    │   │   └── LCD_MENU.h
    │   ├── LED
    │   │   ├── LED.C
    │   │   └── LED.H
    │   ├── adc
    │   │   ├── adc.c
    │   │   ├── adc.h
    │   │   └── adc_cfg.h
    │   ├── dac
    │   │   ├── hw_dac.c
    │   │   └── hw_dac.h
    │   ├── delay
    │   │   ├── delay.c
    │   │   └── delay.h
    │   ├── exti
    │   │   ├── exti.c
    │   │   └── exti.h
    │   ├── fire_drivers_cfg.h
    │   ├── gpio
    │   │   ├── gpio.c
    │   │   ├── gpio.h
    │   │   └── gpio_cfg.h
    │   ├── lptmr
    │   │   ├── lptmr.c
    │   │   └── lptmr.h
    │   ├── mcg
    │   │   ├── Fire_kinetis_MCG_CFG.h
    │   │   ├── mcg.c
    │   │   ├── mcg.h
    │   │   └── mcg_cfg.h
    │   ├── pit
    │   │   ├── pit.c
    │   │   └── pit.h
    │   ├── pmc
    │   │   ├── pmc.c
    │   │   └── pmc.h
    │   ├── rtc
    │   │   ├── rtc.c
    │   │   └── rtc.h
    │   ├── spi
    │   │   ├── NRF905.C
    │   │   ├── NRF905.h
    │   │   ├── spi.c
    │   │   └── spi.h
    │   ├── uart
    │   │   ├── uart.c
    │   │   └── uart.h
    │   └── wdog
    │       ├── wdog.c
    │       └── wdog.h
    ├── platforms
    │   ├── k40_tower.h
    │   ├── k53_tower.h
    │   ├── k60_fire.h
    │   └── k60_tower.h
    ├── projects
    │   ├── fire_Input_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   ├── fire_PWM_Input_PIT_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   ├── fire_adc_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   ├── fire_cmsis_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   ├── fire_exti_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   ├── fire_gpio_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   ├── fire_i2c_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   ├── fire_led_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   ├── fire_pit_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   ├── fire_pwm_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   ├── fire_spi_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   ├── fire_uart_int_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   ├── fire_uart_loop_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   ├── fire_uart_send_demo
    │   │   ├── include.h
    │   │   ├── isr.c
    │   │   ├── isr.h
    │   │   └── main.c
    │   └── fire_ucos_led_demo
    │       ├── include.h
    │       ├── isr.c
    │       ├── isr.h
    │       └── main.c
    └── uCOS-II
        ├── App
        │   ├── BSP.c
        │   ├── BSP.h
        │   ├── CFG
        │   │   ├── app_cfg.h
        │   │   └── os_cfg.h
        │   ├── app.c
        │   ├── app.h
        │   └── app_hooks.c
        ├── Ports
        │   ├── os_cpu.h
        │   ├── os_cpu_a.asm
        │   ├── os_cpu_c.c
        │   └── os_dbg.c
        └── Source
            ├── os_core.c
            ├── os_flag.c
            ├── os_mbox.c
            ├── os_mem.c
            ├── os_mutex.c
            ├── os_q.c
            ├── os_sem.c
            ├── os_task.c
            ├── os_time.c
            ├── os_tmr.c
            └── ucos_ii.h

55 directories, 235 files