On Fri, 7 Nov 1997 17:37:57 GMT TORRENS SR writes: >I'm building a small project using the PIC 16c74. I need to use an >EEPROM to store up to 99 data files. Each file will be in the >following format > >$GPRMC,HHMMSS,A,DDMM.MMM,N,DDDMM.MMM,W,XXX.X,XXX.X,DDMMYY,XXX.X,E*XX,BBBBBBBB,2 2 > >I've never used EEPROM before, could someone give me an idea as to >how to work out the size of memory that i will need. You don't have to store anything that is the same in every file, eg '$GPRMC' and all the commas and decimal points. Most of the data is numeric, so you can easily pack it 2 characters per byte. The 8 bit number and the file number are each one byte. The file number could also be implied from the memory address of the file. Counting them up, I get about 26 bytes per file, so round up to 32. Having the number of bytes per file a power of 2 makes it easy to compute the memory address for each file. To store 99 such files would take 3168 bytes. The 24LC32, having a capacity of 4096 bytes, looks like a good choice. It could hold 128 files. For a few pennies more you can buy a 24LC65, which has twice the capacity. >Also, after collecting the data in the field, I intend to download it >to a PC. Does anyone know how this is done? The simplest way would be to connect the whole box containing the EEPROM and PIC to a RS-232 port on the PC. Put a routine in the PIC that reads the EEPROM, adds formatting as needed (for example, regenerate the '$GPRMC', commas, and decimal points), and output it in asynchronous serial form. In most cases no line driver hardware is really necessary, but its a good idea to use it. I would assume a RS-232 connection is made to the GPS receiver, the same port could be unplugged and plugged into the PC. Since the data comes out in ASCII text, the PC could just run a conventional terminal program's "Receive Text File" operation to copy the data to a file.