Hey guys, I'm looking to build a couple usb devices using a microcontroller, though I'm not sure which one yet, so I was hoping for advice/recommendations. I need the following: 25-30 I/O Lines, USB interface with pc, and Flash memory, since I will be experimenting with the code quite a bit. I'm trying to build this.
PIC16C765 is what I've been looking at for USB automation and data acquisition. Also, if you want something cool to add to it, take a gander at radiometrix 400mhz transcievers.
Uh, no on that 16C765. Its not a bad controller for the job, but you should have years of experience before attempting to code for a one-time programmable device. Unless you have the money to go through 50 of them just to get the USB programming stuff right. Cypress makes a EZ-USB microcontroller thats reprogrammable. But theres not much support as compared to PICs. If you can live with having the USB stuff of-chip from the microcontroller so you can use whatever PIC you want, take a look at the USBMOD4 . Theres alot of support available on the net for the FTD USB chips.
Comon, assembler isn't that hard, its just a little bit of math mixed with some intuition. And ever hear of emulation software?
I use the MPLAB SIMtool all the time. Problem is, the original poster has not. Learning on a OTP PIC is always a bad idea, unless theres money to be thrown away. Also, the emulation software doesn't actually emulate USB comms.
Forgot about that... But they have kits with royalty-free code. The code by default allows you to control the I/O pins and read the ADC.
Wow, doing delevopment on an OTP, why oh why when there is no real reason. Try this PIC18F4455 It is pin compatible with the one previously mentioned and it is flash based, also about 2x the price but still only $6. Rod
Thanks Rod, thats the one I was looking at before, but I'm not sure if supports constant 2 way communication, though I'm hoping it may. I'll have to zip an email off to their tech support and see what happens.
IIRC And I could well be wrong because I read it a long time ago, USB has two main forms of transmition. The first is a sort of stream, it consists of data packets and control packets to ensure that the link is keeping up and is not getting corrupted. The other form is bulk transfer. In this a large chunk of data is transfered with no control packets. This yeilds much faster transfer rates but obviously relies on a strong link. I think that it also requires both ends of the link to know what is going to happen. This may prove to be an issue if you are just going to rely on the built in HID driver in windows. I beleive (and again I read this along time ago) that USB is a bit of a bitch to get to work so good luck and let us know how it goes, I am especially interested because if it works I can imagine lots of nice things, not least a true USB PIC programmer rather than one which does USB to serial and then uses a serial programmer. Rod
Alright so it comes down to this: Is it worth using the usb interface or should I jump on the serial bus ( ). The funky thing I can see about using the usb interface is that firmware upgrades on the device would be simple. However, it seems like everyones tellin me that the usb is a total bitch to get to work so I'm very hesitant to go with it right now. I guess I'll have to pick one up eventually since its the best way to try!
SERIAL!!!!!!!! Don't bother with USB until you are very, very comfortable with microcontrollers. USB is just one long headache. Anyways I personally would reccomend an AVR over a PIC for the job - mostly because I think the AVR is the better chip overall - but that's a matter of taste. Also there is a very sweet little AVR coming out sometime soon that has USB built in. (and it runs at 48Mhz!) But again - shy away from USB!!! Whichever way you go - AVR, PSoC, PIC, whatever - start with serial.
Woot, you can do firmware updates over the serial port as well!! What you need is a bootloader. This sits on the uC and is the first program to run. For the first second it sits there waiting for a signal from the serial port to say "I have some new software for you" If it does not get this message then it executes the program which was previouly programmed. The other thing which I can see with the serial port is that writing a driver for it should be trivial compared with USB. On the other hand I really want someone to have a go at USB and tell me how difficult/easy it is... Have a look at Tiny Bootloader Here Rod
USB development is to be taken lightly, or expected to be cheap by hobiest standards. but don't be scared by the OTP stuff, because you buy a /JW edition which has a UV window. check www.beyondlogic.org for an example of a flash pic using a phillips SIE.
OK, I under maybe... none of that I think what I'll do is pick up both a serial version to play with and then move up to the usb when I think I'm ready. Thanks for the advice guys
But I don't understand why anyone would go for a OTP chip, so you can get an erasable one with a UV window, why bother? Sure flash ones are more expensive but you only need a few. I thought that OTP devices were meant for mass production where every penny counted. Rod
yes. They get the OTP one because their stupid. When developing mass production, you use a /JW variant (UV eraseable) these do cost about 10 times as much as a normal versoin thou.
ok, from what I understand, I should look at the flash version for development then? I'm just more confused. I'm assuming tho that you recommend the flash, as I though the flash was best for quick rewrites or updates. My head hurts....
Flash devices have EEPROM (electrically erasable/programable read only memory) OTP devices have EPROM (electrically programable read only memory) but there are /JW revisions aviable of OTP devices, these allow erasure by ultra violet light. Now for your idea, i would of thought u wanted a lower production cost, as a slight developement cost increase. so i would recoemend 2 * /JW varients. OTP devices are a lot cheaper, often half the price, so for your idea you would want that.
Interesting, thats a good way to look at it. Hmmm, much to think about now.... BTW can you teach me how to give the furniture multiple orgasms?