Go Down

Topic: Need some help with lcd driver (Read 655 times) previous topic - next topic


I want to create in my Nokia 6100/Philips PCF8833 lcd driver one function to set the lcd contrast and one to set the back light intensity
For the first one in the Nokia 6100 LCD Display Driver by James P. Lynch
sendData(0x30);// contrast  0x30 rage from -63 to 63 - i will use 0 to 63
and is working fine
but i want o create somthing like

Code: [Select]
     void PCF8833::SetContrast(byte  Val)
           sendData(Val);// contrast  0x30


Code: [Select]
     // Software serial output (MSB first)
     void PCF8833::ShiftBits(byte b)
       // All this could be done in a for loop
       // But this way, it is about 40 % faster
       bitout(b, 128);
       bitout(b, 64);
       bitout(b, 32);
       bitout(b, 16);
       bitout(b, 8);
       bitout(b, 4);
       bitout(b, 2);
       bitout(b, 1);

     // Sends a 1 bit followed by the 8 bits of data (data byte)
     void PCF8833::sendData(byte data)

How can i transform a int or string into 0xXXX byte value, because i want to send from my sketch something like lcd.SetContrast(50);//(50%)

Regarding the second question about back light intensity, is there any way to control the current flowing through an arduino digital or analog pin?
Because I'm thinking to use a transistor that's controls the back light of my lcd

Thank you

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131