Thursday, February 26, 2009

The AVR-ISP Lite Programmer

Well it finally came in this week and I figured out how to get it to work. I have programmed a couple of microcontrollers to test the ISP device. My collection now includes the Atmel Atmega48s and Attiny13s in addition to my Atmega8s that I was previously using.


My Attiny13 hooked up to the ISP device. I interfaced a Green-Red LED to demonstrate functionality of the programmer.


Yay! The LED is blinking Red and Green. Now back to the drawing board for the next idea.

Wednesday, February 25, 2009

SMD Soldering & Prototyping

My AVR-ISP lite programmer finally came in the mail today (only 3+ weeks). And now I can begin some other projects that I have been waiting to do. With that in mind I now need to solder on my Atmel Atmega48 chips onto a breakout board.




My starting point: the board by itself.










The first thing to do is line up the ic chip perfectly on the board. I really want to emphasize the perfectly part because smd solder does not allow for many mistakes or much tolerance.


Once the chip is lined up, you need to hold it in place to be solder. I use electrical tape to keep it in place temporarly. After that, you can finally solder the first pin down. I typically solder another pin down to hold the chip in place.




Once the chip is held in place, I solder a line across all four sides of the chip covering all the pins. At this point its fine to have sloppy solder down.









Once that was done, I took solder braid and sucked up all the excess solder to reveal nice soldered connections. Can not even till that they were done by a simple soldering iron.
Now my chip is ready to use. Hopefully the ISP programmer works.

Sunday, February 22, 2009

Working with EEPROM



In this project I have interfaced a I2C based EEPROM (Microchip 24LC32) to the Atmel Amega8 AVR. The program will read the first 4 bytes of an EEPROM and display the contents on the LCD. I have added external interrupts to enable erase and program of the EEPROM upon an external key press.The external interrupts are driven by falling edge and have 10k pullup resisters tied to them. In the interrupt routine, erase or program mode flags are set.This can then be used as a simple i2c EEPROM programmer with basic read, write, and program modes.

Saturday, February 21, 2009

My Temperature Data Logger

I have built a Temperature Data Logger for my Atmega8 around the LM34DZ Temperature sensor. This is somewhat of an expansion of my Temp Sensor project. In this project I have utilized a DS1307 Real Time Clock to trigger a A/D Converter sample every 10 seconds. The 10 seconds is an arbitrary value and I just used it for convenience.





My program is basically a simple state machine with 5 states. The '0' State is the default start up state and gets the first temperature reading. The '1' State is the time triggering state and it waits here until 5 seconds have elasped. The '2' State samples the ADC for a temperature reading (I used a 10k trimpot to test functionality). The '3' State processes the temperature samples and determines the high, low, and average values in addition to the current temperature. The finally State ('4') places everything in a "pretty" form to display on my lcd.




The Sensor range is 0-1000mV or 0'F - 100'F. 10mV = 1'F.







I eventually want to add EEPROM or Flash memory and USART functionality to my system. The I2C bus is already being used so EEPROM won't be a huge step up. I have added an optional Fan Control. Replace that main.c file with the original to have a basic Fan Control System. It compares the current temp to a threshold value (I set it to 75) and sets a bit once its reach or clears it if below. I have wired it into my circuit and tested it successfully with a 5V 0.3W Fan.


My Custom 5x6 LED Display

I built this 5x6 LED display from scratch and based it off of the link on avrfreaks main page. The project utilizes a method call row-column addressing for controlling the most leds. My project controls 30 leds with just 11 pins on the Atmega8 AVR processor. My starting point with the materials all sorted out and waiting to be soldered in.










I have updated the software for the display. I have used timers 0 and 1 to implement timeout functions. Timer 0 will strobe the led display 100us for every row and update the display. Timer 1 will update the data to be displayed every couple of seconds. This current project will count from 0 to 9 and repeat itself. In the next picture I have soldered on a couple of leds to get started. Also I have started to sort the rows and columns for the LEDs.

















Here is the completed project with all of the leds soldered on. Next I have to add a cable to interface this

project to a microcontroller.





This is the completed project all interfaced to my Atmel Atmega8 AVR microcontroller and ready for software.



A video of my LED display in action, go LEDs.