Pages: [1]   Go Down
Author Topic: Need some help with lcd driver  (Read 517 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
Karma: 1
Posts: 262
New to Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

     void PCF8833::SetContrast(byte  Val)
            sendData(Val);// contrast  0x30

     // 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


Pages: [1]   Go Up
Jump to: