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.
oh , sorry about that,i changed the JNB TF0,$ to SJMP $ :S
but when i run it step by step, the program just stop there.
it never get into the interrupt once
after i try to follow the flow chart, i try this code:
#include <sfr51.inc>
ORG 0000H ;
highsignal:
MOV A, #32 ;
SJMP delay ;
ORG 000BH ;
DJNZ R7, RETURN
CLR P1.0...
I am a bit confuse, what do u mean by clear timer flags , decrement count inside the isr routine and what is the count? is that the one i use to loop that 50ms delay?
Thx for ur advice, i just tried to allow timer to overflow, but it just stuck in the JNB TF1,$ .
is that wrong of using this instruction or is there anything i missed again?
here is the code:
#include <sfr51.inc>
ORG 0000H ;
CLR F0 ;
JB F0...
I think THE DJNZ R7,loop is not wrong because the instruction DJNZ will count til R7=0 automatically
and for the ORG 000BH, i am not sure bout that but I saw an example that also point to same vector twice :S
i am currently studying on 8051 PWM and need to generate a PWM period of 2 sec and 80% duty cycle with the use of timer interrupt.
However, when i run it it simply keep looping in the delay loop. Can anyone tell me what is wrong?
Here is the code i use:
#include <sfr51.inc>
ORG 0000H...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.