PDA

View Full Version : LCD_COMMANDUS define



retepsnikrep
- 5th March 2012, 17:29
I have an Winstar 20x4 OLED display which works well and looks great apart from the fact the clear screen command takes 6.5ms.

http://www.rapidonline.com/Electronic-Components/20x4-Oled-Display-Yellow-57-2302

I don't want to change the LCD_COMMANDUS define to 6500 to cope with this as it also pauses every other command and wastes a huge amount of time, as all the other command require no delay according to the data sheet. So the command and data delay can be 1us or something tiny in all except the clear screen scenario.

Is there any way to get LCDOUT to pasue for a varying length based on the command being sent.

So for instance it recognises the clear screen command and only in that case pauses for a set time.

So in effect can we have another define please for the next version of PBP.

LCD_COMMANDUS 2000 as now for general commands

LCD_COMMANDCLRUS 7000 for the Clear Screen Command

Acetronics2
- 5th March 2012, 18:10
Oleds are known to be sloww ... that's it !!

now ... there should be a " busy " line somewhere ...



BUSY FLAG (BF)
The Busy Flag is used to determine whether IC is idle or internally operating. When IC is performingsome internal operations, the Busy Flag is set to "1". Under this condition, the no other instruction willnot be accepted. When RS Pin is set to "0" and R/WB Pin is set to "1", the Busy Flag willbe outputted to the DB7 pin.


Alain

Art
- 5th March 2012, 18:28
can't you PAUSE 65 after sending the clear screen?

LCDOUT $FE,$01
PAUSE 65

I would imagine it takes the same time to receive the command as any other,
with the delay being to act on the clear screen command.

HenrikOlsson
- 5th March 2012, 18:31
Hi,
Or you could do the pause "manually", something like:

i VAR BYTE

Main:
GOSUB LCD_ClearScreen
LCDOUT["The value of i is: ", DECi]
i = i + 1
GOTO Main

LCD_ClearScreen:
LCDOUT[$FE, 1] ' Clear Screen
PauseUs 6500 ' Tweak to match...
RETURN

/Henrik.

retepsnikrep
- 5th March 2012, 18:54
I could put a pause after every clear screen command but I don't wan't the code bloat.

An extra define would be nice I'll ask the pbp developers. Add it to the wish list.

I quite like the sub routine idea but an addition to the library routine would seem simplest.

Art
- 6th March 2012, 23:37
You don't put a pause after every clear screen, you just do it once:

ClearOLED:
LCDOUT $FE,$01
PAUSE 65
return

add that to your code once, and just call ClearOLED.