Professional Documents
Culture Documents
كتاب برمجة لوحة اعلانية باستخدام Pic16f84a
كتاب برمجة لوحة اعلانية باستخدام Pic16f84a
2002
1
:
Matrix
LEDs
Microcontroller Microprocessor
:
Delay Time .1
. Procedure
..
2
Shifting .2
3
Scanning .3
Char Representation .4
Hexadecimal System
( 5 7 7 *5 )
: A
0 1 1 1 0
1 0 0 0 1
1 0 0 0 1
1 1 1 1 1
1 0 0 0 1
1 0 0 0 1
1 0 0 0 1
: G
0 1 1 1 0
1 0 0 0 1
1 0 0 0 0
1 0 1 1 1
1 0 0 0 1
1 0 0 0 1
0 1 1 1 0
4
: S
0 1 1 1 0
1 0 0 0 1
1 0 0 0 0
0 1 1 1 0
0 0 0 0 1
1 0 0 0 1
0 1 1 1 0
Machine Language
Binary System (0 1)
10 Decimal System
) 16 Hexadecimal System ( 9)
.(FEDCBA 9
:
11010101
D 5
5
..
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
A 10 1010
B 11 1011
C 12 1100
D 13 1101
E 14 1110
F 15 1111
:
. PIC16F84A .1
.
. (74LS164) .2
. ...
. NPN .3
6
8 LEDs
. .4
Current Limiter
Matrix LEDS .5
7
: ( )
4FH 11H .1
. 60 68
11H 12H 13H 14H 15H .. .. .. .. 4BH 4CH 4DH 4EH 4FH
Bit 7 .…
Bit 6 .…
Bit 5 .…
Bit 4 .…
Bit 3 .…
Bit 2 .…
Bit 1 .…
Bit 0 .…
. .2
S .3
.( )
(0 ) 4FH S .4
4FH 11H .5
( ) LEDs
-:
LEDs 11H .1
. ( Delay Time )
LEDs 12H .2
. ( Delay Time )
LEDs 13H .3
. ( Delay Time )
LEDs 4FH .4
. ( Delay Time )
8
:
........
........
........
........
........
........
........
LEDs Matrix
4FH .6
4FH S 4EH
.( 4FH, 4EH )
4FH 11H .7
LEDs
.S
:
........
........
........
........
........
........
........
LEDs Matrix
4FH .8
4DH 4EH 4EH
.( ) 4FH S
4FH 11H .9
LEDs
. S
:
........
........
........
........
........
........
........
LEDs Matrix
9
4FH .10
4CH 4DH 4DH 4EH 4EH
) 4FH S
.(
4FH 11H .11
. LEDs
:
........
........
........
........
........
........
........
LEDs Matrix
4FH .12
4CH 4DH 4DH 4EH 4EH
4BH 4CH
( ) 4FH S
4FH 11H .13
. LEDs
:
........
........
........
........
........
........
........
LEDs Matrix
4FH .14
4CH 4DH 4DH 4EH 4EH
4AH 4BH 4BH 4CH
. 4FH 0
10
4FH 11H .15
. LEDs
:
........
........
........
........
........
........
........
LEDs Matrix
.16
-:
.
S
11
:
MOHAMED
list p= pic16f84a -
include p16f84a.inc
__config 0x3ff2 -
start org 0x00
bsf 03,5 Oscillator -
movlw 00h
movwf 05h
movwf 06h
bcf 03,5
goto aa
retlw 00h
retlw 7fh M
retlw 20h ;M
retlw 10h
retlw 20h
retlw 7fh
retlw 00h
retlw 3eh O
retlw 41h
retlw 41h ;O
retlw 41h
retlw 3eh
retlw 00h
retlw 7fh
retlw 08h H
retlw 08h
retlw 08h ;H
retlw 7fh
retlw 00h
retlw 0fh
retlw 18h
retlw 48h A
retlw 18h ;A
retlw 0fh
retlw 00h
retlw 7fh
retlw 20h ;M
retlw 10h M
retlw 20h
retlw 7fh
retlw 00h
retlw 7fh
retlw 49h
retlw 49h E
retlw 41h ;E
retlw 41h
retlw 00h
retlw 7fh
retlw 41h
retlw 41h D
retlw 41h
retlw 3eh ;D
retlw 00h retlw 00h retlw 00h retlw 00h retlw 00h
retlw 00h retlw 00h retlw 00h retlw 00h retlw 00h
retlw 00h retlw 00h retlw 00h retlw 00h retlw 00h
retlw 00h retlw 00h retlw 00h retlw 00h retlw 00h
retlw 00h retlw 00h retlw 00h retlw 00h retlw 00h
retlw 00h retlw 00h retlw 00h retlw 00h retlw 00h
retlw 00h retlw 00h retlw 00h retlw 00h retlw 00h
retlw 00h retlw 00h retlw 00h retlw 00h retlw 00h
0
12
retlw 00h retlw 00h retlw 00h retlw 00h retlw 00h
retlw 00h retlw 00h retlw 00h retlw 00h retlw 00h
retlw 00h retlw 00h retlw 00h retlw 00h retlw 00h
retlw 00h retlw 00h retlw 00h retlw 00h retlw 00h
retlw 0ffh
aa clrf 11h clrf 12h clrf 13h clrf 12h clrf 13h
clrf 11h clrf 12h clrf 13h clrf 12h clrf 13h
clrf 11h clrf 12h clrf 13h clrf 12h clrf 13h
clrf 11h clrf 12h clrf 13h clrf 12h clrf 13h
clrf 11h clrf 12h clrf 13h clrf 12h clrf 13h
clrf 11h clrf 12h clrf 13h clrf 12h clrf 13h
clrf 11 h clrf 12h clrf 13h clrf 12h clrf 13h
clrf 11h clrf 12h clrf 13h clrf 12h clrf 13h
clrf 11h clrf 12h clrf 13h clrf 12h clrf 13h
clrf 11h clrf 12h clrf 13h clrf 12h clrf 13h
clrf 11h clrf 12h clrf 13h clrf 12h clrf 13h
clrf 11h clrf 12h clrf 13h clrf 12h clrf 13h
movlw 00
movwf 0ch
bb movlw b'00111111'
movwf 0dh 0CH .1
call shift
incf 0ch,1
movf 0ch,0 .
call table
movwf 4fh
0DH .2
xorlw h'ff ' .Scanning
btfsc 03,2
goto aa 0FF .3
cc decfsz 0dh,1 .
goto dd
goto bb
dd call scan
goto cc
End
15