单片机解密驱动无线麦克风芯片KT0626
- 单片机解密//函 数 名:SYSCLK_Init
- //功能描述:MCU时钟初始化
- //函数说明:
- // This routine initializes the system clock to use the internal 24.5MHz / 8
- // oscillator as its clock source. Also enables missing clock detector reset.
- //调用函数:无
- //全局变量:无
- //输 入:
- //返 回:无
- //设 计 者:KANG Hekai 时间:2012-08-01
- //修 改 者:KANG Hekai 时间:2013-03-29
- //版 本:V1.0
- // V1.3----打开电池电压检测复位功能
- //------------------------------------------------------------------------------------
- void SYSCLK_Init (void)
- {
- OSCICN |= 0x03; //0xc3 // configure internal oscillator for 24.5MHz
- VDM0CN = 0x80; // enable VDD monitor
- Delay_ms(1);
- RSTSRC = 0x02; // enable VDD monitor as a reset source
- }
- //------------------------------------------------------------------------------------
- //函 数 名:PORT_Init
- //功能描述:MCU端口初始化
- //函数说明:Configure the Crossbar and GPIO ports.
- //调用函数:使用弱上拉
- //全局变量:无
- //输 入:
- //返 回:无
- //设 计 者:KANG Hekai 时间:2012-08-01
- //修 改 者: 时间:
- //版 本:V1.0
- //------------------------------------------------------------------------------------
- void PORT_Init (void)
- {
- XBR0 = 0x00; // Disable all
- XBR1 = 0x40; // Enable crossbar and Disable weak pull-ups
- P0MDOUT = 0x08; //
- // P0MDIN |= 0xF7; //
- // P0 |= 0xF7; //
- P1MDOUT = 0xF1;
- // P1MDIN |= 0x0E; //
- // P1 |= 0x0E; //
- P2MDOUT = 0x8F;
- // P2MDIN |= 0x70; //
- // P2 |= 0x70; //
- P3MDOUT = 0x18;
- // P3MDIN |= 0x04; //
- // P3 |= 0x04; //
- }

芯片解密