資源簡(jiǎn)介
程序的解釋清楚明了,可直接在proteus上仿真。
代碼片段和文件信息
//============================================================
//?文件名:main.c
//?描??述:例題,支持modbus協(xié)議的可調(diào)時(shí)電子鐘?
//?版??本:v0.2
//?編??寫:王曉榮
//?日??期:20110505 ?
//============================================================
#include???
#include?“l(fā)pc2131_config.h“
#include?“l(fā)pc2131_drivers.h“
#include?“uart_modbus.h“?
#include?“state.h“?
void?VariableInitial(void); ?
/////////////////////////////////////
//-----------------------------------------------
//主函數(shù) ???
//-----------------------------------------------
main(void)
{
KEY?key?=?NULL;
?
LPC2131Config();
VariableInitial();
while?(1)
{
key?=?GetKey();
AnswerUartModbus();
switch(State)?
{
case?MAIN_SHOW:
MainShow(key);
break;
cas
評(píng)論
共有 條評(píng)論