Hi dear listers. I currently work on a project where the idea is transfer a small image file burned on a 9346 eeprom using serial comms, my problem is how the picmicro 'know' the image size? i. e. the image always is changing?
TNX
Hi dear listers. I currently work on a project where the idea is transfer a small image file burned on a 9346 eeprom using serial comms, my problem is how the picmicro 'know' the image size? i. e. the image always is changing?
TNX
The three ways to deal with a variable length file that I have used, are as follows....
1. Include a file header that includes the file length.
2. Have a timeout on the receiver, that after a certain length of no signal, it moves on.
3. Include an end of file sequence that would not be incorporated in the file under normal circumstances. This way the receiver constantly looks for this sequence, and stops receiving data when it finds it.
You can actually use all of these together as a kind of failsafe if data is lost.
Hope this helps,
Ron
Unfortunely the data is binary stream, so, I can't put++ bytes from the file, I will work on the choice # 1, I think that is good idea, thanks Ron
Bookmarks