Skip to main content

LED Matrix






  • Aim: To display a character or letter on a 8x8 LED matrix.
  • Code:
#define F_CPU 8000000UL
#include<avr/io.h>
#include<util/delay.h>

int main(){
DDRC=0xFF;
DDRD=0xFF;
DDRB=0x00;
while(1){
if(PINB==0x01){
PORTC=0x08;
PORTD=0xEF;
_delay_ms(100);
PORTC=0x1C;
PORTD=0xC7;
_delay_ms(100);
PORTC=0x3E;
PORTD=0x83;
_delay_ms(100);
PORTC=0x7F;
PORTD=0x01;
_delay_ms(100);
PORTC=0xFF;
PORTD=0x00;
_delay_ms(100);
PORTC=0x7F;
PORTD=0x01;
_delay_ms(100);
PORTC=0x3E;
PORTD=0x83;
_delay_ms(100);
PORTC=0x1C;
PORTD=0xC7;
_delay_ms(100);
PORTC=0x08;
PORTD=0xEF;
_delay_ms(100);
}
else if(PINB==0x02){
PORTC=0x02;
PORTD=0xF0;
_delay_ms(1);
PORTC=0x04;
PORTD=0xEF;
_delay_ms(1);
PORTC=0x08;
PORTD=0xDF;
_delay_ms(1);
PORTC=0x10;
PORTD=0xBF;
_delay_ms(1);
PORTC=0x20;
PORTD=0xDF;
_delay_ms(1);
PORTC=0x40;
PORTD=0xEF;
_delay_ms(1);
PORTC=0x80;
PORTD=0xF0;
_delay_ms(1);
}}}


  • Proteus Simulation:

LED matrix simulation



  •  Constraints: 
1) Only displays letter "V"
2)Can't be modified externally
  • Conclusion: 
LED matrix displays the letter "V" which has been created using C programming in Avr studio software and simulation of the same in proteus software. The simulation picture is shown above and the constraints have been noted.

Comments

Popular posts from this blog

Python Ping Pong Game

Game: Ping Pong Libraries used: 1) pygame  2) Math 3) Random Version: Python 3.7 Python Code: -------------------------------------------------------------------------------------------------------------------------- import pygame import math import random pygame.init() dis=pygame.display.set_mode((600,400)) gameover=False white=(255,255,255) black=(0,0,0) red=(255,0,0) blue=(0,0,255) col=(0,255,0) x1=575 y1=200 dx1=0 dy1=0 x2=25 y2=185 dx2=1 dy2=0 c=0 t=0 font_style = pygame.font.SysFont(None, 50) def message(msg,color):     mesg = font_style.render(msg, True, color)     dis.blit(mesg, [300, 200]) font_style1 = pygame.font.SysFont(None, 30)    def show(msg,color):     mesg = font_style1.render(msg, True, color)     dis.blit(mesg, [300, 10])    clock=pygame.time.Clock() while not gameover:     for event in pygame.event.get():       ...

The Projectile Motion

GRAVITY This is a projectile motion simulator. It takes velocity and angle as input and gives an animated projectile motion with time of flight and range Time of flight: seconds Max height: meters Select option: Velocity(m/s): Angle: degrees Action

Lighting of a marriage garden

Aim: To design a basic lighting system for a standard marriage garden. Software: Autodesk Revit 2019 Plan of the Garden: Entrance: Stage: Food Area: 3D View of Stage: