欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標(biāo)題:
hx711電子天平STM32程序源碼
[打印本頁(yè)]
作者:
火蟲陌
時(shí)間:
2018-3-19 14:03
標(biāo)題:
hx711電子天平STM32程序源碼
關(guān)于hx711的資料
display12864.c文件中的WaitBusy()函數(shù)被修改過(guò),12864的顯示可能會(huì)出現(xiàn)單片機(jī)復(fù)位時(shí),沒(méi)有顯示,要復(fù)位很多次才有顯示的問(wèn)題。到最后定產(chǎn)品時(shí),可以改回來(lái),如下,把 while(GPIO_ReadInputData(DisIO) & 0x0080); 句前的注釋符號(hào)去掉即可。
void WaitBusy(void)
{
IOInitIn();
GPIO_ResetBits(DisIO,RS); //RS = 0.
GPIO_SetBits(DisIO,RW); //RW = 1.
GPIO_SetBits(DisIO,EN); //EN = 1.
// while(GPIO_ReadInputData(DisIO) & 0x0080);
GPIO_ResetBits(DisIO,EN); //EN = 0;
IOInitOut();
}
單片機(jī)源程序如下:
#include "stm32f10x.h"
#include "delay.h"
#include "usart1.h"
#include "ad_hx711.h"
#include "display12864.h"
#include "transform.h"
#include "alarm.h"
#include "init.h"
#include "mass.h"
#include "key.h"
int main(void)
{
int i=0;
init(); //進(jìn)行系統(tǒng)的初始化。
DisStr("預(yù)熱中,請(qǐng)等待40秒。"); //延時(shí)40秒,同時(shí)顯示倒計(jì)時(shí)。
for(i=40;i>0;i--)
{
locate16(4,4);
DisStr(" ");
locate16(4,4);
DisInt(i);
delay_ms(1000);
}
WriteCmd(0x01); //清除所有顯示。
locate16(1,1);
DisStr("重量: 0.00 g"); //初始化顯示。
while(1)
{
mass();
HandleKey();
}
}
復(fù)制代碼
所有資料51hei提供下載:
電子天平程序.rar
(539.18 KB, 下載次數(shù): 34)
2018-3-19 17:44 上傳
點(diǎn)擊文件名下載附件
hx711
下載積分: 黑幣 -5
歡迎光臨 (http://m.raoushi.com/bbs/)
Powered by Discuz! X3.1