Go Down

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

Arduino_User49502

smeezekitty, do you assign thepins by the PB# or just # in the code.

DrAzzy

smeezekitty, do you assign thepins by the PB# or just # in the code.
You use the numbers to refer to the pins in your code

Please don't bump three-year-old threads.
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up