jean12
Advanced Member level 2
Hello,I am implementing an AC voltmeter but printing the following is impossible,could you please help?I am using microc compiler:
The variable declaration was as follow:
PHP:
tlong0 =(long)max_point0*(5/255)*11; // find the peak amplitude of the line
tlong1 =(long) max_point0*((5/255)*11*220/12)*0.707; // find the rms value of the line voltage
message1[3] = (tlong0/100) + 48; // convert into ASCII
message1[4] = (tlong0/10)%10 +48; // convert into ASCII
message1[5] = (tlong0)%10 +48; // convert into ASCII
Lcd_Out(1,1,message1); // Display message on LCD
The variable declaration was as follow:
PHP:
unsigned int adc_rd0;
unsigned int temp0=0,temp1=0;
unsigned int max_point0 = 0;
unsigned long tlong0,tlong1;
char message1[] = "PK:000V";
char message2[] = "RMS:0000V";