View Full Version : USB HID - is it possible with Parallax chips?
09-13-2006, 03:31 PM
I was reading the article in Circuit Celler's August 2006 issue (page 29) called "USB Volume Control" where the author made a volume controller for windows based on an max3420e chip,·an Atmel AVR·ATtiny13 microcontroller and a rotery dial.· This seemed very interesting to me as it's close to some things I would like to do, but was hoping to get more of an experiment thing together to learn USB Human Interface Controlling.· The key was the max3420e chip could be controlled via SPI, or could be controlled via a 'bit-banged' SPI.· Also - the ATtiny13 had about 512 words to program.· Is there a comparible solution using parallax chips? (i.e. bs1 (doubtful - not enough program space I figure), BS2, SX, or Propeller)·· I currently have BS1, BS2, and some SX52 development boards that I haven't started playing with, but propeller is very enticing.·
Also - if not the max3420e - then what would be best for this?· I know Parallax has some usb to serial things but I don't think that it is capable of HID - and that would be key I think.
Just looking for a direction to start that won't be impossible from the start. :-)
09-13-2006, 08:38 PM
The SX or Propeller could clearly do the same as the ATtiny13 with the MAX3420e chip. The BS2 can also handle SPI, but may not be fast enough to do anything useful. You could certainly use the BS2 for experimentation with USB via the MAX3420e.
The USB to serial adapters are not HID devices. They can only provide a serial UART.
09-14-2006, 05:01 AM
No...Unfortunately, there is a low level USB Stack that needs to be implemented into a microprocessor in order for it to be USB Compliant. The USB Protocol communicates at 12MB/s or 148MB/s.
Also, The Electronic signals are NRZI, and you cannot cleanly toggle pins against each other (to 'bit bang')·to get a clean enough eye pattern...especially at those speeds.
The best route is to incorporate the FTDI Chip into your design. It contains the low-level USB Protocol stack and is USB Compliant.· I know that's not what you want to hear, but USB is something that generally needs to get implemented into the Silicon.
Other than that, there are a few PIC chips that have the USB Stack, but I don't care that much for PICs.
...The bad part about a chip with a USB Stack is that you will have to program your device, Class, Interface, and Configuration Descriptors...you will also have to develop your own driver API for the PC.
Unless you hire a full-time USB Development Engineer, you are better off with the drop-in module from FTDI.
Post Edited (Steel) : 9/13/2006 10:15:08 PM GMT
09-14-2006, 10:12 AM
Maybe I was thinking of the next fancier device, the MAX3421E which does handle some of the low level stuff and has a small FIFO to help with buffering. I'm not a USB expert, but I think the MAX3421E could let a Stamp handle some of the simpler protocols like the HID for a volume control. Have a look at the datasheet.
09-16-2006, 05:59 AM
Thanks for the pointer Mike, I will check out the MAX3421E and see the differences between that and the MAX3420E. But from what I can see, if I used an eeprom with a bs2, it would work, but I think - for code sizing considerations of how much needs to be handshaked back for the HID part to be recognized - I would be better trying this on a SX or Propeller. I suspect Propeller would be the better bet. Does either SX or Propeller have direct SPI tools? Or will this be a bit-bang type of thing for them?
I am also looking for a good primer on HID - because I want to not only have inputs on the controller, but also outputs - like LED bar-graph (like for the volume percentage), and pwm control, as well as something more in the ballpark of 3 rotery digital encoders for input.
09-16-2006, 06:28 AM
Everything on the Propeller is bit-bang'd, but for most stuff (I2C, SPI, Serial, vga video, ntsc/pal video, PS/2 mouse, PS/2 keyboard) someone else has already written and debugged the code. Look at the objects in the Parallax Propeller Object Exchange and the ones that are installed along with the Propeller Tool.
Keep in mind that the Stamp program EEPROM can also hold data (DATA/READ/WRITE commands). On the BS2, there's not a lot, but, with the other ones, particularly the BS2pe, there's a lot available.