Programming Power Fail Logger with Arduino IDE

From media_wiki
Jump to: navigation, search

Flash the Microcontroller with Power-Fail-Logger Program

Connect the USBTinyISP to the AVR-ISP-6 pin header J7 on the Power Fail Logger PCB .
In the Arduino IDE click on Tools Tab - Select Programmer then select USBTinyISP.
In the Arduino IDE click on Sketch Tab - Select Upload Using Programmer
Program should download.

Prolific USB-to-Serial Comm Port

Setting up the ATMega328 chip

 Plug the USBTiny Programmer into the AVR-ISP 6 pin header J7.
 Using AVRDUDE Validate the USBTiny is communicating with the Power Fail Module Microcontroller
 
 avrdude -c usbtiny -p m328p -v
 
 The Microcontroller is set to 1HMz and needs to be changed to 16 MHz Default
 Using AVRDude enter the follow command to set the fuse bits on the Microcontroller.
 
 
 avrdude -p m328p -c usbtiny -v -U lfuse:w:0xFF:m -U hfuse:w:0xDE:m -U efuse:w:0xFF:m  
 
 Make sure it matches these settings:

 avrdude: safemode: hfuse reads as DE
 avrdude: safemode: efuse reads as FF
 avrdude: safemode: Fuses OK (E:FF, H:DE, L:FF)
 avrdude done.  Thank you.

For more information about using AVRDude refer back to this link 
 ==AVRDUDE Class==

Next step Setting up the DS3231 RTC

Setting Time and Date for the DS3231 RTC


Power Fail Logger by Microrusty