C51 232485 A simple program framework

xiaoxiao2021-03-06  41

The above is only one frame for entry learners to understand and master a basic program framework. No practical functional significance.

/ ************************************************** **********

* Willow Electric - Intelligent Control System

*

* Developer: Li Jinhao

*

* August 13, 2004

*

* =========================================================================================================================================================================================== ==========

* Modbus-RTU mode:

*

* [AddR (address)] [FUNC (Function)] [DATA] [CRC Test] [0x7e end character]

* 1 1 8 2 1

* ------------------------------------------------- ----

*********************************************************** ********* /

#include #include "serial.h" // Serial Communication Module

SFR WDTRST = 0xA6; // Watchdog, register address designation

Const float AF [6] = {1, 1, 1, 1, 1, 1}; // AD calibration ratio

Uchar Cominbuf [13], COMOUTBUF [13];

/ ************************************************** ********* Watchdog -watchdog () This feature is only available in the AT89S5x series, ************************* ***************************************************** / VOID WATCHDOG () {wdtrst = 0x1e; wdtrst = 0xE1;} / *********************************************************** ******* Main function -main () ********************************************** *********************** / VOID Main (void) {

}

转载请注明原文地址:https://www.9cbs.com/read-55902.html

New Post(0)