Display.pdf

  • Uploaded by: Leinad Rialda
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Display.pdf as PDF for free.

More details

  • Words: 254
  • Pages: 1
Escribe el siguiente código en un fichero llamado display7.c: 1 2 3

# i n c l u d e < a v r / i o . h> / / I /O # i n c l u d e < a v r / pgmspace . h> / / Acceso Memoria F l a s h

4 5

c o n s t char t a b l a [ ] PROGMEM = {0 x3F , 0 x06 , 0 x5B } ; / / L e t r a s

6 7

i n t main ( ) {

8

u n s i g n e d char DDRD = 0 x00 ; 11 PORTD = 0xFF ; 12 DDRB = 0xFF ; 9

10

dato ; / / P u e r t o D como e n t r a d a / / R e s i s t o r e s P u l l Up / / P u e r t o B como s a l i d a

13 14

while ( 1 ) {

15

d a t o = PIND & 0 x0F ; / / Lee p u e r t o D PORTB = p g m _ r e a d _ b y t e (& t a b l a [ d a t o ] ) ; / / Acceso a F l a s h }

16 17 18 19

}

1

More Documents from "Leinad Rialda"

Reporte Maxi Y Mini.pdf
October 2019 9
Display.pdf
October 2019 8