Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

I need the ASM code file of this clock driver schematic

Status
Not open for further replies.

Sheeraz Khan

Member level 3
Joined
Dec 29, 2002
Messages
62
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
440
Dear All

I need the ASM Code File of this Clock driver schematic

Best Regards
Sheeraz Khan

 

hbaocr

Full Member level 4
Joined
May 13, 2007
Messages
235
Helped
25
Reputation
48
Reaction score
5
Trophy points
1,298
Location
Hochiminh City university of technology (VietNam)
Activity points
2,777
Re: Need the ASM Code

here is clock display using led7segment
note that :
GIO= hour
GIO=10*GIOCHUC+GIODV
PHUT=min
PHUT=10*PHUTCHUC+PHUTDV
GIAY=Second
GIAY=10*GIAYCHUC+GIAYDV
////////////here is program/////////////////////
Code:
INCLUDE 89c51.MC
		ORG 0000H
		LJMP MAIN
		ORG 000BH
            LJMP  ISR_T0
     		ORG 0030H
MAIN:		
		;O NHO CHUA GIA TRI
		GIO  EQU  20H
		PHUT EQU  21H
		GIAY EQU  22H
		;OUT PORT DEFINE
		GIODV     EQU 11110111B
		GIOCHUC   EQU 11111011B
		PHUTDV    EQU 11011111B
		PHUTCHUC  EQU 11101111B
		GIAYDV    EQU 01111111B
		GIAYCHUC  EQU 10111111B
		;CAC KHAI BAO , CAC TRI DAU
		MOV GIO,#0
		MOV PHUT,#0
		MOV GIAY,#0
		MOV DPTR,#BANGMA
		MOV R3,#0
		MOV TMOD,#01H
		MOV IE,#82H ;CHOPHEP NGAT TIMER0
		SETB TF0 ; EP NGAT TIMER 0
LAPLAI:	CALL HIEN_THI_GIAY
		CALL HIEN_THI_PHUT
		CALL HIEN_THI_GIO
		JMP LAPLAI
; = = = = = = = = = = = = = MA LED 7 DOAN = = = = = = = = = = = = = = = = = = 		
BANGMA:
       DB 09H,0BDH,13H,91H,0A5H,0C1H,61H,9DH,01H,85H
; = = = = = = = = = = = = = = = = = PHUC VU NGAT T0 = = = = = = = = = = = = = 
ISR_T0:
	    CLR TR0
          MOV TH0,#3CH
          MOV TL0,#0B0H
          INC R3
          CJNE R3,#20,OUT_ISR ;20*50.000 =  1.000.000us =  1s
          MOV R3,#0
          CALL THOIGIAN
OUT_ISR:    
	    SETB TR0
	    RETI
	    
;***********************THOIGIAN(xu ly giay/ phut /gio )********************		
THOIGIAN:
	  PUSH ACC
	  INC GIAY
        MOV A,GIAY
        CJNE A,#60,OUT_THOIGIAN
        MOV GIAY,#0
        INC PHUT
        MOV A,PHUT
        CJNE A,#60,OUT_THOIGIAN
        MOV PHUT,#0
        INC GIO
        MOV A,GIO
        CJNE A,#24,OUT_THOIGIAN
\]
 

Joined
Sep 3, 2007
Messages
853
Helped
66
Reputation
132
Reaction score
16
Trophy points
1,298
Activity points
0
Need the ASM Code

Hi Sheeraz Khan,
I can see the shematic can you reupload it ?
 

Joined
Sep 3, 2007
Messages
853
Helped
66
Reputation
132
Reaction score
16
Trophy points
1,298
Activity points
0
Need the ASM Code

Dear Sheeraz Khan,
This is a doc that can help you:
https://www.von-info.ch/PIC/Part1_R6.pdf
Please refer to the led clignot exemple page 75 study it in depth and you 'll be able to program yourself the Clock driver.
(Thank You BIGONOFF !)

Cheers,
Master_PicEngineer
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top