Multi Language Support on LCD ?


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2005
    Posts
    26

    Default Multi Language Support on LCD ?

    Hi All,

    I am on a new project. I am using a 2x16 LCD. I have to make multi language support. I have a lot of way that goes to the solving. But I am searching more powerful and stable an algorithm. I can use ALGORITHM1, there is no problem. But I am using all codes again again that how much I am using language selection. So If I am using 3 lang. supports that means the size of code 3x(1 lang. code size). So Its not efficient. For example

    ;---------- ALGORITHM 1---------------
    ;for English
    if lang=0 then
    lcdout 254, 0, "English Menu"
    ....
    ....
    .... (All program codes)
    endif

    ;For German
    if lang=1 then
    lcdout 254, 0, "German Menu"
    ....
    ....
    .... (All program codes again)
    endif



    ;For Italian
    if lang=3 then
    lcdout 254, 0, "Italian Menu"
    ....
    ....
    .... (All program codes again)
    endif
    ;-------------------------


    But I want to develop ALGORITHM 2. But I have some problem. I want to use variables for the LCD's menus. So the user when the select the language I will change the variables's value to the suitable language value and I will stamp to the lcd's menu. But I didn't find how I can I do that. I mean:

    ;---------- ALGORITHM 2---------------
    ; LCD menu's items.
    ; we are adjusting LCD menu's language
    if lang=0 then
    Var1 = "Eng. Menu 1"
    Var2 = "Eng. Menu 2"
    endif
    if lang=1 then
    Var1 = "Ger. Menu 1"
    Var2 = "Ger. Menu 2"
    endif
    if lang=3 then
    Var1 = "Ita. Menu 1"
    Var2 = "Ita. Menu 2"
    endif

    lcdout 254, 0, Var1
    lcdout 254, 40, Var2
    ....
    ....
    .... (All program codes, only one)
    ;-------------------------

    I hope I could describe my problems. what should I do? I need your valued ideas. Thank you so much.

    best regards

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink SEARCH Function

    Hi, Muskut

    A SEARCH with the "STRING" Keyword should show you that subject is not so new ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Routines will be the same , just the language will be different. So you could just store your strings in an external EEPROM and read from there. Choice is yours, 1 EEPROM/Language... Let's say you're using I2CEEPROM,
    I2CREAD SCL,SDA,Language, addr...

    or a Huge EEPROM + StartAddress offset.
    I2CREAD SCL,SDA,ControlByte, addr+Language...

    think about it... sure you can start from that.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Jul 2005
    Posts
    26


    Did you find this post helpful? Yes | No

    Default

    An external eeprom can be solving. But I am using 16F876A and I am using 4 bit LCD. And I want to solve this problem with only this devices. I have to develop a good algorithm.

    Thanks a lot for the answers.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by muskut View Post
    An external eeprom can be solving. But I am using 16F876A and I am using 4 bit LCD. And I want to solve this problem with only this devices. I have to develop a good algorithm.

    Thanks a lot for the answers.
    Silly idea...could program one '876A for each language, stack the chips, bend out the MCLR pin and put a toggle switch or a DIP switch going to each MCLR. The language you select is the MCLR that's allowed to rise after power on...

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    So... store your text strings in the code space and use something around the above suggestion.
    http://www.pbpgroup.com/modules/wfse...p?articleid=10
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 11:43
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

Members who have read this thread : 1

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