Discussion in "Project Doubts" started by    sankalp_s    Nov 29, 2014.
Sat Jan 30 2016, 06:47 PM
#71


CALL ALLON
CLR L1
CLR L2
CLR L3
CLR L4
CALL DELAY ;delay to see leds off
CALL ALLON
CALL DELAY ;add a delay to see all leds on


Sorry sir this logic is not working, this logic has changed the pattern. like blinking pattern.
I have tried this method, it's working fine but taking too much space.
I think problem is ALLON instruction.
 DESGN8: ; 
                CALL DELAY
                CLR L1
                CLR L2
                CLR L3
                CLR L4
		SETB L5
		SETB L6
		SETB L7
		SETB L8
		SETB L9
		SETB L10
		SETB L11
		SETB L12
                CALL DELAY		
                CLR L2
                CLR L3
                CLR L4
                CLR L5
	        SETB L6
		SETB L7
		SETB L8
		SETB L9
		SETB L10
		SETB L11
		SETB L12
		SETB L1
                CALL DELAY
                CLR L3
                CLR L4
                CLR L5
                CLR L6
		SETB L7
		SETB L8
		SETB L9
		SETB L10
		SETB L11
		SETB L12
		SETB L1
		SETB L2
                CALL DELAY		
                CLR L4
                CLR L5
                CLR L6
                CLR L7
		SETB L8
		SETB L9
		SETB L10
		SETB L11
		SETB L12
		SETB L1
		SETB L2
		SETB L3
                CALL DELAY
                 
		.........
.......


sir can you code this in any other method?


[ Edited Sat Jan 30 2016, 06:51 PM ]
Sat Jan 30 2016, 06:57 PM
#72
>sir can you code this in any other method?

You need to explain exactly what you want the code to do.
for example

All LEDs on for 2 seconds
All LEDs off for 1 seconds.
All LEDs on for 2 seconds.
All LEDs off for 3 seconds.
All LEDs on for 2 seconds.

Sat Jan 30 2016, 07:40 PM
#73



You need to explain exactly what you want the code to do.
for example

All LEDs on for 2 seconds
All LEDs off for 1 seconds.
All LEDs on for 2 seconds.
All LEDs off for 3 seconds.
All LEDs on for 2 seconds.


ExperimenterUK


I want...
example...

ALL LED ON
LED 1,2,3,4 OFF REST LED ON
THEN LED 2.3,4,5 OFF REST LED ON
THEN LED 3,4,5,6 OFF REST LED ON
......... LIKE THIS.

after removing ALLON instruction it's working fine, so what can be alternet way by using less memory.


[ Edited Sat Jan 30 2016, 07:49 PM ]
Tue Feb 02 2016, 12:25 AM
#74


after removing ALLON instruction it's working fine, so what can be alternet way by using less memory.

sankalp_s


Earlier in the thread I suggested using tables to create the output.
I think that is the best method, but good use of sub routines
will save a lot of code.

Build long patterns from shorter patterns.
Tue Feb 02 2016, 07:26 PM
#75



but good use of sub routines
will save a lot of code.....
&
Build long patterns from shorter patterns....

ExperimenterUK


Sir I didn't understand that. Could you explain above lines in different way?
and 2nd question is, can we look more to rectify the existing code?or should be dump?

thank u sir


[ Edited Tue Feb 02 2016, 07:29 PM ]
Thu Feb 04 2016, 04:10 AM
#76


Sir I didn't understand that. Could you explain above lines in different way?

sankalp_s



Create short runs that turn LEDs on or off.
Then stick them together to form complicated patterns.
eg
 OFF4:   ;turn LEDS off 1 at a time
                CLR L1
                CALL DELAY
                CLR L2
                CALL DELAY
                CLR L3
                CALL DELAY
                CLR L4
                CALL DELAY
                ret

 ON4:   ;turn LEDS on 1 at a time
                SETB L1
                CALL DELAY
                SETB  L2
                CALL DELAY
                SETB  L3
                CALL DELAY
                SETB  L4
                SETB  DELAY
                ret


;next section does a lot with very little extra code

FIRSTLOOP:

  call  ON4; 
  call OFF4;
  call  ON4:  
  call OFF4;
  call  ON4:  
  call OFF4;
  call  ON4:  
  call OFF4;
  ret

;next code does 4 times as much with hardly any more code

  call FIRSTLOOP:
  call FIRSTLOOP:
  call FIRSTLOOP:
  call FIRSTLOOP:






and 2nd question is, can we look more to rectify the existing code?or should be dump?

sankalp_s



If you want to keep creating new sequences, then I would dump your
code and use tables to control the patterns.

If you just want to get your display working
fix the code you have.
There should be enough memory for a good display if you
re-use the sequences as I described above.






[ Edited Fri Feb 12 2016, 11:06 PM ]
Thu Feb 11 2016, 06:28 PM
#77
Hello phil sir finaly i'm dumping my code, now i'm learning table method,
now plz tell me how to add next pattern, can give me example with 2 pattern, it will be very help full to learn.
second thing is how can i design table for more pettern,
for example,
pattern1:
0,0,1,1,1,1,1,1,1,1,1,1
1,0,0,1,1,1,1,1,1,1,1,1
1,1.0,0,1,1,1,1,1,1,1,1
......
.....
where 0= led off
1 = led on
please give some example to create different pattern.

and last one. how can i use that mode function with this table method.

thank you sir.
Fri Feb 12 2016, 11:04 PM
#78
Try this program.
Let me know if it makes sense to you.

 sankalp_s like this.
Sun Feb 14 2016, 08:02 PM
#79


Try this program.
Let me know if it makes sense to you.


ExperimenterUK


Thank you very much sir this program is easy to understand and learn also, now i can understand display pattern.
But i have some queries:-
I) how can i write design pattern in this way eg. db 1,0,2,0,4.....
II)mirrorbyte instruction is not working(it display only in one direction), can we use mirrorbyte instruction for separate design and why we r using of long delay in the code?
III)no of repetition of pattern like this instruction.
MOV R3, #05 ;REPEtion of pattern 
D9: CALL DESGN9
DJNZ R3,D9 

and
MOV R3, #12
D8:		CALL DESGN8
                        JNB P3.5,D8(how to use this)
			DJNZ R3,D8



[ Edited Mon Feb 15 2016, 06:06 PM ]
Wed Feb 17 2016, 12:13 AM
#80


Thank you very much sir this program is easy to understand
and learn also, now i can understand display pattern.

sankalp_s


Great..


I) how can i write design pattern in
this way eg. db 1,0,2,0,4.....

sankalp_s


Your pattern is 12 bits wide, so work in rows of 16 bits
The lines below are the same.
dw 1111111100000000b
dw 0ff00h
db 0ffh,0h
db 255,0 


II)mirrorbyte instruction is not working
can we use mirrorbyte instruction for separate design
and why we r using of long delay in the code?

sankalp_s


I have attached a program that does mirroring.
The long delay is just to separate the sequences.

III)no of repetition of pattern like this instruction.
MOV R3, #05 ;REPEtion of pattern 
D9: CALL DESGN9
DJNZ R3,D9 

It is just a case adding loops to the code,
I'm sure you will work it out.

 sankalp_s like this.

Get Social

Information

Powered by e107 Forum System

Conversation

Tue Jul 23 2019, 08:33 AM
Constance Sutherland
ss内容ss
ExperimenterUK
Thu Jul 11 2019, 07:55 PM
@ramos https://www.theengineeringprojects.com/2017/09/l298-motor-driver-library-proteus.html
ExperimenterUK
Thu Jul 11 2019, 07:44 PM
@praveen123. Can you give a link to the project ?
Thu Jul 11 2019, 04:47 PM
ramos
buenos dias alguien podria ayudarme necesito saber como descargar la libreria del l298n para proteus
Thu Jul 11 2019, 11:11 AM
praveen123
anyone can help me
Thu Jul 11 2019, 11:11 AM
praveen123
i need source code for 8051 -smart trolley rfid
Thu Jul 11 2019, 11:10 AM
praveen123
hii
ExperimenterUK
Thu Jun 27 2019, 09:14 PM
Hi.. good to see you again
۞ TPS ۞
Thu Jun 27 2019, 07:31 AM
Hello
AdiGhazi
Tue Jun 18 2019, 11:21 AM
Hlo Dear , I've to program AT89C51AC3 RT-LUM using flip but I'm getting time out error for RS232. Will you please suggest me which programmer will be supportable to program this Chip.

Downloads

Comments

3AAPC
Sun Jul 21 2019, 12:41 AM
rpels7707
Fri Jul 19 2019, 11:31 AM
ameya123
Fri Jul 19 2019, 07:36 AM
anhsieuno
Thu Jul 18 2019, 11:39 AM
zxcvbnm1234
Sat Jul 13 2019, 07:09 AM
surajghayal
Wed Jul 10 2019, 01:17 PM
figureyang
Fri Jul 05 2019, 04:25 AM
mousompal
Sat Jun 29 2019, 05:02 PM

Online

Guests: 63, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38081
Newest member: 3AAPC
Forum Activity
3AAPC Avatar
Posted By 3AAPC
Sun Jul 21 2019, 12:51 AM
3AAPC Avatar
Posted By 3AAPC
Sun Jul 21 2019, 12:47 AM
With the GPS antenna in the outdoors, I use the ub...
ameya123 Avatar
Posted By ameya123
Fri Jul 19 2019, 07:42 AM
Hello,Please share 8051 Assembly language code for...
figureyang Avatar
Posted By figureyang
Fri Jul 05 2019, 04:37 AM
here is the source code prepared for you download ...
figureyang Avatar
Posted By figureyang
Fri Jul 05 2019, 04:30 AM
Cheap_Flash_FS(Normal Version)--Embedded FAT16/32 ...
wimac Avatar
Posted By wimac
Sat Jun 22 2019, 01:26 PM
I’ve use the AT89C51ED2 which has a similar progra...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Jun 20 2019, 10:08 PM
baud rate is 9600 at stop bits of 2. AdiGhaziThe u...
AdiGhazi Avatar
Posted By AdiGhazi
Thu Jun 20 2019, 05:24 AM
Dear,I'm using RS232 serial port cable to use flip...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Jun 18 2019, 10:19 PM
Okay.. I have never programmed the AT89C51AC3 or ...
AdiGhazi Avatar
Posted By AdiGhazi
Tue Jun 18 2019, 11:20 AM
Hlo Dear ,I've to program AT89C51AC3 RT-LUM using ...