how to store a very large amount of data


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Posts
    29

    Default how to store a very large amount of data

    Hi guys!

    Im using serial communications in labview. That is connected with PIC16F877A with serial interface. The labview will send a bit stream of data that will be greater than the WORD sized variable of PIC. it may be arount 256 bits at a time. I want to know a method, by which i can store these 256 bits in my PIC and then transfer them to 24C128 memory. Is there any way of doing it? the largest variable that this PIC is WORD, it means that i can save a 16-bit data simultaneously. But what when i have to store such a big data in my PIC? is there any way of doing it?

    Regards,

    Shaiq Bashir
    LETS MOVE TOWARDS SOMETHING PRACTICAL---

  2. #2
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    I have not tried this but: If I was to need to store such a big variable I would do something like:

    info VAR bit[256]


    This would hold 256 bits of data which is the maximum array size for BIT variable.

    Once the variable is full, or the serial in is complete I would then look at sending the data in the same sort of format to the eeprom.

    As I said, I have not done this myself, but that is where I would start playing around.

    Lots of luck.
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

  3. #3
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default

    Since you are using a Serial Interface, I would guess that the data is being sent/received in Bytes. So you are really looking at an array of 32 bytes. Some great info can be found in this thread by Melanie.

    Here is the summary. Use an array of bytes like...

    MyDataArray var BYTE [32]

    Now, if you need to address a specific bit in that array, you can do this like so...

    MyDataArray.0(bitnumber)

    Remember, that arrays begin at the 0 index. So, using the previous example...

    If bitnumber=0 then it will reference MyDataArray(0) bit(0)
    If bitnumber=7 then it will reference MyDataArray(0) bit(7)
    If bitnumber=8 then it will reference MyDataArray(1) bit(0)
    If bitnumber=15 then it will reference MyDataArray(1) bit(7)
    ....
    If bitnumber=248 then it will reference MyDataArray(31) bit(0)
    If bitnumber=255 then it will reference MyDataArray(31) bit(7)

    Just one way of many to get this done.

    SteveB

  4. #4
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    If you move to the 18F series of chips, array size can be almost as large as memory. 2K bytes is no problem.
    Charles Linquist

  5. #5
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114


    Did you find this post helpful? Yes | No

    Default

    32 bytes should be easy to store in the 877's ram.

    What's the serial format? Is it sending 256 bit (32 bytes) as uninterrupted or unformatted bits?

    My current project has MMC > PIC > I2C EEPROM (F-RAM) moving 4,096 bits (512 bytes) in a shade under 21ms, or an effective baud rate of close to 200k. I don't store the values in the PIC except for a 'working byte', I just pass them through the PIC. Depending on the serial format you're using, you may not need to store the data in PIC RAM if using a FRAM I2C EEPROM. If your serial format allows for data bus holds, you can use standard I2C EEPROM's and not have to store more than 1 or 2 bytes in the PIC at any given time.

    It all depends on the serial format.
    Last edited by JD123; - 29th March 2008 at 14:44.
    No, I'm not Superman, but I did stay at a Holiday Inn Express last night!

  6. #6
    Join Date
    Apr 2006
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    Thank you for ur replies.

    I want to tell you that im using Labview serial transmission. It is asynchoronous serial transmission. SO it can send 256 bits serially one after the other. On the other end PIC is used along with Max232. im using PIC hserin command to handle this 256 bits of data. But as you know it requires some variable to work with. I want to know that is this possible to use such a big variable that can store 256 bits with hserin command?

    my basic task is to first store these 256 bits first and then transfer them to 24C128 eprom, is there any way to transfer directly to eprom without storing any data?
    LETS MOVE TOWARDS SOMETHING PRACTICAL---

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Nokia 3310 display text
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th August 2007, 03:39
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

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