|
Copyright 2008~2011 by 1 DIY Centre. All rights reserved |
|
Last Updated : March 2012 |

|
Thank you for choosing the STARTER MCU-EB8051 - 2 Trainer Kit - Learning to program MCU using the Assembly Programming :
You will find here documents that you will use in your diy Learning : Software + User Manual. The Hardware (1) Target Board and (2) Programmers are not FREE.
Software : IDE : Visit acebus.com and download the Acebus 8051 Programmer : ProgISP 1.72 for the S51 AVR Programmer USB to RS232 Driver (prolific) {for laptop PC without RS232} Schematic Diagram :
Program Source Code :
User Manual : S51 AVR USB Programmer User Guide HS AT89 Flash MCU Programmer [Filipino Version] My8051 printed book + CD <you need to purchase, it is not free> Sample pdf of the book - what’s inside / content
Additional Resource : STARTER MCU-EB8051-2 / Target Board Hardware Resource Assembly Guide R1.3 < If you purchase the kit version>
Hardware : STARTER MCU-EB8051—2 / Target /Trainer Board Programmer Option : 1. HS AT89 Flash MCU Programmer (use RS232) 2. S51 AVR USB Programmer (USB)
<you opt to purchase the hardware, since this is not FREE>
|
![Text Box: ;=========================================================
; PROG_13 : DISPLAY NUMBER ON THE 7-SEGMENT DISPLAY
; <modified PROG_12>
;==========================================================
;
;PROGRAM DESCRIPTION:
;This program will display character numbers on the 7-segment display from 0 to 9, light all segment on the display. Use only the first digit (leftmost digit)
;
;
;F. Dandy Menor
;11.NOV.2002 [updated March 2005]
;
;HARDWARE NOTES :
;MCU type : ATMEL AT89S51 24PC
;Crystal : 3.58 MHz Crystal
;I/O Port : Port 2 used as an Output to drive 7-segment LED
;7-Segment
;LED Pin Conn :
; : Port2.0 (pin21) segment "g"
; : Port2.1 (pin22) segment "f"
; : Port2.2 (pin23) segment "e"
; : Port2.3 (pin24) segment "d"
; : Port2.4 (pin25) segment "c"
; : Port2.5 (pin26) segment "b"
; : Port2.6 (pin27) segment "a"
; : Port2.7 (pin28) segment "h"
;
;P3.7 control the display of the first digit (COM1)
;
;Resistor 560 Ohms must be in series with 7-segment and port 2
;
;DECLARATIONS:
SEGMENT EQU P2 ;Port2, AT89S51 PINS 21 to 28
;======================MAINLINE============================
ORG 0H
START:
CLR P3.7
MOV SEGMENT,#00000000B
CALL DELAY
CALL DELAY
MOV R0,#0
DISPLAYNUMBER:
MOV A,R0
CALL CHANGED
MOV SEGMENT,A
CALL DELAY
INC R0
CJNE R0,#0AH,DISPLAYNUMBER
SETB P3.7
CALL DELAY
JMP START
;=================SUBROUTINE : CHANGED====================
CHANGED:
INC A
MOVC A,@A+PC
RET
;=========================DATA=============================
DB 0C0H,0DDH,0A4H,0A2H,
DB 093H,08AH,088H,0E3H
DB 080H,083H
;===================SUBROUTINE : DELAY====================
DELAY:
MOV R7,#255
OLOOP: MOV R6,#255
ILOOP: DJNZ R6, ILOOP
MOV R5,#255
LOOPING: DJNZ R5,LOOPING
DJNZ R7,OLOOP
RET
;==========================================================
END](image627.gif)






