Go Down

Topic: ATTiny 25/45/85/2313 Pin numbers (Read 9 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


funkyguy4000

Accelerate to 88 miles per hour.

Coding Badly


Why are you bumping this topic?

Go Up