??? 09/05/09 21:59 Modified: 09/05/09 23:20 Read: times |
#168748 - Fastest way to fill buffer |
Hi, I am making a small project with an GLCD, and I want to know if anyone knows the fastest way to clear a 1024 byte buffer (which is in external memory at location 0).
So far I have done this: clr a mov r0, a mov p2, a cpl a lp1: movx @r0, a ;P2 = 0 inc p2 movx @r0, a ;P2 = 1 inc p2 movx @r0, a ;P2 = 2 inc p2 movx @r0, a ;P2 = 3 dec r0 movx @r0, a ;P2 = 3 dec p2 movx @r0, a ;P2 = 2 dec p2 movx @r0, a ;P2 = 1 dec p2 movx @r0, a ;P2 = 0 djnz r0, lp1 Which ends in 1603uS (at 24MHz in a 12clocker), which is a perfect time, considering that minimum time is 1500 uS (1 movx and 1 inc/dec) Does anybody know how to make it even faster? Thanks, Gonzalo |
Topic | Author | Date |
Fastest way to fill buffer | 01/01/70 00:00 | |
something like this | 01/01/70 00:00 | |
when software hits limits... | 01/01/70 00:00 | |
auto-increment | 01/01/70 00:00 | |
Two questions .. | 01/01/70 00:00 | |
But Gonzallo unrolled it already isn't it? | 01/01/70 00:00 | |
Yes, but not with the hardware increment | 01/01/70 00:00 | |
be specific | 01/01/70 00:00 | |
Don't forget about the Maxim/Dallas parts! | 01/01/70 00:00 | |
what to unroll | 01/01/70 00:00 | |
Well, what you CAN do ...![]() | 01/01/70 00:00 |