MSP430單片機AD轉(zhuǎn)換LCD1602&TUBE顯示
#define uint unsigned int
#define uchar unsigned char
#define ulint unsigned long int
#define RS BIT0;
#define RW BIT1;
#define EN BIT2;
uint Volt0;
ulint Volttem0;
unsigned data0=0,data1=0;
uint ADresult0;
uint a[10]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};//數(shù)碼管不帶小數(shù)點譯碼
uint b[10]={0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x78,0x00,0x10};//數(shù)碼管帶小數(shù)點譯碼
uchar c[]={"voltage:"};
uchar *fu="V",*dian=".";
uchar num[]={"0123456789"};
int value[4]={0,0,0,0};
int counter=0;
void lcd_init();
void lcd_wcmd(uchar cmd);
void lcd_wdata(uchar data);
void lcd_pos(uchar pos);
void LED_SH();
void LCD_SH();
void Adcvolt(void)
{
}
void Delay(uint n)
{
}
void lcd_init() //初始化LCD
{
}
void lcd_wcmd(uchar cmd) //LCD寫指令
{
}
void lcd_pos(uchar pos)
{
}
void lcd_wdata(uchar data)//寫入數(shù)據(jù)到LCD
{
}
void LED_SH()
{
}
void LCD_SH()
{