Go Down

Topic: .TXT file from PC to Arduino (Read 7534 times) previous topic - next topic

bhags21

How to read .txt file from PC with Arduino via Arduino's serial connection?

I have  10 text file in PC;
b1.txt, b2.txt....b10.txt
each of them 64bytes with different data(variable-periodically changing)
I want to transfer these data to Arduino via its usb-serial connection.

Can I use Serial.Write(buf,n) command or program like
HyperTerminal can do it easily?

Please advice
Thanks :)

Eight

#1
Aug 29, 2010, 03:15 pm Last Edit: Aug 29, 2010, 03:15 pm by Eight Reason: 1
You could try from the command line (can't remember if this exactly works or not)

C:\>type myfile.txt > com6

where com6 is the name of the com port connected to your Arduino. It doesn't die for me, but I don't have a sketch on there to read the data so it blocks and sits. Can't say whether it works.

bhags21

I need something like 'Serial Monitor' which can send files too not just characters and numbers that we have to type in it.

Awaiting response
:'(

PaulS

You could write your own program on the PC that shows a form with input fields and a list of files and a send button.Type something and press send. Or select a file and press send. Do whatever is appropriate in the callback for the send button.
The art of getting good answers lies in asking good questions.

zoomkat

Quote
I need something like 'Serial Monitor' which can send files too not just characters and numbers that we have to type in it.

Awaiting response


So how do you plan to do "file" handling on the arduino?
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

bhags21

Folks thanks for your attempts to ans my question!
Meanwhile I found out how to do file transfer(at least .txt file!!)
However it can transfer up to 115200 bits per second(Thats awsome for some ppl  :D ) but I need 6 times more than that  :'(  :'(
I'm trying have a look at FTDI's FT232R chip to see if I can bypass Arduino and receive the data directly from chip!

Will post back soon...

bhags21

FTDI chip which does all the USB to serial processing supports upto 3Megabaud rate. You can check this out here..
http://www.ftdichip.com/Products/ICs/FT232R.htm

Even Arduino supports the baud rate more than 115200 but in serial monitor they haven't put the option to select more than 115200 so I'm trying look in to it...
will post u soon..
:)

bhags21

Agreed but at the moment I'm at development stage only  :-[ and I'll
need financial funding before i go in production  :)

Osgeld

#8
Aug 29, 2010, 09:00 pm Last Edit: Aug 29, 2010, 09:01 pm by Osgeld Reason: 1
what financial funding

you can do this from the command prompt using the mode command to set your serial port speed and either type or echo commands to send it out

you could do this with putty, or hyperterm or anything the speed limitation on the arduino IDE is software only, if its not fast enough (i cant imagine why it wouldnt be you will fill the arduino's ram in less than a second) just dont use it
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

bhags21

:D guys I've transferred text files from PC to Arduino at 921600bits/sec it's awsome!!!
However I'm bypassing Arduino and outputting data to other MCU. Just got FTDI working without Arduino. He he. I'm trying with 2Mbps now
;)

doublet

Can you please post your solution, so other people looking for this don't have to ask the same question?

bhags21

I'm using following program to write .txt file from PC to arduino.  
Change COM port to one with yours also it works only for COM ports between 1 to 9 only!!!!
http://timewitharduino.blogspot.com/2009/05/getting-arduino-to-write-to-or-read.html

I hope this would be helpful!!
:)

Go Up