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
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) {
}