Go Down

Topic: Adressing all pins (Read 533 times) previous topic - next topic

Renovator

I am brand new to Arduino.
Been playing with electronics a long time.
Used to program in C about 10 years ago.
Arduino brings both together  :)

My question is: how do I address every pin?

Seems a basic place to start with such an awesome thing :)



retrolefty

#1
Aug 27, 2009, 04:14 am Last Edit: Aug 27, 2009, 04:15 am by retrolefty Reason: 1
Well kind of a off the wall question, and not sure what you asking about. The Arduino software has commands that allow you to access (read or write)  all the I/O pins one at a time at one command at a time. There is also a way to access I/O pins as 8 bit registers so you can read or write 8 I/O pins at a time.


If that doesn't answer your question, can you clarify what you wish to do with the I/O pins?

Lefty

Renovator

TY for quick response.

the 6 analog in are 0..5, right?
other side of the board has digital out 1..13
so if analog in 1..5 is pin1..pin5 then what are digital 1..5?
Cant understand why there are two sets of 1..5.

retrolefty

The digital pins are numbered 0-13, often called D0-D13. The analog pins are numbered 0-5 called A0-A5. The Arduino software knows that when you are using analog commands that the A0 to A5 pins are not the same pins as the digital pins D0 to D5.

To make it a little more confusing, one can, if you wish, to utilize the five analog pins as digital I/O pins by referring to them as pins 14-18.

These pin names and numbers are software definitions and the Arduino software does all the internal mapping to the actual physical pins.

Lefty


Lefty

New2Me

Quote
To make it a little more confusing, one can, if you wish, to utilize the five analog pins as digital I/O pins by referring to them as pins 14-18.

I'm not understanding something simple here, I think. Which of the six A0-A5 is not usable as digital?
A0=14
A1=15
A2=16
A3=17
A4=18
A5=19

retrolefty

Quote
Which of the six A0-A5 is not usable as digital?


They are all usable as digital pins, my error, my post should have said "as pins 14-19"

Lefty



Arnonh

Can i mix analog in and digital pins
for example use analog 0 as analog input and analog 1(digital 15) as digital input

AWOL

Quote
use analog 0 as analog input and analog 1(digital 15) as digital input

Yes, of course.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up