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

Status
Not open for further replies.

ashwanthh

Junior Member level 2
Joined
Oct 21, 2010
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,443
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.....
 

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)
 
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.
 
Thankyou Sink0 & seadolphine2000.... solved the problem.....thanks a lot..
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…