Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Reading a File using PIC32MX795F512L

Status
Not open for further replies.

Saraa

Member level 1
Joined
Feb 16, 2010
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,511
Hi Everyone..

Can anyone guide me to the way of reading files (such as: .txt, .xls, .dat, etc...) via PIC32 starter kit!
Thanks in advance :)..

~Sara
 

Reading files is largely dependent on the storage media and file system you've implemented.


Therefore you'll need to answer at least the following two questions:

On what type of media are the files stored?

And what type of file system have you implemented?

BigDog
 

BigDog,

I was thinking simply! I mean, if I have a file on my desktop I only want to open it and read its data, as simple as that! couldn't be implemented that way?

~Sara
 

The issue is the PIC32 does not have direct access to your desktop or PC's file system for that matter.

You could stream the information within a file on your PC to the PIC32 by some communication channel, RS-232, USB, etc.

You would need to write a PC app which would open the file, read its contents and stream this data over a communications channel.

Or you could implement an SD flash card interface along with a FAT16 file system within the PIC32. Implementing this approach would allow a copy of the file to be transferred to the SD flash card and be access both read/write by the PIC32.


BigDog
 

So it is somewhat complicated! I will start reading about the communication channel! Thanks alot..

~Sara
 

Implementing an RS-232 connection between the PIC32 and a PC is not particularly complicated.

You'll need to pickup a RS-232 transceiver IC, MAXIM manufactures several devices, and learn how to configure the PIC32's UART for asynchronous serial TX/RX.


Or you could utilize a USB to UART bridge device like the FTDI FT232R which would allow you to utilize the PC's USB port as a virtual serial port.

**broken link removed**


There are FTDI FT232R breakout boards available to simplify the process:

FTDI Basic Breakout - 3.3V

FT232RL USB to UART Breakout Board


The PIC32MX795F512L does offer both a USB OTG and Ethernet MAC hardware module/interface, although I suspect you may find implementing either more challenging than the UART module/interface.





BigDog
 

You are referring to the PIC32 Ethernet Starter Kit, I assume. It can e.g communicate as a USB device or USB host and an ethernet server or client with the software examples provided by Microchip. RS232 can connect through the expansion header.

In case of the USB Starter Kit, you have the same interfaces, except for Ethernet.
 
Last edited:

I prefer using PICs own HW USB-port. It can be configured to be seen as a COM port on PC. It can also be used to power up the system and it's a common connector. At least PIC18F-series had this option, I bet they haven't removed it in PIC32. This way you don't even need external components. Except for the connector.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top