I tried to use the microchip example "Run time linking" but I can't see the correct value of the potentiometer.
Code:
#define RD_POT 0x37
send_buf[0] = RD_POT;
send_buf[1] = 0x02;
SendReceivePacket(send_buf,2,receive_buf,&RecvLength,1000,1000);
printf("\n%x %x %x\r\n",receive_buf[0],receive_buf[2],receive_buf[1]);
If I try to read the Firmware Version it works great. Any Idea?
Another part of the example:
switch(dataPacket.CMD)
{
case READ_VERSION:
dataPacket._byte[2] = MINOR_VERSION;
dataPacket._byte[3] = MAJOR_VERSION;
dataPacket._byte[4] = MINOR_VERSION;
dataPacket._byte[5] = MAJOR_VERSION;
counter=0x06;
Why I can't send 6 byte or more...but only 4?
Thanks and sorry for my english
Bookmarks