led chaser pattern repetiton
sir any alternate option for making mirror effect actually the code i'm using for mirroring is taking much space.sankalp_s
What is mirroring ?
Thank you Dear experimenteruk sir.. its working after completion of all design of running program. what can we do for instant change of program..please suggest.sankalp_s
This code should do it.
It makes the "DELAY: " routine return to the main loop.
Remember it works here because "DELAY: " is always
3 calls away from the main loop.
This method is not usually a safe method.popByte equ 0x40 ;dump stack here ; (add to top of program) DELAY: JNB P3.2,FULL JB P3.1,$ JNB P3.2,FULL JNB P3.1,$ JNB P3.2,FULL RET ;************************************************* *********************************************** ; ROUTINE FOR BREAK ;************************************************* *********************************************** FULL: MOV P1,#11000000B JNB P3.2,$ MOV P1,#11111111B pop popByte ;dump return address pop popByte ;dump return address pop popByte ;dump return address pop popByte ;dump return address RETExperimenterUK
Sir its also not working.
the result is same as before we got.
Sir its also not working.
the result is same as before we got.sankalp_s
Saying "it's not working" does not really help.
What are you doing.. ?
what does the display do ?
What do you expect it to do ?
Please zip and post your latest code.
Sir its also not working.
the result is same as before we got.sankalp_s
Saying "it's not working" does not really help.
What are you doing.. ?
what does the display do ?
What do you expect it to do ?
Please zip and post your latest code.ExperimenterUK
sir program is not changing when switch is pressed.. it changes after completion of all design of particular program.
suppose when circuit starts, the default program runs but as i press the switch, it makes no changes until all design of "program 0" is being executed.
i want to change program by pressing the switch immediately.
then it seemed simple
then it didn't work
Finally , try this.
I put most of your program text into an "include file".
This keeps thing tidy, it does not affect how the program works.
Just keep the .asm file in the same folder as the .inc file.
I also put back the software delay.
partly to help with testing, but also because it is better than using
a 555.
Do you have a reason to use a 555 ?
[ Edited Sat Feb 21 2015, 07:22 am ]
i want to run program during switch is pressed.
and please tell me which compiler should be used for compiling with inc file. because i'm using mcu8051 ide but i'm unable to compile with inc file so put the code in asm file then compiled the asm code.
[ Edited Sun Feb 22 2015, 11:27 am ]
Do you have a reason to use a 555 ?sankalp_s
Actually sir, variable delay is my need, so i'm using 555,
sir please please help me for make it with 555.
i want to run program during switch is pressed.
and please tell me which compiler should be used for compiling with inc file. because i'm using mcu8051 ide but i'm unable to compile with inc file so put the code in asm file then compiled the asm code.sankalp_s
I use uVision from Keil, but I would expect most assemblers to
accept include files.
mcu8051 ide might need different instructions.
I would have to pay for mcu8051 ide so have not tried it
I think this version does what you want.
It can use software delays or a 555.
[ Edited Mon Feb 23 2015, 01:55 am ]
I think this version does what you want.
It can use software delays or a 555.
Thank you dear phil sir thank you so much, now it's working great support sir... great forum great support
What is mirroring ?
sorry for my poor language,
i meant , in this code every design has mirror design mean it runs in opposite direction, for this operation i have to write same code to run in opposite direction it takes much space of chip, so i want to know any other idea for making mirror effect, which use less space.
What is mirroring ?
sorry for my poor language,
i meant , in this code every design has mirror design mean it runs in opposite direction, for this operation i have to write same code to run in opposite direction it takes much space of chip, so i want to know any other idea for making mirror effect, which use less space.sankalp_s
You need to use tables.
That will make designing and reversing much easier.
Here is an example.
seq1: db 5,1,2,4,8,16,32,64,128,64,32,16,8,4,2,1,5 ;17 save_A equ 43h table_count equ 44h mov dptr,#seq1 ;point to table mov table_count,#17 ;size of table mov A,#0 ;first byte of table displayloop: mov save_A,A movc A,@A+dptr ;get the next pattern mov P0,A call delay2 mov A,save_A inc A ;next byte djnz table_count,displayloop mov P0,0 jmp $ ;stop ;software delay delay2: mov r2,#10 outloop: MOV R0,#0FFH INLOP: MOV R1,#0FFH DJNZ R1,$ DJNZ R0,INLOP DJNZ R2,outloop ret
[ Edited Mon Feb 23 2015, 04:50 am ]