EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies /  code to display

 code to display

|

Microcontroller › AVR › 5X7 dot matrix led interfacing ›  code to display

February 7, 2011 at 1:39 pm #5449
dagakshay
Participant

 code to display ‘A’:

 

#include<avr/io.h>

#include<util/delay.h>

 

int main (void)

{

DDRB=0xff; // set port B as o/p

DDRD=0xff; // set port D as i/p

 

while(1)

{

PORTB=~(0x01);

PORTD=0x04;  // to display first row

_delay_ms(1);

PORTB=~(0x02);

PORTD=0x0A;  // to display second row

_delay_ms(1);

PORTB=~(0x04);

PORTD=0x11;  // to display third row

_delay_ms(1);

PORTB=~(0x08);

PORTD=0x1F;  // to display fourth row

_delay_ms(1);

PORTB=~(0x10);

PORTD=0x11;  // to display fifth row

_delay_ms(1);

PORTB=~(0x20);

PORTD=0x11;  // to display sixth row

_delay_ms(1);

PORTB=~(0x40);

PORTD=0x11;  // to display seventh row

_delay_ms(1);

}

}

 

RSS Recent Posts

  • Phone charger fix May 11, 2026
  • Phone Charger 5v to 12v May 11, 2026
  • Voltage comparator circuit verification May 10, 2026
  • What is this??? May 10, 2026
  • Why aren’t the power windows in my 2006 Volkswagen Polo 2006 working despite repairing the control unit circuit board? May 10, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise