05-15-2012 03:51 PM
First, thanks for this resource. I've used this forum quite a bit as a "lurker" and it's gotten me this far. Hoping to learn a bit, so I can contribute 🙂
Anyway, my issue is this:
I am ultimately trying to write an 8Mb binary file to an 8Mb Serial Flash device via the Total Phase Aardvark. The writes to the flash device I am using are limited to 256 bytes per write command. The vi program attached is capable of writing 256 bytes at a time, but not anything more. I realize I need to incorporate some sort of "For Loop" (and I understand that I'd want to do it =(File Size)/256 interations, but I can't seem to figure out how.
Does anyone have any quick advice to drive me in the right direction?
Thank you!
05-15-2012 04:20 PM
Well, you seem to have answered your own question, so it's not clear what your specific issue is. Is it how to extract 256 bytes at a time?
As for the code... umm... I'm not entirely sure what you're trying to accomplish with the whole top half of your code, but it seems to me that almost the whole thing can be replaced by a single call to the Read Binary File function. What is the format of these binary files?