STM32数字示波器 带ESP8266wifi芯片解密
芯片解密单片机代码预览如下:
- #include "sys.h"
- #include "delay.h"
- #include "usart.h"
- #include "led.h"
- #include "button.h"
- #include "lcd_driver.h"
- #include "gui.h"
- #include "tim.h"
- #include "stm32f10x_it.h"
- #include "systeminit.h"
- #include "adc.h"
- #include "displaycanshu.h"
- #include "system.h"
- #include "SysTick.h"
- #include "esp8266_drive.h"
- #include "sta_tcpclent_test.h"
- u16 b = 0;
- float temp;
- float temp1;
- u8 res;
- char str[100]={0};
- u8 Vmax_alarm[5];
- int main(void)
- {
- u8 i;
- delay_init();
- rcc_init(); //外设时钟配置
- led_init();
- TFT_Init();
- TFT_ClearScreen(BLACK);
- nvic_init(); // 中断优先级配置
- gpio_init(); //外设io口配置
- set_io0();
- key_init();
-
- ADC1_Init(); //adc配置
- set_background(); //初始化背景
-
- time_init(); //定时器配置,测频率用的二个定时器
- time_enable(); //同步开始计数
- ADC_Get_Value();
- vpp = ADC_Get_Vpp();
-
- Systick_Init(72);
- NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
- USART1_Init(115200);
- printf("普中科技ESP8266 WIFI模块STA TCPClent透传测试\r\n");
- ESP8266_Init(115200);
- ESP8266_STA_TCPClient_Test();
-
- while ( 1 )
- {
- if(Vmax>=3000)
- { Vmax_alarm[0]='A';
- Vmax_alarm[1]='l';
- Vmax_alarm[2]='a';
- Vmax_alarm[3]='r';
- Vmax_alarm[4]='m';}
- else
- { Vmax_alarm[0]='I';
- Vmax_alarm[1]='s';
- Vmax_alarm[2]=' ';
- Vmax_alarm[3]='O';
- Vmax_alarm[4]='k';}
- sprintf(str,"\r\nfrequency=%dHz\r\n Vmax=%dmV\r\n vpp=%dmV\r\n",frequency,Vmax,vpp);
- ESP8266_SendString ( ENABLE, str, 0, Single_ID_0 );//向手机WIFI发送信号的频率
- ESP8266_SendString ( ENABLE, Vmax_alarm, 0, Single_ID_0 );
-
- /*********************绘制电压曲线************************************/
- //gpio_init();
- for(b=index;b<index+250;b++)
- {
- temp = a[b] * 3300 / 4096 * 25 /vcc_div;
- temp1 = a[b + 1] * 3300 / 4096 * 25 / vcc_div;
- clear_point(b-index);
- if(temp>200) {temp=200;}
- if(temp<0) {temp=0;}
- if(temp1>200){temp1=200;}
- if(temp1<0) {temp1=0;}
-
- lcd_huadian(b-index,temp,POINT_COLOR);
- lcd_huaxian(b-index,temp,b-index+1,temp1,POINT_COLOR);
- hua_wang();
- }

芯片解密