====== 2014-05-27 - ATmega64(A) compatibility bit ====== recently got surprised by [[http://www.atmel.com/Images/Atmel-8160-8-bit-AVR-Microcontroller-ATmega64A-datasheet.pdf|ATmega64A]] [[blog:2014:05:02:SPI@ATmega64(A)|once again]]. this time LCD display did not worked well. i used well tested, open source [[http://homepage.hispeed.ch/peterfleury/avr-software.html|LCD-library]] for HD44870-based displays. it did not worked. i've used [[https://www.saleae.com|logic state analyzer]] (which is awesome, btw!) and noticed that several control pins appear to be dead, even though µC was up and running (other pins did output proper signals). the answer has been found in sections 14.3.6 and 14.3.7 of ATmega64A's datasheet: ports F and G behave very differently (one is an input-only while the other is alternative function only), when used in "ATmega103 compatibility mode". yes -- you guessed -- compatibility mode was turned on by default. i wonder how many more subtleties are waiting out there...