If you wrote it in straight-C it would be like 100 bytes) - if you want to see the source code for this, it's basically the Arduino file->examples->basics->blink demo with 1 as the LED pin. (Its a bit chunky as blink.hex's go as it has all the Arduino IDE stuff in there too. However, you can do a basic test by uploading the following HEX file, which will blink the #1 LED once a second on and off. Programming in a Blink example For more details on using avdude and avr-gcc, you'll need to read a detailed tutorial or book on those subjects. To figure out where the nf is, open up a command window (windows: cmd, mac: Terminal, linux: rxvt etc) and type in avrdude -v. To use avrdude a minor change must be made to to nf. Target the Attiny85 as the chip used in avr-gcc, with F_CPU at 8MHz using the internal oscillator. You get to focus on the functionality of your code and the Arduino libraries handle the low level stuff.įor more technical users, rather than using the Arduino IDE, they may want to program the Trinket directly with AVR-GCC as the compiler, vi/emacs as their editor and AVRdude as the uploader. What the Arduino environment provides is a nice hardware abstraction layer to ease the work of dealing with the intricacies of microcontroller programming.
0 Comments
Leave a Reply. |