Code Problem - Strings/ LCD/ internal EEPROM


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Nov 2004
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    yep, as you say “part by part” it is easy , but when you need to have to scroll with 2 buttons ever the alphabet and send one by one the user selected character to eeprom , this isn’t as easy as it seems … this is where things get “dirty”.
    As for the rest, for example:

    Write:
    DATA $00,"Switch01",0
    Reading:
    For CounterA = 0 to 16
    Read CounterA,value
    If CounterA=0 then goto Main
    LCDOUT value
    Next CounterA

    Works ok , but as a whole …i´ve not been able and not seen anything working …
    The code for strings by Darrel is absolutely brilliant but it misses one point … all the strings are predefined ….not a single one can be user “ personalized”/edit/create (when pics´s in runtime) …this is where I am searching an answer.

    Anyway thanks a lot Mister_E :-)
    Last edited by jorge; - 1st October 2006 at 23:47.

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jorge
    y....

    Write:
    DATA $00,"Switch01",0
    Reading:
    For CounterA = 0 to 16
    Read CounterA,value
    If CounterA=0 then goto Main
    LCDOUT value
    Next CounterA

    Works ok , but as a whole …i´ve not been able and not seen anything working …
    How could that work? it would exit the loop the first time it starts running.
    CounterA=0 and then it exits FOR loop when CounterA=1.

    Any missing condition there? or was it supposed to be like If Value=0 then goto Main ?
    Last edited by sayzer; - 2nd October 2006 at 04:37.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Nov 2004
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    you are right but this was only a "coderip" out off context.
    the main problem was the one in the main post.
    rgds,
    Jorge

  4. #4
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Talking

    What is the problem ?

    String in an array ?

    Username var Byte(size_of_username)

    Writing to LCD ?

    LCDOUT STR Username\size_of_username

    Writing to EEPROM ?

    For I=0 to size_of_username:Write EEProm_Adress+I,Username[I]:Next I

    ???
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  5. #5
    Join Date
    Nov 2004
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    First of all thanks for your valuable hints.
    :-)
    I will sure try your approach
    Although, i was thinking about Darrel’s approach to strings and a way of manipulate , edit/create them...
    See the Darrels great post:
    http://www.pbpgroup.com/modules/wfse...p?articleid=10
    but it lacks user defined messages to be stored in EEPROM...like cruising the alphabet and selecting/creating letter by letter the new text....or something like that.

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Thanks jorge,

    But, as you've already noticed. They are two different things entirely.

    I think you should stick with BigWumpus' idea for getting things in and out of the EEPROM, but the editing of the text is going to be a bit harder.

    And, like Melanie said in the post that mister_e pointed out. It's going to be easier with 3 buttons.

    Sorry, not much help.
    <br>
    DT

  7. #7
    Join Date
    Nov 2004
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    Thanks a lot for every post !
    One more question:
    can i increment letters as I do with numbers ( using ASCII & char vars...?)
    for example if had to select number i could cycle between then like
    if keypress = 1 then
    number = number +1 ,
    ….
    but with letters " letter = letter +1 " would it give me "D" char if it was in the "C" before pressing the button ? using the reference ASCII number?
    Or is there another and more efficient way ?!?

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 15:46
  2. Problem runing my code
    By Mus.me in forum mel PIC BASIC Pro
    Replies: 33
    Last Post: - 1st December 2009, 21:36
  3. problem with my code
    By civicgundam in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 3rd February 2008, 02:52
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 03:30
  5. word variable to 25lc640
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2004, 20:59

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