USB Hid using a PIC18F4455

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
abaxter
Posts: 1
Joined: Tue Sep 01, 2009 9:23 am

USB Hid using a PIC18F4455

Post 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.

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 Hid using a PIC18F4455

Post 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.

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 Hid using a PIC18F4455

Post 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.

VHDL
Flowcode V4 User
Posts: 12
Joined: Tue Dec 22, 2009 4:47 am

Re: USB Hid using a PIC18F4455

Post 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..

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 Hid using a PIC18F4455

Post 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.

VHDL
Flowcode V4 User
Posts: 12
Joined: Tue Dec 22, 2009 4:47 am

Re: USB Hid using a PIC18F4455

Post by VHDL »

Please let me know when you ready for USB
I just received ECIO40 and Flowcode last week...
thank you...

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 Hid using a PIC18F4455

Post 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.

VHDL
Flowcode V4 User
Posts: 12
Joined: Tue Dec 22, 2009 4:47 am

Re: USB Hid using a PIC18F4455

Post 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..

Post Reply