首先这是一段由水龙头控制的程序,主控板通过串口上报数据给ht1621b驱动的显示屏,显示屏只有收到串口的数据后会根据串口显示不同的图标,有问题的程序附在下面,首先在开机后,显示屏上面附带有一个触摸IC按键,显示屏上面的图标轮流闪烁(此过程是水龙头排气过程),直到按键长按10s退出排气,退出排气后可以一档二档出水由STM8S控制增压泵IO口输出(一档为PWM控制的半压输出,二档为全压输出)。在增压泵xmin 后无工作(x表示分钟数)进入自动冲洗状态,这个状态是增压泵可以为一档出水的方式工作清洗水箱中的水,退出的条件有两个:一个是缺水,一个是水泵空转5s,现在缺水时时可以退出的,但是水泵空转5s是通过AD电流采集数据,但是水泵空转5s和缺水退出的条件不一样,而且SystemStatus.work_mode (工作模式:一档和二档出水)和SystemStatus.auto_clean(自清洗模式标志位)是互斥的关系,SystemStatus.zyb_mode(增压泵是PWM半压输出还是全压输出)属于SystemStatus.work_mode的一个子集,要让这两个条件都执行不知道怎么做,但是执行的功能是类似的,有问题的代码都写在下面了,就是不知道该怎么解?
|
测试标签123
IAR FOR ARM和IAR FOR STM8无法共存,
STM8L052,液晶内部电源怎么用?
STM8S103飞线外接芯片,I2C不能得到slaveAddress应答,通讯失败。
STM8S105C6T6 UART2串口,能接收数据,不能发送数据
STM8S105K4 串口2 无奇偶校验,也能接收 偶校验的 数据
在STM8S的IAP使用中断和APP使用中断问题
STM8L151 SMBUS设计
STM8S103F复位异常
STM8L的LCD调试时不亮
是写成消息任务切换对吧