Sunteți pe pagina 1din 12

MATRICEA CU LEDURI 5X7

STUDENT: TARMIGAN RAZVAN

CUPRINS

1.Scopul lucrarii

2.Introducere

3.Constructie

4.Programare

1.SCOPUL LUCRARII.
Scopul lucrarii este de a prezenta o matrice cu leduri 5x7 , partea constructiva si cum functioneaza.

2.INTRODUCERE.
Proiectul const din 35 LED-uri dispuse ca o matrice5x7.Pe aceasta matrice se pot afisa animatii ,numere ,jocuri de lumini si se mai foloseste si la panourile publicitare.

Fig a.

fig b

In constructia proiectului sa folosit un pic 16F84 care controleaza aceasta matrice. Placa este formata din doua blocuri , primul bloc este matricea cu leduri iar cel de-al doilea bloc este programatorul.

3.CONSTRUCTIE.
Circuit pentru proiectul 5x7 Display este prezentat in figura de mai jos. Acest proiect conine, de asemenea, un "in circuit , programator aa cum se arata pe pagina urmatoare. Ambele circuite sunt combinate pe placa de PC, dar au fost prezentate separat pentru a se intelege mai usor.

Cum functioneaza circuitul-Circuitul se bazeaza pe un program


n chip PIC16F84 pentru a activa LED urile si diafragma piezo.Acest program este copiat in cip in timpul programarii.

n funcie de complexitatea programului, LED-urile var afia efecte diferite. Doar o singur coloan de LED-uri este prezentat n diagrama de mai sus. setcomplet de 35 de LED-uri este prezentat n diagrama de mai jos.

n funcie de complexitatea programului, LED-urile vor afia efecte diferite.. Alimentarea se face de la 4 baterii de 5 V.

4.PROGRAMARE.
Microcontroler pe care il folosim in acest proiect (PIC16F84) poat fi programat i re-programat pana la 1.000 de ori i acest lucru l face ideal pentru experimente.

Microcontrolerul poate fi programat direct prin conectarea matricii la calculator prin portul serial sau se poate utiliza un compilator dedicat microcontrolerelor PIC

PROGRAMUL
Experiment-22 for "5x7 Display" Project ;PIC16F84 and only F84 chip ;SPLASH Start ORG 0x00 BSF 03,5 MOVLW 00h MOVWF 05h MOVWF 06h BCF 03,5 GOTO Main ;Go to page1 for setting-up the ports ;Put 00 into W ;to make port 5 (port A) all output ;and make port 6 (port B) all output ;Go to page0 for programming

Cell1 MOVLW 00h MOVWF 11h MOVLW 00h MOVWF 12h MOVLW 08h MOVWF 13h MOVLW 00h MOVWF 14h MOVLW 00h MOVWF 15h GOTO Scan

;place the 5 values into the 5 ; files to produce the first cell ; as shown above.

Cell2 MOVLW 00h MOVWF 11h

;place the 5 values into the 5 ; files to produce the second cell

MOVLW 1Ch MOVWF 12h MOVLW 14h MOVWF 13h MOVLW 1Ch MOVWF 14h MOVLW 00h MOVWF 15h GOTO Scan

; as shown above.

Cell3 MOVLW 3Eh MOVWF 11h MOVLW 22h MOVWF 12h MOVLW 22h MOVWF 13h MOVLW 22h MOVWF 14h MOVLW 3Eh MOVWF 15h GOTO Scan

;place the 5 values into the 5 ; files to produce the third cell ; as shown above.

Cell4

MOVLW 41h MOVWF 11h MOVLW 41h MOVWF 12h

;place the 5 values into the 5 ; files to produce the fourth cell ; as shown above.

MOVLW 41h MOVWF 13h MOVLW 41h MOVWF 14h MOVLW 41h MOVWF 15h GOTO Scan

Cell5 MOVLW 00h MOVWF 11h MOVLW 00h MOVWF 12h MOVLW 00h MOVWF 13h MOVLW 00h MOVWF 14h MOVLW 00h MOVWF 15h GOTO Scan ;The fifth cell is blank

Scan BSF 05,1 NOP BCF 05,1 MOVF 11h,0 MOVWF 06h CALL DelD

;Reset 4017

;Move file 11 into W

MOVF 12h,0 MOVWF 06h CALL DelD MOVF 13h,0 MOVWF 06h CALL DelD MOVF 14h,0 MOVWF 06h CALL DelD MOVF 15h,0 MOVWF 06h CALL DelD RETURN

;Move file 12 into W

;Move file 13 into W

;Move file 14 into W

;Move file 15 into W

DelD

DECFSZ 1Bh,1 GOTO DelD MOVLW 00h MOVWF 06 ;Zero port B to prevent mirroring

Clk

BSF 05,0 NOP BCF 05,0 RETURN

;Clock the 4017

Main

MOVLW 50h MOVWF 0Ch

;Each 10h represents 100mS

Main1 CALL Cell1 DECFSZ 0Ch GOTO Main1

;Display Cell 1 for 1/2 sec

MOVLW 10h MOVWF 0Ch Main2 CALL Cell2 DECFSZ 0Ch GOTO Main2

;Each 10h represents 100mS

;Display Cell 2 for 100mS

MOVLW 10h MOVWF 0Ch Main3 CALL Cell3 DECFSZ 0Ch GOTO Main3

;Each 10h represents 100mS

;Display Cell 3 for 100mS

MOVLW 10h MOVWF 0Ch Main4 CALL Cell4 DECFSZ 0Ch GOTO Main4

;Each 10h represents 100mS

;Display Cell 4 for 100mS

MOVLW 80h MOVWF 0Ch Main5 CALL Cell5 DECFSZ 0Ch

;Each 10h represents 100mS

;Display Cell 5 for 800mS

GOTO Main5 GOTO Main END

S-ar putea să vă placă și