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.

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,784
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
Schematic.JPG
& 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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top