Society of Robots - Robot Forum
Software => Software => Topic started by: sightt on October 06, 2012, 08:00:27 PM
-
Hi,
This is my first time posting but have been lurking for awhile now. I am working on building the $50 robot for a project in college I have to design a PCB and get it manufactured and populated and everything. I also have to pay for everything so since i have to use the ATMEGA16 in a different course along with the AVR Dragon I decided to go this way since I already have a programmer and a basic knowledge of the chip and programming practices. What I am have trouble with is adapting the code to work with the different chip.
What I have figured on doing is using PD3 and PD4 to drive the servos but I can not figure out how to initialize them properly or to initialize the analog comparator functions. The general basis of the program I understand but have been searching for solutions for about 2 weeks now and although I have learned a lot the solution to my problem is evading me.
-
What is the exact problem you are having? Is the code not compiling? Is the circuit successfully programmed, but not acting as expected? What is it doing?
-
Hi sorry for the delay in responding.
The issues I was having is not understanding how to initialize ports for PWM and ADC. Since then I have done a fair amount of research on these things. I have now determined how to utilize PWM on portD and after modifying my servo's HS-311's to rotate a full 360 will be working on the ADC.
So I guess I don't need more help at the moment but should be finished this in the next month or so. Only so many hours in the day and it is only a single credit course.
I do really like this page as it has giving me a wonderful stepping stone to bigger and better robots.
When I am done I will post the code for future people if they plan on using the same chip as me.