熟女俱乐部五十路二区av,又爽又黄禁片视频1000免费,国产卡一卡二卡三无线乱码新区,中文无码一区二区不卡αv,中文在线中文a

新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > 1602 AVR單片機版 報警指示功能

1602 AVR單片機版 報警指示功能

作者: 時間:2016-11-30 來源:網(wǎng)絡 收藏
使用的是ATMEGA16芯片
功能說明:正常狀態(tài)下,8個LED不停閃爍,1602顯示normal indication指示
報警狀態(tài)下, 8個LED全發(fā)亮不閃爍,1602顯示alarm報警,只有按復位按鈕才能解除報警.
alarm狀態(tài)時,由于PB口的低3位和,1602時能,讀寫,數(shù)據(jù)指令寄存器選擇位復用,所以有點暗.
#include
#include
#define uchar unsigned char
#define uint unsigned int
#define RS1 PORTB_Bit0=1 //數(shù)據(jù)指令寄存器選擇
#define RS0 PORTB_Bit0=0
#define RW1 PORTB_Bit1=1 //讀寫選擇
#define RW0 PORTB_Bit1=0
#define EN1 PORTB_Bit2=1 //讀寫時能
#define EN0 PORTB_Bit2=0
#define DATAPORT PORTA //1602數(shù)據(jù)口
#define busy 0x80 //繁忙標志
#include "ku.h" //調(diào)用函數(shù)庫
//-------------------------------------------
uchar alarm[]={"alarm "}; //報警字符串
uchar normal[]={"normal"}; //正常字符串
uchar indication[]={"indication"};
//-------------------------函數(shù)聲明--------------

上一頁 1 2 下一頁

評論


技術專區(qū)

關閉