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

  • Droplet1 December 14, 2025
  • Bringing a Siemens W-48 and Ericsson Model 1951 back to life December 14, 2025
  • What is involved to convert a small town to fiber optic? December 14, 2025
  • mechanism to shutdown feeding when sensor temperature rises December 13, 2025
  • Oshonsoft MSSP simulation question December 13, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 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