from the help : We must use CONFIG CANMOB so the MOB can be used again.
new send/receive is a new usage.
This means that before you send or receive data, you must use CONFIG CANMOB. It is an object that expires after it has been used so it can be re-used.
You could : use different objects if you need different lengths. Or you could use a variable to specify the length. but i wonder how smart that is? how does the other parties know about the changed length they must expect?
It is best if you read about CAN in the datasheet. You will better understand the bascom implementation after that, because in general i follow how the hardware works.
And this is how atmel made it, most likely because that is defined by the CAN specs :-)
↧