Você está na página 1de 2

Tutorial Setting things up for CSE 145A/B Embedded Computing Systems Lucas Silva Lopes, 4/10/2014 1) Go to http://www.ics.uci.edu/~givargis/courses/cs145/resources/Material.

.pdf and buy the tools and parts. 2) Go to http://www.ladyada.net/learn/avr/index.html and read everything. Learn some basic unix commands at: https://eee.uci.edu/14s/18085/home/unix.pdf 3) Go to http://www.obdev.at/products/crosspack/index.html and download the ready to go nice package from ObDev (for Mac). 4) Open the CrossPack-AVR-Manual.html that comes with the download (applications> CrossPack-AVR-Manual.html). 5) Go to Installation and Removal section to get instructions about text editors. Go to http://www.barebones.com/products/textwrangler/ to download textwrangler (Mac). 6) Look at http://www.ics.uci.edu/~givargis/courses/cs145/resources/avrisp.png and at page 2 of the microcontroller datasheet (which can be downloaded at http://www.ics.uci.edu/~givargis/courses/cs145/resources/atmega32.pdf ) to see the connections between the programmer and the microcontroller. 7) Follow the instructions given in class about the hardware. 8) Watch the videos https://www.youtube.com/watch?v=zRotGzBhx08 (Microcontrollers - AVR Atmega32 - Testing the programmer and building the first circuit) and https://www.youtube.com/watch?v=wfQBS22jxL8 (Microcontrollers - AVR Atmega32 - Writing our first program and transferring it to the MCU). 9) Follow the instructions in the Getting Started section of CrossPack-AVRManual.html to program the microcontroller. In the Makefile: DEVICE = atmega32; CLOCK = 1000000 (based on lecture 1); PROGRAMMER = -c avrisp2; OBJECTS = main.o (if you want to compile only one c file called main.c); FUSES = -U hfuse:w:0x99:m -U lfuse:w:0xe1:m (these are the standard values for the atmega32. They were obtained from http://www.engbedded.com/fusecalc/. The standard values are also listed in page 257 of the microcontroller datasheet. There are some good information about fuses at CrossPack-AVR-Manual.html and http://www.ladyada.net/learn/avr/index.html. Fuses only need to be setup once. That means you dont need to type make fuse every time you program the microcontroller).

Você também pode gostar