Shop OBEX P1 Docs P2 Docs Learn Events
Bitmap to a nokia 5110 LCD — Parallax Forums

Bitmap to a nokia 5110 LCD

CrosswindsCrosswinds Posts: 182
edited 2014-10-04 12:10 in Propeller 1
Hello Guys!

I have my 5110 up and running with the object from obex!

But now ofcourse i also want to try out to show a bitmap. I have created a bitmap that is 84x48, converted it with LCD assistant, and get this output:

//
// File generated by LCD Assistant
// http://en.radzio.dxp.pl/bitmap_converter/
//

const unsigned char igen [] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x40, 0x30, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x1C, 0x60, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x40, 0x20, 0x20, 0x20, 0x10, 0x10, 0x08,
0x04, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x03, 0x0C, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x40, 0x20, 0x20, 0x10, 0x08, 0x08, 0x04, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};



i guess i need to replace the 0x with a $, but i have no idea how to modify the object, or create the function for this.

Is there anyone that maybe can help me in the right direction?

Comments

  • JonnyMacJonnyMac Posts: 9,105
    edited 2011-12-23 12:21
    That output is obviously written for a C compiler; with a little creative find-replace and copy-and-paste you can make it Spin compatible (I'm assuming that's what you want).
    dat
    
    igen            byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80
                    byte    $40, $30, $10, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $02, $1C, $60, $80, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $80, $C0, $40, $20, $20, $20, $10, $10, $08
                    byte    $04, $06, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $03, $0C, $08, $10, $20, $20, $40, $40, $80, $80, $80, $80, $80, $80
                    byte    $80, $40, $20, $20, $10, $08, $08, $04, $02, $01, $01, $01, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00 
    

    My favorite tool for this kind of stuff is EditPlus
  • CrosswindsCrosswinds Posts: 182
    edited 2011-12-23 12:29
    Hello Jonny! Thank you for your response!

    That was a fast conversion you did! :)

    Iam a bit unsure of how to send this to the LCD also. Any tip for that?

    and also Do i need to break it down to 5 sections like the fonts are?
    JonnyMac wrote: »
    That output is obviously written for a C compiler; with a little creative find-replace and copy-and-paste you can make it Spin compatible (I'm assuming that's what you want).
    dat
    
    igen            byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80
                    byte    $40, $30, $10, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $02, $1C, $60, $80, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $80, $C0, $40, $20, $20, $20, $10, $10, $08
                    byte    $04, $06, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $03, $0C, $08, $10, $20, $20, $40, $40, $80, $80, $80, $80, $80, $80
                    byte    $80, $40, $20, $20, $10, $08, $08, $04, $02, $01, $01, $01, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
                    byte    $00, $00, $00, $00, $00, $00, $00, $00 
    

    My favorite tool for this kind of stuff is EditPlus
  • JonnyMacJonnyMac Posts: 9,105
    edited 2011-12-23 12:37
    Iam a bit unsure of how to send this to the LCD also. Any tip for that?

    For that you are on your own. I kind of assumed that taking the time to make a bitmap meant you knew how to get it into the display. I don't have one of those so I have no experience with it.
  • CrosswindsCrosswinds Posts: 182
    edited 2011-12-23 12:43
    JonnyMac wrote: »
    For that you are on your own. I kind of assumed that taking the time to make a bitmap meant you knew how to get it into the display. I don't have one of those so I have no experience with it.

    Oh okey. Yes well, i needed to create a bitmap to try this out. hehe. Editing single chars the font i do understand. But how to send that whole chunk to the lcd is another story.
  • pedwardpedward Posts: 1,642
    edited 2015-07-01 22:56
    JonnyMac, this is useful stuff. I had to do the same with a sound file and didn't do byte on every line, and the compiler ticked an moaned. My solution, based on what I read elsewhere, was to use a multiline comment at the end and beginning of lines:
    foo byte $00,$01, {
    } $02,$03, {
    } $04, $05
    

    It would have been much cleaner to do it how you did, but I couldn't find any examples that showed that syntax!
  • Clock LoopClock Loop Posts: 2,069
    edited 2011-12-24 15:00
    Ref: http://forums.parallax.com/showthread.php?124487-EtPhoneHome-v1.0-A-Nokia-6150(like)-pcb-redone-with-two-propellers.-PCD8544-l&highlight=nokia+etphonehome


    [code]

    PUB LcdInitialize

    'AT RESET THE LCD HAS THE FOLLOWING:
    'Power-down mode (bit PD = 1) **DEFAULT AFTER RESET**
    'Horizontal addressing (bit V = 0) **DEFAULT AFTER RESET**
    'Normal instruction set (bit H = 0) **DEFAULT AFTER RESET**
    'Display blank (bit D = 0, bit E = 0) **DEFAULT AFTER RESET**
    'X6 to X0 = 0 | 0 | 0 | 0 | 0 | 0 | 0 - (Line0) **DEFAULT AFTER RESET**
    'Y2 to Y0 = 0 | 0 | 0 - (Bank0) **DEFAULT AFTER RESET**
    'Temperature control mode (TC1 TC0 =0) **DEFAULT AFTER RESET**
    'BS2 to BS0 = 0 | 0 | 0 - 1:100 **DEFAULT AFTER RESET**

    'reset lcd
    outa[LcdCs] := 0 'turn the lcd chip on

    outa[LcdRst] := 0 'turn the reset on

    BS2.SHIFTOUT(LcdRst, LcdClk, 0, BS2#MSBFIRST, 2) ' clock the reset in ****REQUIRED****

    outa[LcdRst] := 1 'turn the reset off

    outa[LcdDc] := 0 'sets Lcd command mode


    'CHANGES INSTRUCTION SET
    'Extended instruction set (bit H = 1)
    'Power-on mode (bit PD = 0)
    'Horizontal addressing (bit V = 0)
    BS2.SHIFTOUT(LcdSda, LcdClk, 33, BS2#MSBFIRST, 8) '33 0010 0001
    '
    {The settings below are voltage related. They should not be changed unless you know
    what your doing. If you are using 3.3v, then the default settings are correct for you.}

    '
    'Needs Extended instruction set (bit H = 1)
    'Command set VOP; (set operation voltage to 0.8 V -- 8)
    'BS2.SHIFTOUT(LcdSda, LcdClk, 136, BS2#MSBFIRST, 8) '136 1000|1000


    'Needs Extended instruction set (bit H = 1)
    'Command set VOP; (set operation voltage to 1.6 V -- 16)
    'BS2.SHIFTOUT(LcdSda, LcdClk, 144, BS2#MSBFIRST, 8) '144 1001|0000 ***BEST? FOR 5v OPERATION***


    'Needs Extended instruction set (bit H = 1)
    'Command set VOP; (set operation voltage to 1.8 V -- 18)
    'BS2.SHIFTOUT(LcdSda, LcdClk, 146, BS2#MSBFIRST, 8) '146 1001|0010


    'Needs Extended instruction set (bit H = 1)
    'Command set VOP; (set operation voltage to 2.2 V -- 22)
    'BS2.SHIFTOUT(LcdSda, LcdClk, 150, BS2#MSBFIRST, 8) '150 1001|0110


    'Needs Extended instruction set (bit H = 1)
    'Command set VOP; (set operation voltage to 2.4 V -- 24)
    BS2.SHIFTOUT(LcdSda, LcdClk, 152, BS2#MSBFIRST, 8) '152 1001|100 ***BEST FOR 3.3v OPERATION***


    'Needs Extended instruction set (bit H = 1)
    'Command set VOP; (set operation voltage to 2.8 V -- 28)
    'BS2.SHIFTOUT(LcdSda, LcdClk, 156, BS2#MSBFIRST, 8) '156 1001|1100


    {Needs Extended instruction set (bit H = 1)
    Command set VOP; (set operation voltage to 3.3 V -- 33) }
    'BS2.SHIFTOUT(LcdSda, LcdClk, 161, BS2#MSBFIRST, 8) '161 1010|0001


    {Needs Extended instruction set (bit H = 1)
    Command set VOP; (set operation voltage to 7 V -- 70)}
    'BS2.SHIFTOUT(LcdSda, LcdClk, 198, BS2#MSBFIRST, 8) '198 1100|0110
    '

    {Needs Extended instruction set (bit H = 1)
    Sets Bias - 1:48 **Optimum**}
    BS2.SHIFTOUT(LcdSda, LcdClk, 19, BS2#MSBFIRST, 8) '19 0001|0011
    '

    {CHANGES INSTRUCTION SET
    Normal instruction set (bit H = 0)
    Power-on mode (bit PD = 0)
    Horizontal addressing (bit V = 0)}
    BS2.SHIFTOUT(LcdSda, LcdClk, 32, BS2#MSBFIRST, 8) ' 32 0010|0000

    outa[LcdDc] := 1 'sets Lcd data mode
    ZeroLcdRam 'puts cursor at 0, and clears lcd ram.


    {
    ******************PCD8544******DATA*****************************************

    For all commands below, D/C mode = 0 (command mode) (command/data mode pin needs to be low)


    D/C 7 6 5 4 3 2 1 0
    _____|____|______|______|______|______|______|______|__________________________________________
    0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 - no operation
    0 | 0 | 0 | 1 | 0 | 0 | PD | V | H = PD-power down control; V-address entry mode; H-normal/extended instruction set control
    | | | | | | | |
    1 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 - writes data to display RAM



    The write data’and function set’commands can be executed in both cases of H. (H = 0 or 1)

    'Power-on mode (bit PD = 0)
    'Power-down mode (bit PD = 1) **DEFAULT AFTER RESET**
    • All LCD outputs at VSS (display off)
    • Bias generator and VLCD generator off, VLCD can be disconnected
    • Oscillator off (external clock possible)
    • Serial bus, command, etc. function
    • Before entering Power-down mode, the RAM needs to be filled with‘0’s,
    to ensure the specified current consumption.


    'Horizontal addressing (bit V = 0) **DEFAULT AFTER RESET**
    'Vertical addressing (bit V = 1)


    'Normal instruction set (bit H = 0) **DEFAULT AFTER RESET**
    'Extended instruction set (bit H = 1)






    (H = 0) Normal instruction set. When H = 0 the commands‘display control’,‘set Y address and‘set X address can be performed

    Display control (bit D, bit E)
    • 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 - Display blank (bit D = 0, bit E = 0) **DEFAULT AFTER RESET** 8
    • 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 - Normal Display (bit D = 1, bit E = 0) 12
    • 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 - All display segments on (bit D = 0, bit E = 1) 9
    • 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 - Inverse video mode (bit D = 1, bit E = 1) 13


    'Address counter X6 to X0
    • X6 to X0 = 0 | 0 | 0 | 0 | 0 | 0 | 0 - (Line0) **DEFAULT AFTER RESET**
    • X6 to X0 = 1 | 0 | 1 | 0 | 0 | 1 | 1 - (Line83, last line)

    'Address counter Y2 to Y0
    • Y2 to Y0 = 0 | 0 | 0 - (Bank0) **DEFAULT AFTER RESET**
    • Y2 to Y0 = 1 | 0 | 1 - (Bank5, last bank)

    7 6 5 4 3 2 1 0
    |____|______|______|______|______|______|______|______-___________________________________
    | 0 | 0 | 0 | 0 | 0 | 1 | X | X - do not use
    | 0 | 0 | 0 | 0 | 1 | D | 0 | E - sets display configuration
    | 0 | 0 | 0 | 1 | X | X | X | X - do not use
    | 0 | 1 | 0 | 0 | 0 | Y2 | Y1 | Y0 - sets Y-address of RAM 0 <=≤ Y =>≤ 5
    | 1 | X6 | X5 | X4 | X3 | X2 | X1 | X0 - sets X-address part of RAM 0 <=≤ X =>≤ 83



    (H = 1) The extended instruction set can be executed.

    7 6 5 4 3 2 1 0
    |____|______|______|______|______|______|______|______-___________________________________
    | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 - do not use
    | 0 | 0 | 0 | 0 | 0 | 0 | 1 | X - do not use
    | 0 | 0 | 0 | 0 | 0 | 1 | TC1 | TC0 - set Temperature Coeffcient (TCx)
    | 0 | 0 | 0 | 0 | 1 | X | X | X - do not use
    | 0 | 0 | 0 | 1 | 0 | BS2 | BS1 | BS0 - set Bias System (BSx)
    | 0 | 1 | X | X | X | X | X | X - do not use
    | 1 | VOP6 | VOP5 | VOP4 | VOP3 | VOP2 | VOP1 | VOP0 - write VOP to register



    'Temperature control mode (TC1 TC0 =0) **DEFAULT AFTER RESET**
    • The temperature coefficient of VLCD is selected by bits TC1 and TC0.

    'Bias system (BS2 to BS0 =0)
    BS2 to BS0 = 0 | 0 | 0 - 1:100 **DEFAULT AFTER RESET**
    BS2 to BS0 = 0 | 0 | 1 - 1:80
    BS2 to BS0 = 0 | 1 | 0 - 1:65 / 1:65
    BS2 to BS0 = 0 | 1 | 1 - 1:48 **Optimum**
    BS2 to BS0 = 1 | 0 | 0 - 1:40 / 1:34
    BS2 to BS0 = 1 | 0 | 1 - 1:24
    BS2 to BS0 = 1 | 1 | 0 - 1:18 / 1:16
    BS2 to BS0 = 1 | 1 | 1 - 1:10 / 1:9 / 1:8


    'VOP is set to a +16
  • JonnyMacJonnyMac Posts: 9,105
    edited 2012-01-21 23:24
    I think I'm finally satisfied with the Spin version of my 5110 driver. I worked on improving features and making the code as effecient as possible for the best performance in Spin. Will translate this version to PASM (started but not yet working), and will add graphics methods (pixel, line, box) into PASM version (Spin is a bit slow for it). As ever, I appreciate feedback before I stick a fork in this and post in in ObEx.

    See next post for latest code.
  • JonnyMacJonnyMac Posts: 9,105
    edited 2012-01-22 19:21
    After "sleeping on it" I did in fact make some changes to my 5110 driver, including the order of parameters for the start() and startx() methods -- the parameter order makes logical sense now (versus electrical sense for the display I have). I did a little more optimizing and added numeric methods from FDS (dec, bin, hex, and rjdec by Dave Hein and me). I also got my PASM version working which, as one would expect, is much faster where it counts. The Spin version takes 156ms to paint an 84x48 bitmap to the display; the PASM version does the same thing in just over 2ms.

    Moved to ObEx
  • JonnyMacJonnyMac Posts: 9,105
    edited 2012-01-25 09:21
    My final driver code (Spin and PASM versions) are now in ObEx
    -- http://obex.parallax.com/objects/836/
  • funkheldfunkheld Posts: 32
    edited 2014-10-04 09:22
    Hello, good day.
    Can you please help me?


    Where can I find one that works (spin) or PBAs for the display: Nokia 5110?
    Since the connections should be described.


    Thank you.
    greeting
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-10-04 12:10
    IIRC I POSTED 5110 code on the P2 forum. I connected all pins to prop pins including power and ground. Since the backlight uses reasonable current (cannot recall exact mA) I suggest you turn off the backlight because it could possibly damage the prop pins. I have run this method on both the prop and the fpga.
    If you can't find it then I will do that later from my PC. (On iPhone now)
Sign In or Register to comment.