I am building an application to read and write to a microchip`s memory.
I need to pass an unsigned char array that has 4 fixed bytes and 2 variable bytes so suposing I want to read memory bank 0004 I will pass
unsigned char sRequest[32]={0};
sRequest[0] = 0x02; //FIXED
sRequest[1] = 0x1F; //FIXED
sRequest[2] = 0x0A; //FIXED
sRequest[3] = 0x20; //FIXED
sRequest[4] = 0x00; //VARIABLE
sRequest[5] = 0x04; //VARIABLE
I want to put 2 CEdit boxes for the user to input that variable memory bank, so it would write 0x00 on first CEdit and 0x04 on second one.
so my question is, how can I translate eacho of these inputs on an unsigned char so I can set it on my sRequest variable?
thanks in advance (thanks dave, mistyped bytes into bits, fixed now)