How to use Arrays Using Pic Basic Pro(need help)


Results 1 to 27 of 27

Threaded View

  1. #7
    MrSafe's Avatar
    MrSafe Guest


    Did you find this post helpful? Yes | No

    Default

    The backspacing and what not are very easy for me to figure out in fact I have several methods my main concern is arrays and to understand them I have been reading on what you said earlier about using byte size and honestly when I read that after you told me I almost punched myself in the gut because my brain immediately was like "oh yea...."


    The Keypad routine currently just gets the keys it does nothing else I myself display it on the lcd.

    ******
    gosub getkey
    LOOKUP key,["ABCDEFGHIJ"],Char

    how does this work I have seen this before but I could never wrap my hands around it and get the feel for it.

    *******
    Finished VAR BIT : Finished = 0 ;;I'm a little confused here are you commenting it or is it part of the declaration?( : Finished = 0 )


    StrLen VAR BYTE : StrLen = 0 ;; Same thing is it just being commented on?( : StrLen = 0 )

    while not Finished ;; is not part of PBP? in my book it does not even suggest anything of this nature


    gosub getkey ;;Understand this portion

    if Char != EOM then ' End of message key ;;is char the key that is received from the keypad?

    htxt(StrLen) = Char ;;I understand this portion just need to know what Char is

    LCDOUT Char

    StrLen = StrLen + 1 ;;Does this increment to next position?
    endif
    Finished = 1
    endif
    wend
    SEROUT2 PORTD.0, 813, [STR htxt\StrLen,13,10] ;; May I still use SEROUT or Must I use SEROUT2. ( [STR htxt\StrLen,13,10] I do not full Understand this portion could you explain to me what this is doing?) Also why do you have 2 endif statements?

    Forgive me for my ignorance I have been writing assembly for about 2 years now and I heard PBP was the next step and its been fun just a couple of walls I have to climb over frankly biggest wall is this array problem! I never had to deal with arrays before.

    Thank You Soo Much for taking the time and effort to help me I understand you have much better things to attend to and I appreciate all that your willing to do to help me!
    Last edited by MrSafe; - 30th June 2007 at 13:25. Reason: forgot something

Similar Threads

  1. Sending Commands from Visual Basic about IR to Pic
    By tne_de in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th April 2009, 06:09
  2. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  3. using AND as an IF statement
    By dw_pic in forum mel PIC BASIC
    Replies: 27
    Last Post: - 8th June 2006, 18:05
  4. vb6 to pic basic
    By Darrenmac in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 19th December 2005, 01:56
  5. The Ultimate PIC Basic
    By picnaut in forum PBP Wish List
    Replies: 4
    Last Post: - 9th November 2004, 22:10

Members who have read this thread : 2

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