[PIC] Exporting data from EEPROM to PC as a .csv

Status
Not open for further replies.

Max Jahnke

Newbie level 4
Joined
Jan 13, 2014
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Pelotas/RS - Brazil
Visit site
Activity points
52
Hello.
First of all, I've been looking on the forum to see if I could find anything about this subject I'm about to mention, but I couldn't find anything. I'm also not sure this woud be the correct place for this thread, but it was the one I chose anyway, so feel free to change its place if needed.

My problem is the following: I have a PIC 16f877a and a 24LC512 EEPROM memory working as a datalogger (storing date and water flow amounts).
I have already made the functions to write and read on the eeprom, and I have also tested them by sending the values to a 16x2 lcd display. What I would like to do now is export this data that is currently stored on the eeprom to a pc in the .csv extension (or .txt, for that matter).
The thing is that I'm relatively new to microcontroller projects, so I don't know much which IC's to use. I've stumbled upon some projects using a MAX232 IC to create a serial communication, but I'm not sure what I would need to simulate that on Proteus and have an actual file being "sent" to my computer.
If you can give me any hints or suggest any other existing threads that would help with this, it would be much appreciated.
Thanks in advance.
 

Hi,

You can send your Pic data to the PC in a couple of ways.

To a Serial port on the PC via a MAX232 chip as you rightly say. This is needed to convert the micros voltage up to the PC s serial levels.

However probably the better way is to use on of the cheap Ebay USB to USART TTL adaptors ( not to be mistaken for the USB to RS232 level converters)
**broken link removed**

You can easily simulate things in Isis by using the Virtual Terminal.
If you have a Pickit you can use the USART tool to do a similar thing.

Hyperterminal is the typical default program to use on the PC, but look at some of the others like pUTTY which offer much greater scope.
 

Attachments

  • 000027.jpg
    123.2 KB · Views: 170

Hmm, I see. Thanks for your response.
I understand that by using the Virtual Terminal I can test if the communication is working properly, but the thing that's still a bit foggy in my head is how to make the actual csv file to be created. Do you happen to know any good (video or not) tutorial on how to configure any of the softwares you've recommended? (Yes, I'm completely lost on how to do it and the videos I've looked up weren't very clear)
Thanks in advance.
 

If long and float are stored in eeprom then you have to read 4 bytes and then you can send it using UART or USB HID communication. While sending data add a comma (,) after each data (byte, 2 bytes, or 4 bytes). AT PC side write a Serial communication software or USB HID app using VB.net or VC#.net to receive data and append it to a textbox or richtextbox. You may also need to send CR+LF. At PC side check if received data is CR+LF. If yes then add a CR+LF. Add a save button or a auto save feature to our app. Write code to save the file as .csv format. Now you can open the saved .csv file in excel.
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…