I am using LinkSprite JPEG Color Camera to take picture. I am getting hex values of the picture data as string in C Sharp from UART. User manual of the camera explains the data structure of the picture as starting with hex FFD8 ans ends with FFD9. The values I am getting fits this description. When I save this hex values to a file using ByteWriter but output file is invalid and I can not see the picture.How can I convert these values to JPEG file?
I am using HCS12 Microcontroller based DRAGON trainging board. I am getting camera data via UART. And I am using C to write my code on DRAGON board. Here is my code:
Camera information:
http://www.sparkfun.com/products/10061
User manual:
http://www.linksprite.com/upload/file/1333187137.pdf
My C# code:
Olcay Ertaş ,, you are right it is not raw data
My friends and I faced the same problem while working with our camera. Like you we extracted the HEX data using the UART, and like you we didn't see the picture. For us the problem was that using a notepad to save the Hex data will only save it as an ASCII string. (we used notepad to save the raw data)
Here is how we solve it:
I hope it works for you as it did with us.