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

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

芯片复制STM32 AD转换采样电压十二位二进制数

芯片破解单片机源程序如下:

  1. 芯片复制#include "stm32f10x.h"
  2. 芯片复制#include "usart1.h"
  3. 芯片复制#include "adc.h"
  4. 芯片复制#include "stdio.h"
  5. 芯片破解#include "led.h"

  6. float temp;
  7. int main(void)
  8. {
  9.         GPIO_Led_Config();
  10.   ADC1_GPIO_Config();
  11.   ADC_Config();
  12.         while(1)
  13.         {               
  14.     int a,b,c,d,e,f,g,h,i,j,k,l,m;                        
  15.                          ADCConvertedValue=ADC_GetConversionValue(ADC1);
  16. //                         temp=(float)ADCConvertedValue*(3.3/4096);         
  17.                 a=ADCConvertedValue;
  18.         b=a%2;
  19.         c=(a/2)%2;
  20.         d=(a/4)%2;
  21.         e=(a/8)%2;
  22.         f=(a/16)%2;
  23.         g=(a/32)%2;
  24.         h=(a/64)%2;
  25.         i=(a/128)%2;
  26.         j=(a/256)%2;
  27.         k=(a/512)%2;
  28.         l=(a/1024)%2;
  29.         m=(a/2048)%2;
  30.         
  31. if(b==1)        
  32.         GPIO_SetBits(GPIOB,GPIO_Pin_1);
  33. else
  34.         GPIO_ResetBits(GPIOB,GPIO_Pin_1);
  35. if(c==1)        
  36.         GPIO_SetBits(GPIOB,GPIO_Pin_2);
  37. else
  38.         GPIO_ResetBits(GPIOB,GPIO_Pin_2);
  39. if(d==1)        
  40.         GPIO_SetBits(GPIOB,GPIO_Pin_3);
  41. else
  42.         GPIO_ResetBits(GPIOB,GPIO_Pin_3);
  43. if(e==1)        
  44.         GPIO_SetBits(GPIOB,GPIO_Pin_4);
  45. else
  46.         GPIO_ResetBits(GPIOB,GPIO_Pin_4);
  47. if(f==1)        
  48.         GPIO_SetBits(GPIOB,GPIO_Pin_5);
  49. else
  50.         GPIO_ResetBits(GPIOB,GPIO_Pin_5);
  51. if(g==1)        
  52.         GPIO_SetBits(GPIOB,GPIO_Pin_6);
  53. else
  54.         GPIO_ResetBits(GPIOB,GPIO_Pin_6);
  55. if(h==1)        
  56.         GPIO_SetBits(GPIOB,GPIO_Pin_7);
  57. else
  58.         GPIO_ResetBits(GPIOB,GPIO_Pin_7);
  59. if(i==1)        
  60.         GPIO_SetBits(GPIOB,GPIO_Pin_8);
  61. else
  62.         GPIO_ResetBits(GPIOB,GPIO_Pin_8);
  63. if(j==1)        
  64.         GPIO_SetBits(GPIOB,GPIO_Pin_9);
  65. else
  66.         GPIO_ResetBits(GPIOB,GPIO_Pin_9);
  67. if(k==1)        
  68.         GPIO_SetBits(GPIOB,GPIO_Pin_10);
  69. else
  70.         GPIO_ResetBits(GPIOB,GPIO_Pin_10);
  71. if(l==1)        
  72.         GPIO_SetBits(GPIOB,GPIO_Pin_11);
  73. else
  74.         GPIO_ResetBits(GPIOB,GPIO_Pin_11);
  75. if(m==1)        
  76.         GPIO_SetBits(GPIOB,GPIO_Pin_12);
  77. else
  78.         GPIO_ResetBits(GPIOB,GPIO_Pin_12);
  79.         }
  80. }



联系方式

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

在线客服
热线电话

企业微信