Beginner trying to use arrays


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    captain's Avatar
    captain Guest

    Question Beginner trying to use arrays

    Hello,
    I'm a beginner trying to use arrays stored in EEPROM. I have an interval timer program that needs several different sequences of stop points and jobs to do at each stop point. Only one sequence to be used at one time. Can someone help? Is there an example of software using an array? Please help. The PicBasic Pro manual talks about arrays but does not say how to use them.

    Thank You,
    Captain

  2. #2
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    Its difficult to point you in the right direction because I don't have a clear understanding of what you are trying to do.

    A few more specifics on what these routines are doing and what type/length of data you are trying to store could help. Also is this the internal EEPROM you are reffering to?

  3. #3
    captain's Avatar
    captain Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by DynamoBen
    Also is this the internal EEPROM you are reffering to?
    Yes I am using internal memory.

    The program definitions are as follows:
    I am programming a timing device in PicBasic. I would like some help with the software architecture. I would like to have 5-10 different timing structures which can be changed via a computer connected to the PIC. An Example of a time sequence is as follows:

    Long Pulse = 1 Second (Long), Short Pulse = 1/2 Second (Short)
    3 Minutes - 3 Long
    2 Minutes - 2 Long
    1 1/2 Minutes - 1 Long and 1 Short
    1 Minute - 1 Long
    30 Seconds - 3 Short
    20 Seconds - 2 Short
    10 Seconds - 1 Short
    5 Seconds - 1 Short

    4 Seconds - 1 Short

    3 Seconds - 1 Short

    2 Seconds - 1 Short

    1 Seconds - 1 Short

    End - 3 Second

    The number of intermediate stops is variable between sequences and what the program does at the end of the sequence is selectable, i.e. Stop; Restart immediately; Restart after a period of time; etc..

  4. #4
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    So what information are you trying to store/recall from EEProm?

  5. #5
    captain's Avatar
    captain Guest


    Did you find this post helpful? Yes | No

    Thumbs up

    I am trying to store/recall the delay times and event times. i.e. 3 - half second pulses, spaces one half second apart at the start of a three minute count, delay 57.5 seconds. 2 - half second pulses, spaces one half second apart at the two minutes. delay 28.5 seconds. 1 - half second pulse, delay 1/2 second, 1 - half second pulse, etc...

  6. #6
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    Okay so you're hoping to store these parameters in EEProm as a table to recall later.

    Then an array is not what you need. You need the following commands DATA, and READ. Take a look at each in the manual.

    Basically you're going to use DATA to create the table in EEPROM. Then READ to read info from eeprom into variables. Everything is one byte at a time for the most part.

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. Advanced Arrays
    By GoldStar in forum General
    Replies: 2
    Last Post: - 16th May 2009, 06:58
  3. HEX value o/p to PC and arrays
    By Christos_K in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 23rd August 2005, 01:10
  4. word arrays and eeprom
    By Acetronics2 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 9th January 2005, 07:36
  5. storing arrays and reading arrays
    By Yue in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 5th March 2004, 22:03

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