Go Down

Topic: iTead iBoard not able to access A6 and A7 (Read 11709 times) previous topic - next topic

NI$HANT

I bought this remarkable board and we all know that Arduino IDE supports analog pins till A5 when it comes to Duemilanove or UNO but how to access these pins then there the link to this board >> http://iteadstudio.com/store/index.php?main_page=product_info&products_id=511

and here is the schematic >> http://iteadstudio.com/store/images/produce/Platform/ArduinoCom/IBoard/sch-iboard.pdf

The thing is that iForum is down there is a loop back problem in there websites Forum Link
"Real Men can Accomplish  Anything"

- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੁਂ!

johnwasser

To use A6 and A7 you need an entry in boards.txt that says:

Quote

typename.build.variant=eightanaloginputs


What "board" do you select when uploading to this board?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

NI$HANT

Hi john I select deumilanove with 328p in the boards.
"Real Men can Accomplish  Anything"

- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੁਂ!

johnwasser


Hi john I select deumilanove with 328p in the boards.


Try selecting "Arduino Nano w/ ATmega328" instead.  That should give you access to A6 and A7.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

NI$HANT

Quote
Try selecting "Arduino Nano w/ ATmega328" instead.  That should give you access to A6 and A7.


This is not working, I think i need to make the boards.txt entry.
"Real Men can Accomplish  Anything"

- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੁਂ!

johnwasser


This is not working, I think i need to make the boards.txt entry.


"Not working" in what way?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

NI$HANT

Quote
"Not working" in what way?


Hi John,

I mean i tried using the simple Blink sketch on Pin 21 (A7) while selecting the Nano w/328p in boards but things didnt work

Regards,
Nishant
"Real Men can Accomplish  Anything"

- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੁਂ!

johnwasser


Quote
"Not working" in what way?

I mean i tried using the simple Blink sketch on Pin 21 (A7) while selecting the Nano w/328p in boards but things didnt work


"Things didn't work" in what way?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

NI$HANT

I mean it should have blinked(the LED) as im just using it as the output digital pin.
"Real Men can Accomplish  Anything"

- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੁਂ!

johnwasser

You can't use those two analog input pins as digital pins, at least not with digitalWrite().

To use them for digital I/O you'll have to use direct port access:

Code: [Select]

portMode(A6, INPUT) -> DDRC &= ~(1<<6);
portMode(A6, OUTPUT) -> DDRC |= 1<<6;
digitalWrite(A6, HIGH)  -> PORTC |= 1<<6;
digitalWrite(A6, LOW)   -> PORTC &= ~(1<<6);

portMode(A7, INPUT) -> DDRC &= ~(1<<7);
portMode(A7, OUTPUT) -> DDRC |= 1<<7;
digitalWrite(A7, HIGH)  -> PORTC |= 1<<7;
digitalWrite(A7, HIGH)  -> PORTC &= `(1<<7);
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

westfw

I don't think you can use A6/A7 as digital pins AT ALL.  They are only connected to the analog mux.

johnwasser


I don't think you can use A6/A7 as digital pins AT ALL.  They are only connected to the analog mux.


Oops!  You're right.  The ADC6 and ADC7 pins have no other purpose.  They are not part of any I/O register.  PORTC doesn't have a BIT 7 and BIT 6 is connected to the Reset pin if the RSTDISBL fuse is set (Reset is disabled).  If the Reset pin is not disabled, writing to that bit will do nothing and reading it will always return 0.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

48X24X48X


Go Up