资源简介
STM32F105,OBDII_CAN,VIN码,接口程序,原理图
代码片段和文件信息
#ifndef _OBDII_CAN_c
#define _OBDII_CAN_c
#include “stm32f10x.h“
///#include “STM32_Init.h“
///#include “GrobalVariable.h“
///#include “Grobalfunction.h“
///#include “gsm.h“
///#include “flash.h“
#include “OBDII_CAN.h“
#include
#include “gsm.h“
#include “nand.h“
CanTxMsg TxMessage;//2013-1-8
u16 CAN_ID;
u8 CAN_DATA0CAN_DATA1CAN_DATA2CAN_DATA3CAN_DATA4CAN_DATA5CAN_DATA6CAN_DATA7;
static char OBDII_DTC[]=“20292870B9706B566888AB798175283002008248901A98CE53E3753578C1960063A752364FE153F74F4E3002“\
“C021564F4E901F00430041004E603B7EBFFF089AD87AEFFF0965AD5F003002“;//{0x200x29};
static char CarVIN2[]=“6C7D8F6600560049004EFF1A“; //汽车VIN:
static char OBDII_Protocol1[]=“004F0042004400490049534F8BAEFF1A00430041004E005F00310031004200490054005F003200350030004B0048005A3002“; //汽车VIN:
static char OBDII_Protocol2[]=“004F0042004400490049534F8BAEFF1A00430041004E005F00310031004200490054005F003500300030004B0048005A3002“; //汽车VIN:
static char OBDII_Protocol3[]=“004F0042004400490049534F8BAEFF1A00430041004E005F00320039004200490054005F003200350030004B0048005A3002“; //汽车VIN:
static char OBDII_Protocol4[]=“004F0042004400490049534F8BAEFF1A00430041004E005F00320039004200490054005F003500300030004B0048005A3002“; //汽车VIN:
static char OBDII_Protocol5[]=“534F8BAE4E0D786E5B9A3002“; //汽车VIN:
static char OBDII_Protocol6[]=“672A77E57684534F8BAE“; //未知的协议:
// 0 9 28 38 54 64
static char CarMeg[]=“汽车VIN:00000000000000000\x0d\x0a车牌号:京00000000000000\x0d\x0a车架号码:00000000000000000\x0d\x0a“\
//83 97 110 124 137 149 161 173
“终端设备ID号:00000000000\x0d\x0a车主手机号码:00000000000\x0d\x0a信息安全码:0000000000\xd\xa指令安全码:0000000000\x0d\x0a“\
//185 191 205 217 229 241
“RFID:000000000000\x0d\x0a临时授权码:0000000000\x0d\x0a卫星授权码:0000000000\xd\xa“\
//253 273 291 301 319 329
“设备归属服务器编码:0000000000000000\x0d\x0a网络IP_1:0000000000000000\x0d\x0a网络IP_2:0000000000000000\x0d\x0a“\
“发动机编号:00000000000000000\x0d\x0a\x0d\x0a\x00“;
static char CarCALID[]=“6C7D8F6600430041004C00490044FF1A“; //汽车CALID:
/*******************************************************************************
* Function Name : GPIO_Configuration
* Description : Configures the different GPIO ports.
* Input : None
* Output : None
* Return : None
* Attention : None
*******************************************************************************/
void GPIO_Configuration(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
/* CAN Periph clock enable */
///RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOD | RCC_APB2Periph_AFIO ENABLE);
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD | RCC_APB2Periph_AFIO ENABLE);
RCC_APB1PeriphClockCmd(RCC_APB1Periph_CAN1 ENABLE);
///GPIO_PinRemapConfig(GPIO_Remap1_CAN1ENABLE); /// 2012-9-24
/* Configure CAN pin: RX */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 307 2014-11-08 09:42 STM32F105_OBDII_CAN CODE\main.txt
文件 32729 2013-01-18 16:45 STM32F105_OBDII_CAN CODE\OBDII_CAN.c
文件 694 2012-11-01 10:12 STM32F105_OBDII_CAN CODE\OBDII_CAN.h
文件 3888054 2012-11-22 15:56 STM32F105_OBDII_CAN CODE\SCH.bmp
文件 36693 2012-10-25 14:09 STM32F105_OBDII_CAN CODE\stm32f10x_can.c
文件 138602 2012-09-25 14:14 STM32F105_OBDII_CAN CODE\stm32f10x_can.h
目录 0 2014-11-07 17:40 STM32F105_OBDII_CAN CODE
----------- --------- ---------- ----- ----
4097079 7
- 上一篇:QA产品检查单
- 下一篇:winnt.h头文件
评论
共有 条评论