AVR, Variable resistors, USB Answered
What a great site this is, I've only seen like 50 projects so far and I know there are an incredible large amount still left to discover on the site.. for all of you who write the guides and articles, great job! =)
So on to my questions..
I'm trying to learn how to build and program a circuit with an AVR uC. Previously I've played with NE555 circuits and I've connected those normal HD44780 LCDs to the LPT port and so on..
I've also worked with repairing TV sets earlier, replacing both normal components and SMBs..
So I got some basic knowledge of soldering and reading schematics, so thats no problem.
However the programming part is more problematic and also how to connect some components to the uC.. My wish to learn is how to connect variable resistors to the uC and connect the uC to a computer (via USB perhaps) and then read the values there and perhaps sending them further to another program.
More simple, I want to be able to connect a variable resistor to a uC and then be able to read the value and use that value on the computer..
In the long run, what I want to accomplish is a similar piece like the Aurora open source mixer. http://www.auroramixer.com/
But first I want to learn how to connect lets say 2-3 variable resistors, which I believe should be connected to the ADC channels on the uC, right? Together with a low value resistor between the variable resistor and the uC, I've got that info from somewhere so I hope I'm on the right track.
Ok, so that's quite simple, I guess.. But then, how do I read the values on the uC? I think the uC should poll the ADC pins with a few milliseconds in between, or does it work in some other way? Before I connect it to a PC, a simple way to see if it works would be to send the "value" from the variable resistors to a led for each resistor and increasing or lowering the brightness of the led depending on the value from the resistor.
That should be quite simple to rewrite when hooking up the uC to a computer, just forward the info the PC instead of to the led.. or to them both perhaps..
What would the code be for doing such?
My "problem" as most people think, is that I learn by examples, not by books or pages on the net with advanced explanations.. I need to have it quite simple, even though I have no problem learning new stuff..
I've been working with PHP programming for a few years and even though I know its far from PHP in a uC, its still programming so I have some sort of basic thinking, which I hope will be handy somehow =)
I've searched through the net, also searched AVR Freaks and I've even asked on the forums of AVR Freaks who tells me, sure you can do that, you just have to start programming.. But I really dont know where to start..
I learned PHP by downloading examples, see what they do, change a bit and see what happens and so on.. Sure I can do that with the AVR as well, but there are no examples that even read just one pin with a variable resistor connected.. if I had that I would be able to duplicate and make it read on more pins and so on..
I should be able to emulate the code somehow with the AVR developer software, so somehow I should probably be able to emulate a variable resistor and find out what values I get from it.. but I havent been able to get something like that working either..
Finally, I'm now writing here cause this page hosts a great load of great guides, from "how to sew your own panties" to "building your own waterbottle rocket".. and because I didnt get that much help from AVR Freaks..
so you guys are my last hope, I hope you could help me out..
ps. if someone would be interested in making a guide on how to accomplish this and perhaps even connect the uC over USB to a computer, that would be the best thing ever ;) but I'm not gonna go that far, just some help would be enough.. hehe .ds