??? 02/15/05 23:49 Read: times |
#87596 - Good thinking Jan Responding to: ???'s previous message |
Jan Waclawek said:
1.You achieved 3x better performance with "quick optimisation". Maybe some reserve left here Absolutely. - check the fraction of time wasted waiting for LCD not busy as Erik suggested. I think this is pointless, because the time delay till the lcd-not-busy signal released is hardware dependent and I have no control over it. 2. For a 0 pixel wide sweep you won't need to read nor write the whole column, if you remember the position of old samples, simply write blanks where the oldest samples are and them and write pixels where the new samples are (taking into account also the neighbouring samples). This is 4 writes only (for 2 waveforms) and a bit more calculation/programming.
Unfortunately this requires a place to store 2x 240 bytes of data - doesn't the LCD have some undisplayed RAM? It would requir only 2creads and 2 writes and a couple of bytes buffering in the XRAM/IRAM. Unfortunately the LCD ram is too slow to access, remember? A replacement of the cursor - two little arrows at the top and the bottom could be possibly used.
As an extension to this idea, a wider blank area can be used (but still no full vertical cursor); this is still only 4 writes per step. I still have to draw a cursor of white spaces at least to wipe out old sample. but at least I can save time by just deleting one complete vertical cursor which makes it look white. 3. If you insist on the vertical cursor, you can spare a little having a mini-buffer for the128 bytes in the column. In this way you need to read the 128 bytes only once for 8 steps. To not to have jumpy behaviour, you need to "read ahead" 128/8 bytes at a step into a second buffer and switch the buffers as the cursor reaches the boundary between them. However it is questionable, whether the speed gained in this way is worth the increased complexity. I think this wouldn't work because you have to include bits of next byte of data which makes you having to read byte every next bit or pixel which is I'm doing now. thanks for your brain storming, I'm sure I will benifet alot from your points. Mahmood |