PDA

View Full Version : How often do you service USB?



Demon
- 16th July 2006, 17:06
Ok,

I've finally figured out how to have basic communication between a PIC 18F4550 and the PC using USB and PIC Basic Pro. As the thread says, how do you go about figuring when you are due to issue a USBSERVICE command?

Can I use the generated Assembler file and count how many commands were issued since the previous USBSERVICE?

I was thinking of sprinkling LABELS throughout the sections of code that I want to 'optimize'. That way it would help me identify what assembler commands relate with what basic commands.

Or are things not that easy?

Robert
:)

mister_e
- 16th July 2006, 17:18
place the USBSERVICE in a Timer interrupt routine. Interrupt at every XYZ<10-20Msec will handle everything for you. As now it work like a charm for me. Look the instant interrupts of Darrel... couldn't be much simple.

Demon
- 16th July 2006, 19:19
http://www.picbasic.co.uk/forum/showthread.php?t=3251

Merci mon pote!

The wife bellows, I'll check it out after dinner.

Robert
:)

mister_e
- 16th July 2006, 19:29
Pas de probleme pepere ;)