Jeremy Leach
Senior Member
Hi
I've been working on the code for my user-interface PicAxe and the button/menu system. It's looking good, (thanks to the Lookup command) but the display updates pretty slowly.
I'm thinking of any ways to improve the speed, even slightly. I'm thinking about the way data is written to the LCd using :
Writei2C 0,(DataByte,255)
Pause 10
My understanding (from the manual etc) is that the display buffer is at address 0, it can store 20 bytes. I'm guessing that the 255 value is a special value that tells the display that the buffer is ready to be displayed.
At present I'm writing each character, followed by Pause 10. I'm thinking that perhaps I can fill the buffer first without pauses , then write a 255 value to trigger the display, followed by a pause. Would this work? Would I need to write to address 0, 1,2, etc ? Not sure. Any ideas welcome.
The Pause 10's aren't really a great amount, so I'm not sure that they are the slow factor anyway. I've noticed that writing blank characters is very fast compared to writing anything else. Which leads me onto another question :
When using writei2C is there some form of handshaking with the target device? ie, does program execution have to wait while the handshaking is taking place, and that for some data types the wait is longer than others??
I've been working on the code for my user-interface PicAxe and the button/menu system. It's looking good, (thanks to the Lookup command) but the display updates pretty slowly.
I'm thinking of any ways to improve the speed, even slightly. I'm thinking about the way data is written to the LCd using :
Writei2C 0,(DataByte,255)
Pause 10
My understanding (from the manual etc) is that the display buffer is at address 0, it can store 20 bytes. I'm guessing that the 255 value is a special value that tells the display that the buffer is ready to be displayed.
At present I'm writing each character, followed by Pause 10. I'm thinking that perhaps I can fill the buffer first without pauses , then write a 255 value to trigger the display, followed by a pause. Would this work? Would I need to write to address 0, 1,2, etc ? Not sure. Any ideas welcome.
The Pause 10's aren't really a great amount, so I'm not sure that they are the slow factor anyway. I've noticed that writing blank characters is very fast compared to writing anything else. Which leads me onto another question :
When using writei2C is there some form of handshaking with the target device? ie, does program execution have to wait while the handshaking is taking place, and that for some data types the wait is longer than others??