Now that I am at work, I have read my PBP bible. I see we are limited to 96 bytes for an array in 16F devices, maybe less depending on the device. So I need some help here. How do we deal with this limitation?
The most elegant thing that comes to mind is if at compile time we can determine the array size for the device we want to use, store this as a constant in the BL, then the PC side can query this value and adjust the packets accordingly.
Short of that, I guess we either limit the max size to the biggest available in the smallest package, or have many BL's for the different PIC's. Now this is not an issue for the 18f's. Then how do we change the packet size in the GUI? - walter does this fall within the limited changes you can make?
I assume the array size will only somewhat alter our overall loading speed. I don't feel like this will be a big issue, after all, we have to transmit ALL of the data at some point. A smaller array will just have us checking the packet header more often. - Will we really care? Must we be able to D/L the program in under 1 sec instead of 2?
Also, I don't think it makes a lot of difference if DATA_PACKET is part of the DATA array.
Code:
; {STX}{STX}{DATA}{CHKSUM}{ETX}
; / \
; _______/ \________________________
; / \
; {COMMAND}{DLEN}{ADDRL}{ADDRH}{ADDRU}{DATA}...
Bookmarks