Page 1 of 1

USB Hid using a PIC18F4455

Posted: Tue Sep 08, 2009 10:01 am
by abaxter
Hi there,

I’ve recently built a USB Hid device using the USB pack in Flowcode v3.6 and it works great when compiled to an ECIO40 chip.

I’m now looking to build the same circuit from scratch but use an 18f4455 chip (ie the same microchip as found on a ECIO40 but DIP version, not smd) instead of the actual ECIO40. I’m following the same schematic as the ECIO 40 chip and am using a 4mhz crystal. I have also configured the 18f4455 using the configuration settings I found whilst reading the supremely helpful matrix multimedia forum posts. The settings are as follows…

USB Clock Selection - clk src from 96MHz PLL/2
CPU Sys CLK Select - no divide
OCS Select - Match the value of your crystal (so set to 4mhz)
Oscillator - HS: HS+PLL, USB-HS
USB Voltage Regulator - Enabled
Watchdog timer – Disabled

Sadly I still get an error message that the USB has malfunctioned etc and is an unknown device when I plug my circuit (with chip) into a usb port.

Any help as to where I am going wrong or a point to one of the forum posts would be super. I should say I am programming the 18f4455 using the EB006 Multi-programmer, I’ve swapped out the 19.6608MHz crystal, replaced it with the 4MHz crystal I mention above, and moved the silder to the XTAL position and the chip does compile successfully.

Many thanks in advance.

Alex Baxter.

Re: USB Hid using a PIC18F4455

Posted: Mon Sep 14, 2009 8:35 am
by Benj
Hello Alex

You may want to check that the clock speed is set to 48000000 in the Chip -> Clock Speed window. If this doesnt fix your problem then you can attach your program to the forums or PM me with it and I will try and find out why it is not working correctly for you.

Re: USB Hid using a PIC18F4455

Posted: Fri Sep 25, 2009 12:04 pm
by Benj
Hello Alex

Sorry I have not forgotten about you. I have forwarded the flowcode file you sent me to my personal email and I will give your program a go over the weekend to see if I can find any problems with it.

Re: USB Hid using a PIC18F4455

Posted: Tue Dec 22, 2009 1:15 pm
by VHDL
hi...can I make USB MIDI with flowcode ?
I really, REALLY want to buy a flowcode if USB MIDI configurations is available in flowcode to make usb midi interface ...
Please help..

Re: USB Hid using a PIC18F4455

Posted: Tue Dec 22, 2009 1:44 pm
by Benj
Hello

I have had a quick look into this and it should be quite easy to use a custom component to create a MIDI USB device using the USB library included in Flowcode 4. If you decide to purchase then I will help you to get this up and running as I now have a copy of the USB descriptors for a MIDI device and it would make a good article. You will also need to use a USB enabled microcontroller such as a 18F4455 or an ECIO etc.

Alternativly USB to MIDI converters are widely available on the market so it depends if you want to make your own or buy one.

Let me know what you decide.

Re: USB Hid using a PIC18F4455

Posted: Mon Dec 28, 2009 8:28 pm
by VHDL
Please let me know when you ready for USB
I just received ECIO40 and Flowcode last week...
thank you...

Re: USB Hid using a PIC18F4455

Posted: Thu Dec 31, 2009 3:14 pm
by Benj
Hello VHDL

Are you using version 4 of Flowcode. I am just putting the files together into a Flowcode compatible format to try and get the MIDI interface working. Just making sure you are using the right version. If you are using V4 then please can you use the online resources link in the Flowcode help menu to register for the v4 forum topic. Then please create an official posing there on how to create the MIDI interface and I will post up the code required.

Re: USB Hid using a PIC18F4455

Posted: Sun Jan 03, 2010 8:32 am
by VHDL
I did register in flowcode help menu(online resources) but I had to make new user name, now i'm waiting for to get activate to create an official posing
for how to create the MIDI interface...
so ill be back soon.. thx..