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.

[SOLVED] Byte to character ...sd card interface

Status
Not open for further replies.

ashwanthh

Junior Member level 2
Joined
Oct 21, 2010
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,456
Hi all,

I am new to mikroC, I need some help for my project......

My project is to read a text file from a sd card and send it via uart through pic....

I have completed the project in mikroC, and the pic is able to read each byte from the file and send it via uart... by using the command Mmc_Fat_Read()... But the problem is , for example

the content of my file is,

120 2 234 35 666 7 865

using the above command it reads each byte including the space... but i want to read only the numbers... 120....2.....234....35....666....and send it ...

I know this is some simple problem in the program , but i couldnt find the solution ......

Please, some one help me.....
 

Sink0

Full Member level 6
Joined
Nov 25, 2009
Messages
390
Helped
37
Reputation
74
Reaction score
30
Trophy points
1,308
Location
Sao Paulo, Brazil
Activity points
4,186
I am not sure if you are going to be able to just read numbers.. but for sure you can just save numbers on your ram, and send by uart. Just make a simple char comparison with a space char or 0x20 (that is space on the ASCII table)
 

seadolphine2000

Advanced Member level 3
Joined
Apr 12, 2005
Messages
881
Helped
122
Reputation
244
Reaction score
86
Trophy points
1,308
Activity points
7,372
Sink0, is right. The controller treats the *.txt* as a binary file. This command will return all the characters written in the file, you can filter these characters afterwords.
 

ashwanthh

Junior Member level 2
Joined
Oct 21, 2010
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,456
Thankyou Sink0 & seadolphine2000.... solved the problem.....thanks a lot..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top