AK-SDFS-UART - SD write on .txt file

I have a little problem…

I finally finished learning how to make dir, files and write on files using ur product AK-SDFS-UART - SD.

However when I write somethings on .txt format file characters represented weirdly as below

It’s OK when i read back from uart, but I cannot deal with data on other development tools (ex. matlab)

i guess ascii code makes this problem…

Is there any solution to save data in hex or dec format?

Hello @minsungkang

The AK-SDFS-UART board will write the value you send just as you send it. For example, if you send a binary 0x01 it will save as it. If you want to save the ASCII character “1” you have to send 0x31.

In short, if you want to save data as text, you have to send printable ASCII values. You can find many ASCII tables online, like: http://www.asciitable.com/

Thank you for help.

Actually, I meant if there any standard code i can automatically convert unsigned integer(0~65535) to ascii

ex). (uint16) 0000 0011 => f(x) => 0x30 0x30 0x30 0x31 0x37 // 00017

Hi @minsungkang,

For which language? If it’s Matlab, we are sorry but we don’t use it so we can’t provide help for that.

Thank you for help.

I finally solve problem by dividing digits and converting to ascii