You are not logged in.
Pages: 1
Anything I should watch out for? I'm new to programming MCU's and I don't really want to screw it up.
I'm going to be using avra and avrdude most likely.
I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581
Offline
In general, they are solid and hard to kill. But....
Watch your clock configuration bits. If you are set up to use the internal RC, an external Crystal, or an external ceramic resonator, be VERY careful that you don't configure the clock as an external oscillator. If you do, you stop clocking your device and cannot fix it since the clock is required by both JTAG and the programming ports.
If this does happen, I can (from experience) tell you the way to recover is to inject a signal into the clock in pin from an external generator to drive the chip while you fix the fuses via JTAG (or the programming pins [I Think]). You can usually get away with this by just over driving the crystal with the generator, but to be extra safe, one can remove the crystal, fix the fuse, and but the crystal back.
Have fun. The gcc avr cross compiler does a great job.
By-the-way, gdb can use simulavr as a simulator back end during code development, and can also use the JTAG as a back end for debugging on your target hardware.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Thanks, I'll watch out for that.
Turns out avra doesn't even support the atmega644 (or at least they don't say they do)
So I figure while I'm learning I might as well learn C.
Know any good tutorials specific to avr?
(I'm gonna be using gcc-avr)
edit: Happy day! avr-as can compile assembly and has tutorials!
Last edited by z.s.tar.gz (2009-11-17 20:59:28)
I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581
Offline
"Know any good tutorials specific to avr?" ->
http://djszapi.homelinux.net/Programmin … roller.pdf
And I used the datasheet of the special microcontroller.
Offline
A crappy tutorial I found on google actually tipped me off to the official atmel assembly guide, which is pretty helpful!
I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581
Offline
I grabbed one of these 'Nerdkits' - http://nerdkits.com/
Nice all inclusive kit, good set of instructions and introductory examples. The support/help is excellent too.
Offline
All went well with avr-gcc untill I actually tried to compile something. Then all it gives me is errors about libraries I didn't even include.
Probably my fault, but avra just seems so much simpler.
I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581
Offline
What kind of error messages are you getting?
What complier options are you using?
Offline
Do you avr-libc and all the other specific build tools installed?
Do you have a minimal full program that generates the errors?
Also, a tip in general, it is quite nice to set up a generic-ish makefile that takes care of compiling and programming, on top of that, it is possible to to include asm snippets in the c code if you really want, however the libc does a number of initialisation stuff that I don't know how to get rid of (without not including io.h and loosing port defs etc).
I need a sorted list of all random numbers, so that I can retrieve a suitable one later with a binary search instead of having to iterate through the generation process every time.
Offline
Pages: 1