xiaoxiaocheng_plc/users/Pulse.c

40 lines
903 B
C
Raw Normal View History

2018-11-13 22:25:34 +08:00
/********************************************************/
// CPU<50><55>Ҫ<EFBFBD><D2AA>STM32F103--RAM<41>ڴ治С<E6B2BB><D0A1>64K Flash<73>ڴ治С<E6B2BB><D0A1>128K
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>STM32F103RDT6<54><36>VET6<54><36><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>
// <20><EFBFBD><E0BCAD><EFBFBD>ڣ<EFBFBD>20150909
// editor by СС<D0A1><D0A1>
// <20><><EFBFBD>꣺shop182385147.taobao.com
/********************************************************/
#include "stm32f10x_it.h"
#include "stm32f10x_tim.h"
#include <stdio.h>
#include "PLC_IO.h"
#include "PLC_Dialogue.h"
unsigned char Y0P,Y1P;
unsigned short Plus_CMP0,Plus_CMP1;
extern u16 PLC_16BIT[12100];
void TIM3_IRQHandler(void)
{
TIM3->SR = 0; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־λ
if(PCin(9)) //һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1 A7
{
PCout(9)=0;
// PLC_RAM32(0X20005F1C)++;//D8140
PLC_16BIT[0x078C]++; //D8140
}
else
PCout(9)=0;
if((PLC_16BIT[0xF9]&0x02)==0x02)
TIM_ITConfig(TIM3,TIM_IT_Update,DISABLE),Y0P=0;
}