Difference between revisions of "Initializing the Microcontroller"
Line 1: | Line 1: | ||
'''Setting up the ATMega328 chip''' | '''Setting up the ATMega328 chip''' | ||
+ | |||
Unplug any USB Power before programming the Microcontroller. | Unplug any USB Power before programming the Microcontroller. | ||
Plug the '''USBTiny''' Programmer into the '''AVR-ISP 6 pin header''' '''J7'''. | Plug the '''USBTiny''' Programmer into the '''AVR-ISP 6 pin header''' '''J7'''. | ||
− | Place the jumper across '''J8''' to use the | + | Place the jumper across '''J8''' to use the USBTiny 5 volt power. Make sure no other power source is connected! |
Using AVRDUDE Validate the USBTiny is communicating with the Power Fail Module Microcontroller | Using AVRDUDE Validate the USBTiny is communicating with the Power Fail Module Microcontroller | ||
'''avrdude -c usbtiny -p m328p -v''' | '''avrdude -c usbtiny -p m328p -v''' | ||
− | The Microcontroller is set to 1HMz and needs to be changed to '''16 MHz Default''' | + | Trouble shooting any connection issues to the microcontroller refer back to the '''AVRDude Class'''. The link is below. |
+ | |||
+ | 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. | Using AVRDude enter the follow command to set the fuse bits on the Microcontroller. | ||
Line 14: | Line 17: | ||
'''avrdude -p m328p -c usbtiny -v -U lfuse:w:0xFF:m -U hfuse:w:0xDE:m -U efuse:w:0xFF:m''' | '''avrdude -p m328p -c usbtiny -v -U lfuse:w:0xFF:m -U hfuse:w:0xDE:m -U efuse:w:0xFF:m''' | ||
− | + | When completed make sure the microcontroller matches these settings: | |
'''avrdude: safemode: hfuse reads as DE''' | '''avrdude: safemode: hfuse reads as DE''' | ||
Line 21: | Line 24: | ||
'''avrdude done. Thank you.''' | '''avrdude done. Thank you.''' | ||
− | + | ||
+ | For more information about using AVRDude refer back to this link | ||
==[[ AVRDUDE Class]]== | ==[[ AVRDUDE Class]]== | ||
Revision as of 00:33, 29 July 2021
Setting up the ATMega328 chip
Unplug any USB Power before programming the Microcontroller. Plug the USBTiny Programmer into the AVR-ISP 6 pin header J7. Place the jumper across J8 to use the USBTiny 5 volt power. Make sure no other power source is connected! Using AVRDUDE Validate the USBTiny is communicating with the Power Fail Module Microcontroller avrdude -c usbtiny -p m328p -v Trouble shooting any connection issues to the microcontroller refer back to the AVRDude Class. The link is below. 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 When completed make sure the microcontroller 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