Looping Variable Assignments


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Read in the manual or Help file about arrays. They will do what you want.

  2. #2
    Join Date
    Jul 2008
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    But is their any way of doing this without the pro version, and are you limited to the amount of variables in either version?

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I can't give an authoratative answer (for RAM usage) for the standard PICBasic Compiler (PBC) as I don't use it, but the Pro is constrained only by the limits of the PIC you are using. I have applications with hundreds of variables working just fine. For PBC consult the product specifications, or even send MeLabs an email directly.

    As tenaja suggested, use an array. I use just this method for taking multiple sequential ADC readings, and I'm sure you will find suitable examples posted on the forum. The ADC on a 40MHz PIC is fast enough to capture Audio (not exactly Hi-Fi but it does work) - but you have to send it to external Memory as the internal EEPROM is way too slow.

Similar Threads

  1. EEPROM Variables (EE_Vars.pbp)
    By Darrel Taylor in forum Code Examples
    Replies: 79
    Last Post: - 26th October 2012, 00:06
  2. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 06:03
  3. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  4. WORD vs BYTE variable lengths
    By bartman in forum General
    Replies: 0
    Last Post: - 28th November 2005, 21:16
  5. Storing a variable in EEPROM
    By Tissy in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 29th October 2005, 13:53

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