The ATMega644P is one of the Microchip AVR micro-controller series. Comparing to the other compatible 40-pin AVR device such as the ATMega16 and the ATMega32, this chip can operate up to 20MHz using the supply voltage between 4.5VDC and 5.5VDC (5.0VDC is nominal).
Using C program to write codes for micro-controllers is very common now since most of micro-controllers have a large ROM and RAM space. Modern C compiler optimize for using C code for micro-controllers. However the Assembly language is preferred for any application that requires speed and code efficiency.
![]() |
| ATMega644P-20PU |
Programming using AVR-LibC in Microchip Studio IDE
Microchip Studio is free of charge compiler provides by device manufacture. It comes with the GNU AVR-LibC that's widely used by many AVR programmers. However it only contains the standard C library functions. It has a little peripheral libraries. We need to write our own functions to interface with external hardware.
I recently test this chip by programming it using C. Some examples I tested using software simulator while others are tested using my AVR Prototype Board.
Basic I/O
![]() |
| Test Program |
- ATMega644P Input Output Programming Example
- ATMega644P External Interrupt Programming
- ATMega644P Pin Change Interrupt Example
LCD and Keypad Interfacing
- ATMega644P HD44780 Character LCD Interfacing
- ATMega644P LCD Display and Matrix Keypad Interface
- ATMega644P Graphical LCD Interfacing
Analog to Digital Converter (ADC)
![]() |
| Program Tested on my AVR Prototype Board |
Two Wire Interface (TWI) or Inter Integrated Circuit (I2C)
| Date and Time Reading |
- ATMega644P TWI DS1307 and AT24C16 EEPROM Interfacing
- ATMega644P TWI PCF8574 I/O Expansion Interfacing
- ATMega644P TWI PCF8574AP Matrix Keypad LCD
- ATMega644P TWI LCD RTC and Keypad Example
- ATMega644P TWI MCP23017 GPIO Example
- ATMega644P TWI MCP23017 LCD Keypad
- ATMega644P TWI MCP23017 Character LCD
- ATMega644P TWI DS1307 MCP23017 LCD






No comments:
Post a Comment