Replacing array member on the fly (big LCD characters idea)


Closed Thread
Results 1 to 38 of 38

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,079


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    Found interesting thing. On power up, custom character area in normal LCD are empty, but on WS0010 OLED displays, they are filled with random numbers on power up.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,837


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    On the custom character, unless explicitly stated, you should consider it full of rubbish.

    Ioannis

  3. #3
    Join Date
    Feb 2013
    Posts
    1,079


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    Yes, but on LCD it is usually empty. On OLED - it is filled with different garbage on each power up.
    Anyways, problem solved, also did some nice animation, will post code and video later.

  4. #4
    Join Date
    Feb 2013
    Posts
    1,079


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)


  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,837


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    Nice and clear fonts. Good work!

    Ioannis

  6. #6
    Join Date
    Feb 2013
    Posts
    1,079


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    Actually, it works on any 1602 LCD too, just animation is not so smooth. Will post code a bit later.

  7. #7
    Join Date
    Feb 2013
    Posts
    1,079


    Did you find this post helpful? Yes | No

    Default Re: Replacing array member on the fly (big LCD characters idea)

    Code:
    'font data, left side start, going down, then right side going down
    data %00000,%00000,%00000,%00000,%00000,%00000,%00000,%00000,%00000 '0 1
    data %00110,%01110,%11110,%11110,%00110,%00110,%00110,%00110 '1 9
    data %00110,%00110,%00110,%11111,%11111,%00000,%00000,%00000 '2 17
    data %01111,%11111,%11000,%00000,%00000,%00000,%01111,%11111 '3 25
    data %11000,%11000,%11000,%11111,%11111,%00000,%00000,%00000 '4 33
    data %11110,%11111,%00011,%00011,%00011,%00011,%11111,%11110 '5 41
    data %00000,%00000,%00000,%11111,%11111,%00000,%00000,%00000 '6 49
    data %01111,%11111,%11000,%00000,%00000,%00000,%00000,%00000 '7 58
    data %00000,%00000,%11000,%11111,%01111,%00000,%00000,%00000 '8 66
    data %00011,%00011,%00011,%11111,%11110,%00000,%00000,%00000 '9 74
    data %11000,%11000,%11000,%11000,%11000,%11000,%11111,%01111 '10 82
    data %00011,%00011,%00011,%00011,%00011,%00011,%11111,%11111 '11 90
    data %00011,%00011,%00011,%00011,%00011,%00000,%00000,%00000 '12 98
    data %11111,%11111,%11000,%11000,%11000,%11000,%11111,%11111 '13 106
    data %11111,%11111,%00000,%00000,%00000,%00000,%11110,%11111 '14 114
    data %01111,%11111,%11000,%11000,%11000,%11000,%11111,%11111 '15 122
    data %11000,%11000,%11000,%11111,%01111,%00000,%00000,%00000 '16 130
    data %11110,%11111,%00011,%00000,%00000,%00000,%11110,%11111 '17 138
    data %11111,%11111,%11000,%00000,%00000,%00000,%00000,%00000 '18 146
    data %11111,%11111,%00011,%00011,%00111,%01110,%11100,%11000 '19 154
    data %11000,%11000,%11000,%11000,%11000,%00000,%00000,%00000 '20 162
    data %01111,%11111,%11000,%11000,%11000,%11000,%11111,%01111 '21 170
    data %11110,%11111,%00011,%00011,%00011,%00011,%11111,%11111 '22 178
    data %01111,%11111,%11000,%11000,%11000,%11000,%11000,%11000 '23 186
    data %11110,%11111,%00011,%00011,%00011,%00011,%00011,%00011 '24 194
    
    x var word ' counter variable
    D VAR WORD 'VARIABLE TO BE DECODED
    y var byte 'eeprom reader var
    LFT VAR BYTE 
    LB VAR BYTE
    RT VAR BYTE 
    RB VAR BYTE 'LEFT TOP, LEFT BOTTOM, RIGHT TOP, RIGHT BOTTOM  variables
    T1 VAR BYTE 
    T2 VAR BYTE
    T3 VAR BYTE
    T4 VAR BYTE 'TEMP VARIABLES FOR DATA READ
    
    
    CLEANER: 'CLEAR ALL CHARS
    FOR X=0 TO 7
    LCDOUT $FE,64+X,0
    LCDOUT $FE,72+X,0
    LCDOUT $FE,80+X,0
    LCDOUT $FE,88+X,0
    NEXT
    
    
    
    
    MAINER:
    lcdout $fe,$80,0,2,0,2,".",0,2,0,2,".",0,2,0,2
    lcdout $fe,$c0,1,3,1,3," ",1,3,1,3," ",1,3,1,3
    'd=0
    for d=0 to 9
    GOSUB DECODER
    GOSUB EREADER
    
    
    PAUSE 1000
    
    
    FOR X=0 TO 7 'Clean screen between chars
    LCDOUT $FE,64+X,0
    LCDOUT $FE,72+X,0
    LCDOUT $FE,80+X,0
    LCDOUT $FE,88+X,0
    NEXT
    next
    GOTO MAINER
    
    
    
    
    DECODER 'DECODE THE VARIABLE
    IF D=0 THEN LFT=185:LB=129:RT=193:RB=73 '0
    IF D=1 THEN LFT=1:LB=1:RT=9:RB=17 '1
    IF D=2 THEN LFT=25:LB=33:RT=41:RB=49 '2
    IF D=3 THEN LFT=57:LB=65:RT=41:RB=73 '3
    IF D=4 THEN LFT=81:LB=1:RT=89:RB=97 '4
    IF D=5 THEN LFT=105:LB=65:RT=113:RB=73 '5
    IF D=6 THEN LFT=121:LB=129:RT=137:RB=73 '6
    IF D=7 THEN LFT=145:LB=1:RT=153:RB=161 '7
    IF D=8 THEN LFT=169:LB=129:RT=41:RB=73 '8
    IF D=9 THEN LFT=169:LB=65:RT=177:RB=73 '9
    RETURN
    
    
    
    
    
    
    EREADER: 'read eeprom data into screen user area with reversal of direction for lower line, for cooler look
    for x=0 to 7
    READ LFT+7-X,T1
    READ LB+X,T2
    READ RT+X,T3
    READ RB+7-X,T4
    LCDOUT $FE,64+7-X,T1
    LCDOUT $FE,72+X,T2
    LCDOUT $FE,80+X,T3
    LCDOUT $FE,88+7-X,T4
    pause 25
    NEXT 
    RETURN
    Pin configs, defines and other, personalized settings not included in the above code.

Similar Threads

  1. String of characters(array) to decimal value
    By tacbanon in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 20th June 2012, 14:30
  2. write big text to lcd
    By isaac in forum General
    Replies: 3
    Last Post: - 8th October 2008, 01:45
  3. Big big big memory or tiny SDs!
    By Ron Marcus in forum Off Topic
    Replies: 9
    Last Post: - 25th May 2007, 18:02
  4. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  5. Replacing an ARRAY with EEPROM write to save space?
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th March 2005, 18:31

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts