文件名称:the-source-code-of-electronic-scale
介绍说明--下载内容均来自于网络,请自行研究使用
(1)初始化定时器与中断控制寄存器,初始化液晶显示器,设置串口通信波特率。
(2)启动双积分AD转换过程,循环读取反向积分的计数值N,根据式3-7算出反向积分的计时值T2,换算出荷载重量值,送LCD显示。
(3)每次换算出荷载重量值后,判断荷载是否超量程,如果超过系统量程2kg,则启动蜂鸣器报警。当荷载卸载至2kg以下后,解除报警。
(4)如果有校准按键被按下,则响应外部中断0并查询按键编号,执行相应校准程序。
(5)如果上位机软件STP_ISP发送了在线控制命令,则响应串口中断,接收并判断命令码,依据命令码执行校准程序并向上位机发送数据。
-(1) initial timer and interrupt control register, the initial LCD monitor, set the serial interface communication baud rate.
(2) start double integral AD transform process, read backward integration project cycle numerical N, according to type 3-7 calculate backward integration project duration T2, conversion, send out load weight value LCD display.
(3) every time a load weight after conversion value judgment, whether the measure range, load if more than 2 kg range, the system buzzer alarm. Start When load unloading to 2 kg, remove the alarm.
(4) if there is calibration button is press, the response to external interruption and inquires the key Numbers, 0 executes calibration procedures.
(5) if PC software STP_ISP send the online control command, the response, receiving and serial port interrupt judge ordered code, according to perform calibration procedures and command yards up a machine to send data.
(2)启动双积分AD转换过程,循环读取反向积分的计数值N,根据式3-7算出反向积分的计时值T2,换算出荷载重量值,送LCD显示。
(3)每次换算出荷载重量值后,判断荷载是否超量程,如果超过系统量程2kg,则启动蜂鸣器报警。当荷载卸载至2kg以下后,解除报警。
(4)如果有校准按键被按下,则响应外部中断0并查询按键编号,执行相应校准程序。
(5)如果上位机软件STP_ISP发送了在线控制命令,则响应串口中断,接收并判断命令码,依据命令码执行校准程序并向上位机发送数据。
-(1) initial timer and interrupt control register, the initial LCD monitor, set the serial interface communication baud rate.
(2) start double integral AD transform process, read backward integration project cycle numerical N, according to type 3-7 calculate backward integration project duration T2, conversion, send out load weight value LCD display.
(3) every time a load weight after conversion value judgment, whether the measure range, load if more than 2 kg range, the system buzzer alarm. Start When load unloading to 2 kg, remove the alarm.
(4) if there is calibration button is press, the response to external interruption and inquires the key Numbers, 0 executes calibration procedures.
(5) if PC software STP_ISP send the online control command, the response, receiving and serial port interrupt judge ordered code, according to perform calibration procedures and command yards up a machine to send data.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
the source code of electronic scale.c