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.
hi, i wanted to know if my INITIAL loop is wrong method to check how that how many times the button has been pressed?
- - - Updated - - -
Hi Brian,
I beleive that I am already using timer0 for the delays in blinking. as far as the interrupt check is concerned, I want it to be time...
im sorry i pasted a wrong code. this outpu is for the a modified code where i have placed both "MS" & "MS1" before the check loop and after ORG 0030H
- - - Updated - - -
i have brought both strings in my code at the end and thanfully i got rid of the garbage values.
by 2 hz i mean that turn on and off time will be off 2sec. i am runinng this 4 times so altogether it takes 8 sec to execute the interrupt loop. the program should return back to blinking led1 after blinking the led2 at hz for as many cycles as i program it for
same with the OFF loop. the only...
there you go.
and thank you for guiding me. please do tell me some good books to learn assembly language.
- - - Updated - - -
besides that, I know C language and have an idea of python as well. I have worked at Visual studio. However, my task is to do this using assembly language and I have...
hey,
thanks it solved the loop issue. however, it is giving me the following response on hyperterminal when interrupt is pressed ten times;
OFF
¨Â
OF
OFF
¨Â”Ò•{0²|uŠuŒÒŒ0ýÂŒÂÜï²”Ûé"¶+y"Ñ•Ҕ}~uŠuŒÒŒ0ýÂŒÂÞﲕÝé"õ™0™ý™"Á•
Ò”}~
ON
ON
OFF...
the "reti" in the INITIAL loop should return to "BL" subloop
- - - Updated - - -
i have kept R0=2 outside the interrupt loop so that whenever one "ON" & one "OFF" loop is executed, the value of R0 is reset.
hi Brian,
thank you for all the help and efforts to explain this to me. This might sound a very stupid question but i have to ask.
I always thought that when you call an interrupt it pushes the last address to the stack and after performing interrupt routine pops the previously saved...
so i did ret and reti the sub routines and the interrupts but this way it never returns from the "LOP" loop. for this very reason i hadi applied sjmp instead of ret or reti command.
ORG 000H
SJMP CHECK;
org 003H;
AJMP INITIAL
ORG 000BH; interrupt TIIMER routine
ajmp...
I corrected that part. however, removing the memory directives for timer and int0, the routines don't work at all. Therefore, I have kept the code under 0003h and 000BH.
ORG 000H
SJMP CHECK;
org 003H;
AJMP INITIAL
RETI
ORG 000BH; interrupt TIIMER routine
PUSH ACC...
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.