Continue to Site

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.

Decimal Counter Using Two 7-segment displays and an 8051(at89c51)

Status
Not open for further replies.

myhumps007

Newbie level 6
Joined
Dec 8, 2010
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,362
please any one send me code(assembly or C) and schematic as well.
i urgently need..please thnX.:sad:
 

this might help you
ORG 00H
START: MOV DPTR,#TABLE ;Set the first address segment code table
MOV R0,#00H ;R0 keep count
MOV P0,#00H
MOV P2,#00H ;Digital Display initialization
S1: INC R0 ;Plus 1 count
CJNE R0,#100,S2 ;Determine whether the maximum count
MOV R0,#00H
S2: JB P3.7,$ ;Wait for button
LCALL DELAY
JB P3.7,S2 ;Remove button jitter
S3: MOV A,R0
MOV B,#10
DIV AB ;Separate count of ten and a bit

MOVC A,@A+DPTR ;Were taken 10 and a bit of the segment code and display
MOV P0,A
MOV A,B
MOVC A,@A+DPTR
MOV P2,A

JB P3.7,S1 ;Wait for the lift button
LJMP S3

DELAY: MOV R5,#20 ;10 ms delay
D1: MOV R6,#250
DJNZ R6,$
DJNZ R5,D1
RET

TABLE: DB 3FH,06H,5BH,4FH,66H
DB 6DH,7DH,07H,7FH,6FH
END

---------- Post added at 16:27 ---------- Previous post was at 16:25 ----------

pull up resisters 10k ohm in port 0,digit one port 0msb and port two lsb so easy
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top