Page 1 of 1
Emulating a Windows PC USB Keyboard
Posted: Sun Jul 04, 2010 9:24 am
by iain wilkie
Having seen that Flowcode4 for AVR (which is what I have) has no USB support, I do realise that I will probably need to purchase
a copy of Flowcode for PIC in order to do this.
What I need to do is create a piece of hardware that has 5 buttons that connect to a Windows PC USB port
and will act as if it is a PC Keyboard. The actual keys are un-important at the moment but it could be
the 4 arrow keys and the return key for instance. In other words its a USB HID device.
What is the simplest PIC I could use for this and presumably there are Flowcode modules to make this
an easy task ?. Also am I correct in that I cannot use the AVR flowcode for this ?
Iain
Re: Emulating a Windows PC USB Keyboard
Posted: Mon Jul 05, 2010 8:59 am
by Benj
Hello Iain.
Flowcode AVR does not support the USB components as the AVR devices do not have the inbuilt USB hardware. However you can bit bang USB using an AVR but it is slow. There are lots of C code examples of how to do this but it may still be hard to integrate into Flowcode without a good understanding of C code.
Flowcode PIC uses USB hardware so it takes a lot of the work away from the processor allowing for full speed USB comms. A 2455 is a good little USB device or you could go for an ECIO which is basically a 18F2455 with tthe USB socket and crystal etc prefitted and a bootloader to allow easy reprogramming. The Flowcode PIC USB components take away all of the hard work and simply let you get on with designing your peripheral.
You will receive a discount if you do decide to purchase Flowcode PIC as you already have an AVR license. Please speak to our sales team and they will be able to let you know the exact cost.
Re: Emulating a Windows PC USB Keyboard
Posted: Mon Jul 05, 2010 10:41 am
by iain wilkie
Thanks Ben,
I will contact sales about the Flowcode for PIC .... no point in making things difficult. I have never liked the PIC
architecture, but Flowcode takes the sting out of that anyway so I am happy to go the PIC route.
Is there an in-built Windows keyboard HID with Flowcode 4 ?
Iain
Re: Emulating a Windows PC USB Keyboard
Posted: Mon Jul 05, 2010 11:54 am
by Benj
Hello Iain,
Yes v4 for PIC comes with a HID USB keyboard example and an example that then uses this to create a datalogger which can auto fill data into an excel table.
Re: Emulating a Windows PC USB Keyboard
Posted: Sun Aug 08, 2010 5:11 pm
by cantronicx
There are AVR microcontroller that have the USB built-in but flowcode is far far behind with so many PIC and AVR microcontroller chips. The AVR microcontroller AT90USB162 for example, has been out for many years but not a supported by flowcode.
Re: Emulating a Windows PC USB Keyboard
Posted: Mon Aug 09, 2010 12:47 pm
by Steve
Flowcode's support for the more advanced internal modules is limited. There is support for the internal CAN module for that chip - please see the articles section of the forum.