Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ATMEGA128 and DS2438 ?

Status
Not open for further replies.
I made :
Code:
         int  adc_result;
	double adcA,d,adcresistance;
	char voltage[50];
adcA = ((int)(5000/1023)*adc_result);	
		lcd_xy(0,0);
        lcd_string("Voltage:");
				
		if (adcA != 0)
		{
		    sprintf(voltage,"%.2f",adcA);
			lcd_xy(1,0);
		    lcd_string(voltage);lcd_string(" mV");
	
			
		}

The code above is already displaying the voltage on ADC pin, am I right ?

Then,

What's the calculation, so the display on LCD is equal to "Input voltage" ?
Currently I used 56K : 10K resistor voltage divider.

Thanks

- - - Updated - - -

Ok I'm here.

Use 12V-20V-30V input voltage and measure voltage on output with voltmeter.

Try R1 47K and R2 10K trimmer.



Best regards,
Peter
What's the calculation for displaying voltage input on LCD ?
thanks

- - - Updated - - -

is it this one ?
Code:
adc_volt = ((adc_steps*0.00488)*4000)-(((1023-adc_steps)*0.00488)*4000);  //Formula for positive
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top