yviswanathbe
Full Member level 4
Hi,
I am interfacing USB Flash drive to my micro controller using VINCULUM device via UART.
The Vinculum device sends the response in string format, but in micro controller i am receiving in hex format. i am storing all these hex values in an array.
for example if i send IDD command (IDD is for knowing the Device Information), the device will sends the following response
USB VID = $0930<CR>
USB PID = $6545<CR>
Vendor Id = Kingston<CR>
Product Id = DataTraveler 108<CR>
Revision Level = PMAP<CR>
I/F = SCSI<CR>
FAT32<CR>
Bytes/Sector = $0200<CR>
Bytes/Cluster = $004000<CR>
Capacity = $E98FC000 Bytes<CR>
Free Space = $ Bytes<CR>
<CR>
D:\><CR>
all these information i am receiving as a hex stream. What i want to do is, convert this information into string,dump to a file and store the file in the USB Flash Drive.
can somebody help how can i convert the hexadecimal number to string format in C.
Thanks and Regards,
Viswanath.
I am interfacing USB Flash drive to my micro controller using VINCULUM device via UART.
The Vinculum device sends the response in string format, but in micro controller i am receiving in hex format. i am storing all these hex values in an array.
for example if i send IDD command (IDD is for knowing the Device Information), the device will sends the following response
USB VID = $0930<CR>
USB PID = $6545<CR>
Vendor Id = Kingston<CR>
Product Id = DataTraveler 108<CR>
Revision Level = PMAP<CR>
I/F = SCSI<CR>
FAT32<CR>
Bytes/Sector = $0200<CR>
Bytes/Cluster = $004000<CR>
Capacity = $E98FC000 Bytes<CR>
Free Space = $ Bytes<CR>
<CR>
D:\><CR>
all these information i am receiving as a hex stream. What i want to do is, convert this information into string,dump to a file and store the file in the USB Flash Drive.
can somebody help how can i convert the hexadecimal number to string format in C.
Thanks and Regards,
Viswanath.