View Single Post
Old 2007-08-28, 10:50   #25 (permalink)
cybrmage
Portal Developer
 
Join Date: May 2007
Posts: 498
Thanks: 1
Thanked 83 Times in 39 Posts

Country:


Default

The correct way to turn off the LCD is to use SendData(0x5000000000000008). This will completely blank the display.

If you want to get reaaly fancy, you can enable clock that is built in to the display.
IE:
----------------- c++ example ------------------
SYSTEMTIME st;
Int64 data;
GetLocalTime(&st);
data = ((Int64)0x50 << 56);
data += ((Int64)st.wSecond << 48);
data += ((Int64)st.wMinute << 40);
data += ((Int64)st.wHour << 32);
data += ((Int64)st.wDay << 24);
data += ((Int64)st.wMonth << 16);
data += ((uint64)st.wYear << 8);
data += (Int64)0x80;
SendData(data);
-----------------------------------------------------

This will disable control of the display and show the built in clock at the current contrast level.

---- correction ----

The sample code snippet posted above is for c++... The iMon driver is written in c#... the correct code snippet is below.

------------------ c# example -------------------
DateTime st = DateTime.Now;
Int64 data;
data = ((Int64)0x50 << 56);
data += ((Int64)st.Second << 48);
data += ((Int64)st.Minute << 40);
data += ((Int64)st.Hour << 32);
data += ((Int64)st.Day << 24);
data += ((Int64)st.Month << 16);
data += (((Int64)st.Year &0x0F) << 8);
data += (Int64)0x80;
SendData(data);
-----------------------------------------------------

Last edited by cybrmage; 2007-08-30 at 17:05. Reason: correction
cybrmage is offline