PDA

View Full Version : Easy "Unloading" of EEPROM ?



Glenn
- 4th January 2009, 16:41
Yes, and another thing connected to the same project I asked about in the math-thread..

I'm planning to log values into the EEPROM and then I want to be able to export these values to a textfile in my computer for later analyzis (probably a graph or something), but does anyone have an idea of how to do this ?

I guess I could connect the whole PCB to my pickit2 and read the values there, but its not very handy, Does someone have a nice solution for this ?

Maybe an external "card" with an EEPROM on it ? or a serial routine in the PIC (if I have space left) that dumps all the data over serial when I push a button ?

rswain
- 5th January 2009, 20:57
Here's a subroutine of how I do it. You might want to modify the start and stop addresses to do exactly what you need it to do.

Rswain
******************************

A var byte
B var byte
x var byte
EE_Memory_Address var word
EE var byte

NI9600 CON 84
PC_OUT var PORTB.1 ' Serial output via MAX232 to user terminal


R_EE: ' Read from EEPROM and store as var (EE)
' needs to be given:A=start count (byte),B=end count (byte),EE_Memory_Address (word)
' str EE (bytes), and end w/13 (cr)
for x = A to B ' 0 to 150 (or whatever you want or until CR is encountered)
read EE_Memory_Address+x, EE
SEROUT2 PC_OUT,NI9600, ["ee mem addr = ",dec EE_Memory_Address," read = ",#ee,13,10]
if EE = 13 then r_EE_jumpout
EE_Memory_Address = EE_Memory_Address + 1
next x
r_ee_jumpout:
Return
end
*********************************

Glenn
- 6th January 2009, 00:17
Yes, right now the serial version seem to be the easiest, then I can connect a laptop to the PCB and unload it that way.

I also got other very interesting suggestions on another electronics forum, for example there are modules that takes a USB memorystick in one end, and talks SPI in the other, also there is chips called DOS-on-Chip that is an interface between FAT on a SD card and SPI.

mackrackit
- 6th January 2009, 03:20
for example there are modules that takes a USB memorystick in one end, and talks SPI in the other
The VDIP1 does this with simple serial commands. I am using one one a prototype and so far it seems to be working well.
Brian give a good starting example here.
http://www.picbasic.co.uk/forum/showthread.php?t=7700