This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Reading data using Atmel

hi
i have one txt file, containing the times and some symbols code, i want to read it using Atmel89S51, the txt file is in my PC, but i want to save it on RAM/Mu or any other storage media, how can i do it

the pattern of txt file is like this
day , Symbol code 1, time 1, symbol code 2, time 2 .............

0,12:00,0,12:00,0,12:00,0,12:00,0,12:00
0,12:00,0,12:00,0,12:00,0,12:00,0,12:00
: :
: 0,12:00,0,12:00,0,12:00,0,12:00,0,12:00

each line is, for one day, so it will be, 365 lines, or 366
the "," and ":" are not necessarily
it may be like this

0120001200012000120001200
------------
using storage media, which is suitable, and how can i do it
or any other Atmel Mc having a large number of RAM, where is create a text array
the requirement is to save data at one time, then read it, i mean no need to rewrite/update.

i m Using C

  • Note that RAM requires battery backup to survive a power failure.

    You are talking about a full years worth of data, so you obviously do need to store the data in a non-volatile way.

    Best is to either use EEPROM (external I2C or SPI-connected or better a processor with EEPROM internally) or select a processor that allows you to perform In Application Programming (IAP) so you can store the data in the code flash.

    Format doesn't matter - it's more a question how you transfer.

    You can have a PC send the data binary (already formatted as it should be stored in the processor memory) or you can send it as text, and have the processor decode into the internal storage format.

    Depending on numeric range of your data, you can probably store your data as 5*16-bit integers for each day - 5 bits (0..31) for initial digit, and 11 bits for minutes (0..1439). That would require 10 bytes/day so 3660 bytes in total.

    Obviously, you also need a battery-backed RTC if you want your device to count time for a full year.

    Obviously, you also need to consider what happens at the turnover to a new year, since one year may have 365 days and the next may have 366 - or the reverse.

  • Best is to either use EEPROM (external I2C or SPI-connected or better a processor with EEPROM internally) or select a processor that allows you to perform In Application Programming (IAP) so you can store the data in the code flash
    I do not know about 'best', I'd use a parallel flash (you can get 2 Mbyte for ~$3).

    Erik