Embedotronics Technologies
Published © GPL3+

Interfacing Atmega16 Microcontroller With Dot Matrix Display

In this project we are going to interface one dot matrix LED display with AVR(Atmega16) microcontroller.

BeginnerProtip2 hours882
Interfacing Atmega16 Microcontroller With Dot Matrix Display

Things used in this project

Hardware components

Microchip Atmega16 microcontroller
×1
LED Dot Matrix Display, Red
LED Dot Matrix Display, Red
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Story

Read more

Schematics

Circuit diagram

Code

source code

C/C++
#define F_CPU 8000000UL
#include<avr/io.h>

#include<util/delay.h>

unsigned char i;

int main (void)

{
	DDRA=0xff; // set port A as o/p

	DDRB=0xff; // set port B as o/p
	
	while(1)
	{

		for(i=0;i<=0;i++){
			PORTB=~(0x01); //11111110

			PORTD=(0x04<<(i));  // to display first row //00000100

			_delay_ms(1);

			PORTB=~(0x02); //11111101

			PORTD=(0x0A<<i);  // to display second row 00001010

			_delay_ms(1);

			PORTB=~(0x04);

			PORTD=(0x11<<i);  // to display third row 00010001

			_delay_ms(1);

			PORTB=~(0x08);

			PORTD=(0x1F<<i);  // to display fourth row

			_delay_ms(1);

			PORTB=~(0x10);

			PORTD=(0x11<<i);  // to display fifth row

			_delay_ms(1);

			PORTB=~(0x20);

			PORTD=(0x11<<i);  // to display sixth row

			_delay_ms(1);

			PORTB=~(0x40);

			PORTD=(0x11<<i);  // to display seventh row

			_delay_ms(1);
		}
	}
}

Credits

Embedotronics Technologies

Embedotronics Technologies

34 projects • 64 followers
Hi all, I'm Pawan Joshi who works on embedded system and IoT. I'm really passionate about embedded system and IoT.

Comments