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


Results 1 to 27 of 27

Threaded View

  1. #1
    MrSafe's Avatar
    MrSafe Guest

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

    Hi, everybody New to the forum just wanted to give a shout out to everyone before I proceed.



    Problem: I Can not figure out how to use arrays with Pic Basic Pro

    Need: my design revolves around witlessly transferring data over the air on to a receiving unit which will then display the incoming message. Currently my program simply displays the message as it is being typed in. However I would like to store the message in an array of lets say of 48 elements in a single dimension just a single row. I would then like to send the data that is being pressed on the keypad and have it stored in an element of the array after which it will then increment to the next position or next element for the next input.

    What I have Tried: I tried declaring the array by doing the fallowing

    htxt var word[48]

    and when I try to use it after declaring it

    htxt[0] = htxt[x]
    temp[x] = htxt[x]

    and when a keypad key is pressed

    temp[x] = #key
    serout.1200.PORTD.0, [temp[x]]
    pause 100
    temp[x] = htxt[x] + 1

    when i use the fallowing method my receiving unit simply displays a blank message when ever the data is transmitted. The way I send data is after the message has been inputed and stored I then send each element by itself to the receiving unit so that I can loop the message since theres more than one receiving unit and this way if one unit is turned on after the first unit it will receive the data one the next cycle of the loop.


    *****UPDATE******

    I have uploaded my code but please understand that it does not contain the portion above simply because I could not get it to work so I used my old method to get the software working. I uploaded it so people will understand that I am using PIC Basic Pro
    Attached Files Attached Files
    Last edited by MrSafe; - 30th June 2007 at 02:35.

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