Making a menu


Closed Thread
Results 1 to 37 of 37

Thread: Making a menu

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    replacing HSEROUT with LCDOUT should work?

    Which PIC you work with? The above is for 16F
    Steve

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

  2. #2
    Join Date
    Oct 2008
    Posts
    51


    Did you find this post helpful? Yes | No

    Default

    Im using the P16F876A

    i tried


    StartLoop ' This loop repeats continuously just as a test.
    @ GetAddress _String1, _Addr ' Get address of String
    gosub StringOut ' Send the String
    LCDOUT $FE, 1, [13,10] ' New Line

    @ GetAddress _AnotherString, _Addr ' Get address of String
    gosub StringOut ' Send the String
    LCDOUT $FE, 1, [13,10] ' New Line
    pause 500
    goto StartLoop ' Repeat


    but this just gave me a bad expression

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


    Did you find this post helpful? Yes | No

    Default

    you don't need those square brackets []
    try something like...
    Code:
    Start
        @ GetAddress _AnotherString, _Addr ' Get address of String
        LCDOUT $FE,1  ' Here you place your LCD cusor where you want
        gosub StringOut ' Send the String
        pause 500
        goto Start ' Repeat
    
    
    StringOut: ' Send the string out via Hserout
        Readcode Addr, TwoChars ' Get the 14 bit packed characters
        Char = TwoChars >> 7 ' Separate first char
        if Char = 0 then StringDone ' Look for Null char, Stop if found
        LCDOUT Char ' Send first char
        Char = TwoChars & $7F ' Separate second char
        if Char = 0 then StringDone ' Look for Null char, Stop if found
        LCDOUT Char ' Send the second char
        Addr = Addr + 1 ' Point to next two characters
        goto StringOut ' Continue with rest of the string
    StringDone:
        return
    Steve

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

  4. #4
    Join Date
    Oct 2008
    Posts
    51


    Did you find this post helpful? Yes | No

    Default

    ok thanks again!
    I shall try that when i get in again tonight!

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi Chris, sorry for the delay, good old ATT DSL service is intermittant and they won't fix it. First of all, Mister_e is right, as usual, storing strings in eeprom is a good way to do it, I was only trying to explain why you're way would not work for you. You could in theory, create a byte array to hold all the letters of the alphabet and then display them as groups of individual letter variables, you could. Or you could make individual variables representing words like stop go start etc. Many roads to Valhalla.
    Last edited by Archangel; - 10th November 2008 at 21:26. Reason: misstype
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  6. #6
    Join Date
    Oct 2008
    Posts
    51


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    Hi Chris, sorry for the delay, good old ATT DSL service is intermittant and they won't fix it. First of all, Mister_e is right, as usual, storing strings in eeprom is a good way to do it, I was only trying to explain why you're way would not work for you. You could in theory, create a byte array to hold all the letters of the alphabet and then display them as groups of individual letter variables, you could. Or you could make individual variables representing words like stop go start etc. Many roads to Valhalla.
    Well thanks alot for the reply! I know there is always many a way to do one job when it comes to coding and im hoping by the help on the forums i can get a much broader variation on the methods i use!
    So yes any ideas are very welcome
    Especially if they come with little snips of code which helps me to understand

    mister_e i tried that code and yep all good thank you very much!
    Tommorrow night i shall play around with it some more and try to get different things when different buttons are pushed etc!

  7. #7
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by chrisshortys View Post
    Well thanks alot for the reply! I know there is always many a way to do one job when it comes to coding and im hoping by the help on the forums i can get a much broader variation on the methods i use!
    So yes any ideas are very welcome
    Especially if they come with little snips of code which helps me to understand

    mister_e i tried that code and yep all good thank you very much!
    Tommorrow night i shall play around with it some more and try to get different things when different buttons are pushed etc!
    OK Chris look this over:http://www.picbasic.co.uk/forum/showthread.php?t=8876
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. interactive menu with hyperterminal
    By jamied in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 5th January 2009, 11:13
  2. Sending menu to PC from PIC16F876A
    By joseph Degorio in forum Serial
    Replies: 2
    Last Post: - 12th November 2007, 07:03
  3. Interrupt/timer not really interrupting...
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd May 2005, 22:05
  4. Interrupt Menu System Example and Help Needed
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 1st April 2005, 17:05
  5. Lcd Menu
    By eliecer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 13th February 2005, 19:29

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