芯片解密,芯片破解,IC解密,单片机解密,MCU解密,STM解密

飞芯科技提供芯片解密,芯片破解,IC解密,单片机解密,MCU解密,STM解密逆向服务

芯片解密STM32单片机+TB6612模块智能小车程序原理图

  1. 芯片解密#include "stm32f10x.h"
  2. 芯片解密#include "bsp_tb6612.h"
  3. 芯片解密#include "bsp_motor.h"
  4. #include "bsp_usart.h"
  5. #include "car_ctrl.h"

  6. int main(void)
  7. {
  8.         TB6612_FR_Init();      //TB6612模块1和模块2一起驱动
  9.         
  10.         MotorAllOFF();         //单片机上电默认先把4个电机关闭
  11.         
  12.         USART3_Config();       //初始化蓝牙模块的串口
  13.         
  14.         while(1)
  15.         {
  16.                  RUN_Prg();   //小车蓝牙控制功能
  17.         }
  18. }

复制代码
  1. #include "bsp_tb6612.h"

  2. /*TB6612模块1,驱动前轮  F*/
  3. void TB6612_F_GPIO_Config(void)
  4. {
  5.         GPIO_InitTypeDef GPIO_InitStructure;
  6.         
  7.         RCC_APB2PeriphClockCmd(TB6612_F_GPIO_AIN1_CLK | TB6612_F_GPIO_AIN2_CLK |              \
  8.                                                                                                  TB6612_F_GPIO_BIN1_CLK | TB6612_F_GPIO_BIN2_CLK , ENABLE);
  9.         
  10.         GPIO_InitStructure.GPIO_Pin = TB6612_F_GPIO_AIN1_PIN;
  11.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  12.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;        
  13.         GPIO_Init(TB6612_F_GPIO_AIN1_PORT, &GPIO_InitStructure);
  14.         
  15.         GPIO_InitStructure.GPIO_Pin = TB6612_F_GPIO_AIN2_PIN;
  16.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  17.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;        
  18.         GPIO_Init(TB6612_F_GPIO_AIN2_PORT, &GPIO_InitStructure);

  19.         GPIO_InitStructure.GPIO_Pin = TB6612_F_GPIO_BIN1_PIN;
  20.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  21.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;        
  22.         GPIO_Init(TB6612_F_GPIO_BIN1_PORT, &GPIO_InitStructure);

  23.         GPIO_InitStructure.GPIO_Pin = TB6612_F_GPIO_BIN2_PIN;
  24.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  25.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;        
  26.         GPIO_Init(TB6612_F_GPIO_BIN2_PORT, &GPIO_InitStructure);        
  27. }

  28. void TB6612_F_PWM_GPIO_Config(void)
  29. {
  30.         GPIO_InitTypeDef GPIO_InitStructure;
  31.         
  32.         RCC_APB2PeriphClockCmd(TB6612_F_GPIO_PWMA_CH1_CLK, ENABLE);
  33.         GPIO_InitStructure.GPIO_Pin = TB6612_F_GPIO_PWMA_CH1_PIN;
  34.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
  35.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;        
  36.         GPIO_Init(TB6612_F_GPIO_PWMA_CH1_PORT,&GPIO_InitStructure);
  37.         
  38.         RCC_APB2PeriphClockCmd(TB6612_F_GPIO_PWMB_CH2_CLK, ENABLE);
  39.         GPIO_InitStructure.GPIO_Pin = TB6612_F_GPIO_PWMB_CH2_PIN;
  40.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
  41.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;        
  42.         GPIO_Init(TB6612_F_GPIO_PWMB_CH2_PORT,&GPIO_InitStructure);
  43. }

  44. /*TB6612模块2,驱动后轮  R*/
  45. void TB6612_R_GPIO_Config(void)
  46. {
  47.         GPIO_InitTypeDef GPIO_InitStructure;
  48.         
  49.         RCC_APB2PeriphClockCmd(TB6612_R_GPIO_AIN1_CLK | TB6612_R_GPIO_AIN2_CLK |              \
  50.                                                                                                  TB6612_R_GPIO_BIN1_CLK | TB6612_R_GPIO_BIN2_CLK , ENABLE);
  51.         
  52.         GPIO_InitStructure.GPIO_Pin = TB6612_R_GPIO_AIN1_PIN;
  53.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  54.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  55.         GPIO_Init(TB6612_R_GPIO_AIN1_PORT, &GPIO_InitStructure);
  56.         
  57.         GPIO_InitStructure.GPIO_Pin = TB6612_R_GPIO_AIN2_PIN;
  58.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  59.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  60.         GPIO_Init(TB6612_R_GPIO_AIN2_PORT, &GPIO_InitStructure);

  61.         GPIO_InitStructure.GPIO_Pin = TB6612_R_GPIO_BIN1_PIN;
  62.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  63.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  64.         GPIO_Init(TB6612_R_GPIO_BIN1_PORT, &GPIO_InitStructure);

  65.         GPIO_InitStructure.GPIO_Pin = TB6612_R_GPIO_BIN2_PIN;
  66.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  67.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  68.         GPIO_Init(TB6612_R_GPIO_BIN2_PORT, &GPIO_InitStructure);
  69. }

  70. void TB6612_R_PWM_GPIO_Config(void)
  71. {
  72.         GPIO_InitTypeDef GPIO_InitStructure;
  73.         
  74.         RCC_APB2PeriphClockCmd(TB6612_R_GPIO_PWMA_CH3_CLK, ENABLE);        
  75.         GPIO_InitStructure.GPIO_Pin = TB6612_R_GPIO_PWMA_CH3_PIN;
  76.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
  77.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;        
  78.         GPIO_Init(TB6612_R_GPIO_PWMA_CH3_PORT,&GPIO_InitStructure);

  79.         RCC_APB2PeriphClockCmd(TB6612_R_GPIO_PWMB_CH4_CLK, ENABLE);
  80.         GPIO_InitStructure.GPIO_Pin = TB6612_R_GPIO_PWMB_CH4_PIN;
  81.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
  82.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;        
  83.         GPIO_Init(TB6612_R_GPIO_PWMB_CH4_PORT,&GPIO_InitStructure);
  84. }



联系方式

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

在线客服
热线电话

企业微信