finish reading voltage
This commit is contained in:
parent
d9c91bdcb0
commit
9c30b42e77
@ -44,6 +44,7 @@
|
|||||||
#include "mcc_generated_files/mcc.h"
|
#include "mcc_generated_files/mcc.h"
|
||||||
#include "lcd/lcd.h"
|
#include "lcd/lcd.h"
|
||||||
|
|
||||||
|
#define MAX_COL 16
|
||||||
/*
|
/*
|
||||||
Main application
|
Main application
|
||||||
*/
|
*/
|
||||||
@ -75,9 +76,11 @@ void main(void)
|
|||||||
float value;
|
float value;
|
||||||
|
|
||||||
value =(float)( ADC_GetConversion(voltage)/19.859);
|
value =(float)( ADC_GetConversion(voltage)/19.859);
|
||||||
char msg[16];
|
char msg[MAX_COL+1];
|
||||||
sprintf(msg, "Value : %3.1f mV", value);
|
|
||||||
// LCD_2x16_WriteCmd(0x01); // clear display
|
snprintf(msg, MAX_COL+1, "Value : %3.1f mV ", value);
|
||||||
|
|
||||||
|
//LCD_2x16_WriteCmd(0x01); // clear display
|
||||||
|
|
||||||
LCD_2x16_WriteMsg(msg,0);
|
LCD_2x16_WriteMsg(msg,0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user