I am new to flowcode and pic programming in general, however I must say that with flowcode I managed to do what I want with one exception,
For my program to work I used a string usb slave port, all I do is in one line write a string to set outputs and in the same scan read in all inputs.
It is working very well. All I now need to do is put in a timer (watchdog ) that will if a variable or there is no activity on the usb to power down some or all of the outputs every 6 seconds. This is in case we loose usb comms the outputs will not stay in a high condition.
The problem I have is that no matter what I do with the usb slave either in another routine, main routine or the usb routine, it interrupts the comms to the pc.
Can anyone help plse.
watchdog and usb slave
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: watchdog and usb slave
Hello Roy
The watchdog timer acts to reset the device which will in turn reset the USB connection and therefore invalidate the handle the PC software has to the USB connection.
Instead you should user a timer interrupt. There are examples available on how to do this in the examples folder.
Hope this helps.
The watchdog timer acts to reset the device which will in turn reset the USB connection and therefore invalidate the handle the PC software has to the USB connection.
Instead you should user a timer interrupt. There are examples available on how to do this in the examples folder.
Hope this helps.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel