??? 02/15/05 22:44 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#87592 - more tweaking Responding to: ???'s previous message |
Just a couple of ideas - all of them may be completely wrong. 1.You achieved 3x better performance with "quick optimisation". Maybe some reserve left here - check the fraction of time wasted waiting for LCD not busy as Erik suggested. 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. 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. 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. Jan Waclawek |