ProgISP: Porovnání verzí
Skočit na navigaci
Skočit na vyhledávání
Založena nová stránka: <gallery> Soubor:D10_HW_USBasp.jpg|HW: [http://dx.com/p/usbasp-usbisp-downloader-programmer-for-51-avr-157167 USBasp] SW: [http://goo.gl/yek1x progisp172.zip] Soubor:D... |
Bez shrnutí editace |
||
Řádek 1: | Řádek 1: | ||
== What we need? == | |||
<gallery> | <gallery> | ||
Soubor:D10_HW_USBasp.jpg| | Soubor:ProgISP_01.png|HW: Board ATM13 | ||
Soubor: | Soubor:D10_HW_USBasp.jpg|Programmer: [http://dx.com/p/usbasp-usbisp-downloader-programmer-for-51-avr-157167 USBasp] | ||
Soubor:ProgISP_00.jpg|SW: [http://goo.gl/yek1x progisp172.zip] | |||
</gallery> | </gallery> | ||
[[Soubor:ProgISP_00.jpg | == Electronic Circuit == | ||
ATM13 - Board | |||
[[Soubor:ProgISP_01.png|400px]] | |||
== Source code == | |||
=== Two 7-segment === | |||
[[Soubor:MCU-8051-IDE_2-7segment.gif|400px|right]] | |||
<source lang="asm"> | |||
MOV DPTR,#TAB | |||
tens: MOV P0,#00000010B | |||
MOV R5,#01H | |||
units: MOV R3,#00H | |||
next: MOV A,R3 | |||
MOVC A,@A+DPTR | |||
MOV P2,A | |||
ACALL delay | |||
INC R3 | |||
CJNE R3,#10D,next | |||
MOV A,R5 | |||
MOVC A,@a+dptr | |||
MOV P0,A | |||
INC R5 | |||
CJNE R5,#11D,again | |||
SJMP tens | |||
again: SJMP units | |||
delay: MOV R2,#06D | |||
temp2: MOV R1,#255D | |||
temp1: MOV R0,#255D | |||
DJNZ R0,$ | |||
DJNZ R1,temp1 | |||
DJNZ R2,temp2 | |||
RET | |||
TAB: DB 00000010B ;0x02 0D | |||
DB 10011111B ;0x9F 1D | |||
DB 00100100B ;0x24 2D | |||
DB 00001100B ;0x1C 3D | |||
DB 10011000B ;0x98 4D | |||
DB 01001000B ;0x48 5D | |||
DB 01000000B ;0x40 6D | |||
DB 00011110B ;0x1E 7D | |||
DB 00000000B ;0x00 8D | |||
DB 00001000B ;0x0F 9D | |||
END | |||
</source> | |||
== hex code == | |||
== Step by Step == | |||
<gallery> | |||
Soubor:ProgISP_00.jpg|Run ProgISP | |||
Soubor:ProgISP_02.jpg|Select DEVICE 89S52 | |||
Soubor:ProgISP_03.jpg|Select hex code | |||
Soubor:ProgISP_04.jpg|Select Program flash | |||
Soubor:ProgISP_05.jpg|Click on "AUTO" | |||
</gallery> |
Verze z 8. 6. 2013, 15:23
What we need?
-
HW: Board ATM13
-
Programmer: USBasp
-
SW: progisp172.zip
Electronic Circuit
ATM13 - Board
Source code
Two 7-segment
MOV DPTR,#TAB
tens: MOV P0,#00000010B
MOV R5,#01H
units: MOV R3,#00H
next: MOV A,R3
MOVC A,@A+DPTR
MOV P2,A
ACALL delay
INC R3
CJNE R3,#10D,next
MOV A,R5
MOVC A,@a+dptr
MOV P0,A
INC R5
CJNE R5,#11D,again
SJMP tens
again: SJMP units
delay: MOV R2,#06D
temp2: MOV R1,#255D
temp1: MOV R0,#255D
DJNZ R0,$
DJNZ R1,temp1
DJNZ R2,temp2
RET
TAB: DB 00000010B ;0x02 0D
DB 10011111B ;0x9F 1D
DB 00100100B ;0x24 2D
DB 00001100B ;0x1C 3D
DB 10011000B ;0x98 4D
DB 01001000B ;0x48 5D
DB 01000000B ;0x40 6D
DB 00011110B ;0x1E 7D
DB 00000000B ;0x00 8D
DB 00001000B ;0x0F 9D
END
hex code
Step by Step
-
Run ProgISP
-
Select DEVICE 89S52
-
Select hex code
-
Select Program flash
-
Click on "AUTO"