728x90

728x90

ATMega644P Microchip Studio C Programming Tutorials

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).

ATMega644P HD44780 Character LCD Interfacing

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 Tutorials
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.

ATMega644P Tutorials

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

ATMega644P Pin Change Interrupt Example
Test Program

 

  1. ATMega644P Input Output Programming Example 
  2. ATMega644P External Interrupt Programming 
  3. ATMega644P Pin Change Interrupt Example

LCD and Keypad Interfacing

ATMega644P LCD Display and Matrix Keypad Interface

  1. ATMega644P HD44780 Character LCD Interfacing 
  2. ATMega644P LCD Display and Matrix Keypad Interface 
  3. ATMega644P Graphical LCD Interfacing

Analog to Digital Converter (ADC)

ATMega644P Analog to Digital Converter (ADC) Example
Program Tested on my AVR Prototype Board

 

  1. ATMega644P Analog to Digital Converter (ADC) Example 

Two Wire Interface (TWI) or Inter Integrated Circuit (I2C)

ATMega644P TWI DS1307 and AT24C16 EEPROM Interfacing
Date and Time Reading
  1. ATMega644P TWI DS1307 and AT24C16 EEPROM Interfacing 
  2. ATMega644P TWI PCF8574 I/O Expansion Interfacing 
  3. ATMega644P TWI PCF8574AP Matrix Keypad LCD 
  4. ATMega644P TWI LCD RTC and Keypad Example 
  5. ATMega644P TWI MCP23017 GPIO Example 
  6. ATMega644P TWI MCP23017 LCD Keypad 
  7. ATMega644P TWI MCP23017 Character LCD 
  8. ATMega644P TWI DS1307 MCP23017 LCD  

 

Serial Peripheral Interface (SPI)

 

  1. ATMega644P Serial Peripheral Interface (SPI) Tutorial 
  2. ATMega644P SPI and MCP23S17 GPIO Expansion Example 
  3. ATMega644P SPI and SN74HC165 Shift Registers Example
  4. ATMega644P SPI DS3234 RTC LCD 
  5. ATMega644P SPI SN74HC595N TC1604A LCD 
  6. ATMega644P SPI and MCP23S17 LCD Matrix Keypad 
  7. ATMega644P SPI SN74HC595 and SN74HC165 4x8 Matrix KeyPad Driving 

 

Software Bit-Banging Communication Protocol

Some newer MCU(s) have multiple communication pins. When ever the MCU chip has a problem with its communication interface pin we can use other pins instead to emulate a serial interface communication protocol. It also useful when a micro-controller doesn't have any communication module especially USART, SPI or I2C. 

  1. ATMega644P Software TWI Example 

No comments:

Post a Comment

320x50

Search This Blog

tyro-728x90