Back to the PIC18F13K50...
Posted: Mon Nov 14, 2011 1:43 pm
For some reason the Flowcode simulation does not match the actual hardware with respect to the USB HID files.
After doing a data send to the PC (as a Keyboard) using the SendDataDirect call, it constantly sends data despite being stopped in a loop.
The only way I can prevent it sending data is to repeatedly send 0x00 - which it then sends constantly,
I realise the program "sends" until it is stopped but this is bonkers and I can only conclude that on compiling to the hex file something is going wrong.
I have masked one of the buttons to change colour of a LED but it will only do so at the beginning of the MAIN program loop and not where the program cycles to wait for the keypress (that sent the data) to be zero - meaning it has been released. In simulation it does not change colour which is correct because it does not leave the loop to go back to the MAIN loop but in hardware it (falsely) exits the loop and changes colour and all the associated problems with it.
Something is wrong hardware wise here and I wonder if anyone has any ideas please....
After doing a data send to the PC (as a Keyboard) using the SendDataDirect call, it constantly sends data despite being stopped in a loop.
The only way I can prevent it sending data is to repeatedly send 0x00 - which it then sends constantly,
I realise the program "sends" until it is stopped but this is bonkers and I can only conclude that on compiling to the hex file something is going wrong.
I have masked one of the buttons to change colour of a LED but it will only do so at the beginning of the MAIN program loop and not where the program cycles to wait for the keypress (that sent the data) to be zero - meaning it has been released. In simulation it does not change colour which is correct because it does not leave the loop to go back to the MAIN loop but in hardware it (falsely) exits the loop and changes colour and all the associated problems with it.
Something is wrong hardware wise here and I wonder if anyone has any ideas please....