void main()
{
unsigned long int voltage;
unsigned char v1,v2,v3;
TRISA=0xFF;
TRISC=0;
Lcd_Init(&PORTC);
Lcd_Cmd(LCD_CURSOR_OFF);
Lcd_Cmd(LCD_CLEAR);
while(1)
{
Lcd_Cmd(LCD_CLEAR);
voltage=Adc_Read(3);
voltage=voltage*489/1000;
v1=voltage/100;
v2=(voltage%100)/10;
v3=voltage%10;
Lcd_Chr(1,1,v1+48);
Lcd_Chr(1,2,'.');
Lcd_Chr(1,3,v2+48);
Lcd_Chr(1,4,v3+48);
Lcd_Chr(1,5,' ');
Lcd_Chr(1,6,'v');
delay_ms(500);
}
}
Sunday, January 6, 2019
Subscribe to:
Post Comments (Atom)
สรุปงานที่ 5 Internet of Things (IoT)
Internet of Things (IoT) คืออะไร Internet of Things (IoT) คือ "อินเตอร์เน็ตในทุกสิ่ง" หมายถึง การที่อุปกรณ์ต่างๆ ส...
-
Method to Control 8*8 LED Matrix using Shift Register IC 74595 and Arduino Mega by realfinetime electronics | in LED Matrix at 22:05...
-
Digital Speedometer and Odometer Circuit using PIC Microcontroller EMBEDDED By Aswinth Raj Jul 27, 2017 24 Digital Speedometer and...
-
This tutorial is about placing data in a specific ram(random access memory) location/address using xc8 compiler and mplabx ide. I am using ...
No comments:
Post a Comment