資源簡介
程序的解釋清楚明了,可直接在proteus上仿真。
代碼片段和文件信息
//============================================================
//?文件名:main.c
//?描??述:例題,支持modbus協議的可調時電子鐘?
//?版??本:v0.2
//?編??寫:王曉榮
//?日??期:20110505 ?
//============================================================
#include???
#include?“lpc2131_config.h“
#include?“lpc2131_drivers.h“
#include?“uart_modbus.h“?
#include?“state.h“?
void?VariableInitial(void); ?
/////////////////////////////////////
//-----------------------------------------------
//主函數 ???
//-----------------------------------------------
main(void)
{
KEY?key?=?NULL;
?
LPC2131Config();
VariableInitial();
while?(1)
{
key?=?GetKey();
AnswerUartModbus();
switch(State)?
{
case?MAIN_SHOW:
MainShow(key);
break;
cas
- 上一篇:GPS數據獲取
- 下一篇:stm32單片機lcd12864并行程序
評論
共有 條評論