usb slave and main routine

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Roy
Flowcode V4 User
Posts: 17
Joined: Thu Jul 30, 2009 9:13 am
Location: New Zealand
Been thanked: 1 time

usb slave and main routine

Post by Roy »

Chip 18f4550
I managed to get usb slave working with a program I wrote in vb.
The problem is that once I successfully introduce the slave into my project all other routine in the main menu work in the panel but not in the chip.
I have tried calling a macro from the main menu.
I am trying to pulse an led to show the status of the chip
It seems to me you cannot access endpoints from the usb as well as perform routines from within the chip
Regards
Roy

User avatar
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: usb slave and main routine

Post by Benj »

Hello Roy

Once you start the slave service running on your target device the device becomes a slave eg it will not do anything unless it receives a transaction from the USB. Whenever this happens the slave service routine gets processed and then the device goes back to waiting. If you need to add USB to a program you already have running then I advise using the serial component as this does not turn the device into a USB slave. Another option is to look at the USB slave example that does not use the slave service.

Post Reply