EdSim51

Thread Starter

ayaariexo

Joined Apr 12, 2021
7
Hi... I have been using EdSim51 nowadays... can you guys help me with something...

5. Blink LED 5 times.
6. Blink LED 5 times with a push of a button.
7. Turn the LED on and with a push of a button, the LED will blink 7 times.
8. Blink 7 LEDs one at a time continuously.
9. ON two LEDs and OFF another two LEDs at one time and blinking it five times when switch SW2 is pushed, the delay between ON and OFF (blinking) for each four LED is about 0.5 seconds OFF LED when blinking finished.
10. Write a program for 2 LEDs blinking. When there is an interrupt, another two LEDblink.

I need to submit this next week but I still have a lot more...
 

Thread Starter

ayaariexo

Joined Apr 12, 2021
7
do your own homework
it is true that this is my homework... the reason I post it here because I don't know and understand how to do it... I already did half of it. that why it starts from number 5. not 1. I don't need and don't want the answer, just explain to me how to get the result... the free answer will result in no studying and the impact of no studying is failed in this subject... I want to make a note that why I post it here. By making notes I will always remember them instead of just copying an answer.
 

Thread Starter

ayaariexo

Joined Apr 12, 2021
7
hi ay,
As this homework, post your best attempt at answering, we can then help.
E
as for question number 5. Blink LED 5 times.
I already do the blink part... It just that even after 5 times blink it still won't stop.
can you help me with it and explain it to me... I want to take the notes so that I will always remember them.

ORG 00H
SJMP START
ORG 30H
START: SETB P1.0
NOP
CLR P1.0
SJMP START
END
 

Thread Starter

ayaariexo

Joined Apr 12, 2021
7
Hi... I have been using EdSim51 nowadays... can you guys help me with something...

5. Blink LED 5 times.
6. Blink LED 5 times with a push of a button.
7. Turn the LED on and with a push of a button, the LED will blink 7 times.
8. Blink 7 LEDs one at a time continuously.
9. ON two LEDs and OFF another two LEDs at one time and blinking it five times when switch SW2 is pushed, the delay between ON and OFF (blinking) for each four LED is about 0.5 seconds OFF LED when blinking finished.
10. Write a program for 2 LEDs blinking. When there is an interrupt, another two LEDblink.

I need to submit this next week but I still have a lot more...
From the start, I have been studying online which is why it quite hard to understand something 100% in class.
 

LesJones

Joined Jan 8, 2017
3,476
Explain the code (In post #7) that you think should make it stop after 5 brinks.
Note. I do not know the instruction set for the processor you are using but I can see why it does not stop blinking. I also I think the LED will be blinking VERY fast . Can you comment on that statement ?
Try writing out the instructions you would give to another person to make a led that was just connected to a switch blink 5 times with 2 seconds on and 2 seconds off. That should give you clue to what you have missed out in your code.

Les.
 

Ian Rogers

Joined Dec 12, 2012
915
First... As Les said.. Write a small loop to give at least a small delay.

ie..
delay:
load a register with 0
load Another register with 0.
outer loop:
inner loop:
decrement (-1) the second register
goto inner loop until it zero again.
decrement (-1) the first register
goto outer loop until it zero again.
done

Then you will see ( using THIS delay routine) how to blink LED's
 

Thread Starter

ayaariexo

Joined Apr 12, 2021
7
Explain the code (In post #7) that you think should make it stop after 5 brinks.
Note. I do not know the instruction set for the processor you are using but I can see why it does not stop blinking. I also I think the LED will be blinking VERY fast . Can you comment on that statement ?
Try writing out the instructions you would give to another person to make a led that was just connected to a switch blink 5 times with 2 seconds on and 2 seconds off. That should give you clue to what you have missed out in your code.

Les.
Actually, that coding is an answer for question 2 which is "Blink LED." I just thought since it also blinks question I can use it as a base for question 5.
 

Thread Starter

ayaariexo

Joined Apr 12, 2021
7
First... As Les said.. Write a small loop to give at least a small delay.

ie..
delay:
load a register with 0
load Another register with 0.
outer loop:
inner loop:
decrement (-1) the second register
goto inner loop until it zero again.
decrement (-1) the first register
goto outer loop until it zero again.
done

Then you will see ( using THIS delay routine) how to blink LED's
Thank you... I will try making the coding
 
Top