4 Analog inputs on Atmega328p

Status
Not open for further replies.

johnny78

Full Member level 4
Joined
Jun 28, 2017
Messages
216
Helped
1
Reputation
2
Reaction score
4
Trophy points
18
Activity points
1,791
hi Guys

i was working on a project based on Atmega328p now im in the final part of it & i need to use 4 Analog inputs of it
1 : read push buttons
2 : read 2 Ntc's
3 : read the mains Voltage
& im using the internal 8Mhz oscillator
is that ok ?
can i read all of this inputs ?


thanks Guys
 

Can you post a schematic with values on all components, such as R and C ?

Regards, Dana.
 

But would you please check the Analog inputs for me ?
Hi,

honestly, I don´t know what to check for.
I don´t see a schematic, I can´t find 10k, I can´t find 100k, I can´t find pullup...

Klaus
--- Updated ---

would you suggest a simple program to do this ?
paper and pencil is sufficient.
It doesn´t have to be "nice", it needs to be complete and clear.

Klaus
 

hi Guys
here is a schematic of the Analog section
& the code is not finished yet to read the inputs But here is what is needed
Code:
int NTC1 = A5;
int NTC2 = A4;
int NTC3 = A3;
int ReadSwitch = A2;
int MeasureVoltage = A1;
int FreePin = A0
ins NTC1Value = analogRead(NTC1);
ins NTC2Value = analogRead(NTC2);
ins NTC3Value = analogRead(NTC3);
ins PushButtons = analogRead(ReadSwitch);
ins VoltageMeasuring = analogRead(MeasureVoltage);


pinMode(FreePin,OUTPUT);
digitalWrite(FreePin,LOW);
the pin A0 isn't connected to board so is it a good idea to set it like this ?
i need your opinion about the analog inputs can i change the reading source this easy ?

thanks & regards
Johnny
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…