View Single Post
Old 08-15-2013, 11:35 PM   #6 (permalink)
t vago
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 828
Thanked 708 Times in 456 Posts
Quote:
Originally Posted by nickdigger View Post
I've also gotten my cpu load down to 3-5% on a 4x20 LCD, just by tweaking the LCD routines to meet the spec. The killer is delay2 (5 milliseconds) in LcdCommandWrite. It only needs to be 120 microsec. That should eliminate the need for that buffer you added.
I tried it just now, and the results were not very encouraging.

Buffered LCD code (approximately 1 ms per character):
CPU loading = 2.2%
Free Mem: 1044
Program Size: 20178

Bare LCD code (80 us per character):
CPU loading = 3.2%
Free Mem: 1172
Program Size: 20548

To be fair, the Bare LCD code did seem to be a bit more crisp in response, than the buffered code. However, it would not be that big of an advantage, compared to the fact that the code grew by 370 bytes, while only gaining 128 bytes of RAM. Ugh.
  Reply With Quote