uart error due to high baud error rate

Here I am using atmega8515 which has a fixed F_CPU 1MHz. (using internal oscillator)

Under this condition, the baud rate is as follows: Continue reading “uart error due to high baud error rate”

Advertisements

disable EESAVE fuse bit

default settings will have EESAVE fuse bit unprogrammed so that whenever flash .hex files are updated with avrdude, EEPROM will also be erased along with the flash memory.
To keep the EEPROM data from erasing, EESAVE high fuse bit should be changed to ‘programmed’ value. Check datasheet for specific values.

– avrdude ‘-D’ option is not the solution to preserving EEPROM data. Only a weird error pops up which is irrelevant to the matter.

– this problem was encountered with at90can128

connecting external crystal oscillator to atmega chip

chip: atemga328-PU

using 8.0MHz crystal oscillator with 18pF capacitors for each end. Connected to XTAL1, XTAL2 pin. Then adjusted lfuse bits so that it will use full swing crystal oscillator as clock source and to enable CLKOUT pin (PB0 for this chip) for checking if the clock is operating with frequency that I intend to use. Continue reading “connecting external crystal oscillator to atmega chip”

what and how to use/make your own makefile in avr programming

this post continues from a previous post. It would be good to check out the previous post. Or just staring to read from here shouldn’t harm your understanding too much. This post will cover what is makefile and how you can use it as well.

When I first confronted makefiles while learning about avr programming, I had no idea what the hell it was. The bloggers seemed to be kind to show their makefiles but what they provided were pretty complex and very long which scared the crap out of myself.

But here I will explain and show the the fundamental purpose of why makefiles are used.

Continue reading “what and how to use/make your own makefile in avr programming”