Go Down

Topic: ATtiny 2313 details/questions... (Read 8496 times) previous topic - next topic

vishalapr

yes I am using arduino 1.0 and I am using an arduino duemilanove 328 for programming as ISP...


vishalapr

I sent a message to coding badly so hopefully I will get a reply with instructions and it will work :)
Will post back after retrying...

And I have one more quesiton...the ATTINY 2313 only has digital I/O pins and no analogue...I would like to use a potentiometer with my project...its a sliding potentiometer....is there any way I could modify (Maybe by adding some more components or summin) a digital pin to an analogue one? Or can I somehow use a PWM pin with the sliding potentiometer? Thanks

jwatte

"Use a PWM pin with a potentiometer" doesn't even make sense. PWM is a digital output mechanism. You want an analog input mechanism.

Can you add a component to the tiny 2313 to use an analog input? Sure! Add an ADC and run it through a serial or parallel interface. SPI is available on the 2313, and there are many ADCs that work well with SPI. However, at that point, both cost, complexity, and size, is a lot more than just selecting an atmega part that already has the ADC built-in.

That being said, based on your questions, it seems to me that what you actually need is a good class in engineering basics. How do you problem solve? How do you read documentation? How do you self-help? How do you recognize that you NEED self-help? These are fundamental engineering literacy questions that I believe you would be very well served by focusing on.

vishalapr


Coding Badly


Coding Badly


vishalapr

Do I just set up the schematic shown on the first page?

And thanks for the updated ISP for Arduino 1.0 :D
It worked great! I uploaded the blink sketch and it worked very well :D:D:D

Just out of curiosity, what changes to the ISP did u make? Are they big or small changes?
Thanks :)

vishalapr

IS there any other way to use a potentiometer in an easier way? I just need to use it to change the brightness of a couple of LEDs which are set at different brightnesses originaly...
ex :
LED 1 = 10%
LED 2 = 20%
LED 3 = 30%

When I increase potentiometer value by 10%, then LED 1 becomes 20%, LED 2 becomes 30%, LED 3 becomes 40% etc....
Thanks again :)

Coding Badly

Do I just set up the schematic shown on the first page?


I don't know.  I've never used the technique.  I just know of its existence.

Quote
And thanks for the updated ISP for Arduino 1.0 :D


You are welcome.

Quote
Just out of curiosity, what changes to the ISP did u make? Are they big or small changes?


Many.  But I believe the one that overcomes the bug is: The LED handling was changed to "blink without delay".

vishalapr

ah ok Thanks again...I wish there was a way to use the pot...All I need is about 7-10 different values...I don't need the 256 different values... oh well...

vishalapr

Is it possible to use it like a switch with 4-5 or some more values? Like I move it 25% up and it changes value, move it 50% up and changes value and so on? With a digital pin?

jwatte


Quote from: jwatte

How do you self-help?

hmm...what is an ADC?


Priceless!

vishalapr

I looked it up and got Analogue to Digital Converter and I wasn't sure if it was it...so I asked...

Go Up