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.

[SOLVED] Timer0 at89c2051 problem

Status
Not open for further replies.

pratzz

Member level 5
Joined
Jun 15, 2012
Messages
83
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,288
Activity points
1,781
Code:
clr p3.1
mov p1,#0ffh
start:


Here1:	
	Cpl p3.1
	mov r2,#80
	sjmp there1

there1:
Mov r1,#5
acall delay
djnz r2,there1
sjmp here1 

delay:
Mov tmod,#01
mov tl0,#0f6h
mov th0,0c2h
setb tr0
again:jnb tf0,again
clr tr0
clr tf0
djnz r1,delay
ret
end

in simulation i have connected led to port 3.1 but it is not blinking.
 
Last edited:

then you should complement the P3.7 not theP3.1 that you are doing in code.
 

no that was not the mistake , i meant 3.1 only ,sorry for that
 

Without analizing your code, hardwarewise, how did you connect the LED?
[C] to the CPU pin and [A] {through a resistor} to Vcc?
Keep in mind that there is nothing to drive a load connected between a pin and GND ...

:wink:
IanP
 

p-side to port and n side to ground,do we require pull ups in 2051?i have never used it before.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top