Loading text file in PIC32 microcontroller

Thread Starter

DancinNancy

Joined Oct 1, 2008
24
I am working on a project for school and i am trying to make a program that reads a text file and depending on the numbers in the file, lights up the appropriate LED. For example if the text file had 3 4 1 then the third led would light then the second then the first. I am using a PIC32 microcontroller and writing the code in C. The microcontroller plugs in to the computer through usb and I'm am hoping this is a fairly simple task. Any help is appreciated. Thanks
 

n9352527

Joined Oct 14, 2005
1,198
You need to interface the PIC to the PC first. I don't think the PIC32 supports USB interface, so you could go with something simpler, like RS232-USB chip, FTDI232 or CP210x from Silabs.

Then you need to write the PC application to read the file and send the data to the PIC and write the firmware to act on the data and lights the LEDs.
 

Thread Starter

DancinNancy

Joined Oct 1, 2008
24
What about loading the file through the program i'm writing with. I already have the microcontroller and the program used to write to it in c is MPLAB. What I want to do is in the code say load "example.txt" and then have a if loop depending on whats in the file. I know this is possible in c++ but I have know clue how to do it on this program. Anyone that knows please let me know this would help tremendously.
 

Thread Starter

DancinNancy

Joined Oct 1, 2008
24
I want to just save it to the microcontroller. There would only be one txt file for the project I am doing but i want to do it this way as an example of how the project would read and respond to a txt file. It is for a senior project so it doesn't have to be perfect its more of a concept thing
 

LesterPhil

Joined Feb 25, 2009
10
you can do it using PIC16. If you'are implying that you were just give a dummy input to your system, just to test if it is posible, so there's no need to have a PC to feed an input? then it so simple...

If it needs a PC, so maybe u need a GUI where you can feed your inputfile..
 
Top