|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
AVR Help
I recently bought an Atmel AVR and I have been looking around for some help, especially at avrfreaks.net and their forums. But I need some help getting started with it because I am no programmer YET.
1) I do not even know how to load code in either C or ASM form. 2) I do not know how to write code. 3) I do not know how to use winavr and avrstudio. Help with #1 would be especially appreciated Thanks |
|
#2
|
|||
|
|||
|
Re: AVR Help
Quote:
Have fun! Bill |
|
#3
|
||||
|
||||
|
Re: AVR Help
Which AVR chip are you using? Do you have a bare chip, or is it on some sort of robot controller board? Which programmer do you have?
If you're using the ATMega16 or ATMega32, you may find the docs and sample code for the SRS Workshop Robot useful: http://seattlerobotics.org/WorkshopRobot/index.php You'll have to modify the source code to adjust which pins/registers are used for which function (unless you're using Larry Barello's ARC board) but the code starts out with very basic stuff which should be enough to get started and customize. If you're using another AVR chip, the basic idea is the same, but the names of the registers used for input and output may change significantly. |
|
#4
|
||||
|
||||
|
Re: AVR Help
I finally got the AVR working and to be programmabled. all it took was an hour on the phone with tech support!
Now I just need to find where to how to program it in C. Things like defining the outputs and just simple C so i can play around with it. Does anyone know where to find how to define the outputs in C code? For example can I just say portB = 0b00001101? In the board right now I have an atmega8515 |
|
#5
|
||||
|
||||
|
Re: AVR Help
Quote:
at the end, and you're good.Also read up on your Data Direction Registers and to read pin states (when set to input) use PINB (or PINA...PIND..etc) as in if(PINB == 0b10110000) do stuff Have fun, good luck. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|