Go Down

Topic: ATTiny 25/45/85/2313 Pin numbers (Read 11731 times) previous topic - next topic

balam


I  guess the analog is the PB0/AIN0/D9


That is one of the two inputs to the analog comparator. 

Code: [Select]
sensVal = analogRead(sensPin); // READS sensor, 

If you are using this core...
http://code.google.com/p/arduino-tiny/
...zero is always returned.





Thank you.

yes  I am using  this cores

http://code.google.com/p/arduino-tiny/


you mean that analog input does not work?

on the   core pin s file
seems like there is analog port  as  PIN_A0  (3)
been trying to read a sensor and turn an led but doe snot work
any help is really apreciated ,  how can I read a sensor   from this  2313 chip.

thanks

Coding Badly

Quote
you mean that analog input does not work?


The processor does not have an analog-to-digital converter (ADC).  So, yes, analog input does not work.

Quote
how can I read a sensor   from this  2313 chip.


Two things come to mind...

1. Add an external ADC.

2. Atmel has a whitepaper describing how to mimic an ADC using the analog comparator.  It requires some external components (I think two).  If you're interested, I'll try to find a link.

balam

THANK  you.

I been  editing the  core pins
but now that you are saying that analog input is not supported 

yea I will be interested in find out how to add a sensor

Coding Badly


http://arduino.cc/forum/index.php/topic,92864.msg700430.html#msg700430

funkyguy4000

Accelerate to 88 miles per hour.

Coding Badly


Why are you bumping this topic?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy