Page 1 of 1

USB HID-Flowcode-Proteus_18F4550

Posted: Fri Feb 22, 2013 11:49 am
by sundgau
Hello, I have a problem with proteus simulation in a file generated by Flowcode.
This project only initializes a USB HID comunication and then do the flashing LED at a frequency of 0.5Hz.
The frequency of 24MHz under Flowcode was chosen to be consistent with the frequency of the CPU after the PLL (96MHz / 4)
Can you explain to me why the driver installation fails on proteus with this project in Flowcode realized then it works in reality? In addition, the LED flashes at a frequency of 0.416Hz!

Scanner.hex file, as for him, works fine in Flowcode. It has been written using mickroC; detection driver is good!

The problem is he of Flowcode, Proteus or me!

cordially

Bruno

Re: USB HID-Flowcode-Proteus_18F4550

Posted: Mon Feb 25, 2013 5:57 pm
by Benj
Hello Bruno,

USB requires a clock speed of 48MHz (96MHz PLL / 2) which divided by 4 equates to 12 million instruction cycles per second which is the same rate as full speed USB.

There is an article on getting started with USB available from here which details config settings etc.
http://www.matrixmultimedia.com/article.php?a=363