3 ms·
FTDI-style chips are still extremely relevant to hardware development, because they're plug-and-play. They just go. No buggy software to work around or kLOC to
by exmadscientist 5y ago
FTDI-style chips are still extremely relevant to hardware development, because they're plug-and-play. They just go. No buggy software to work around or kLOC to write yourself. The time and effort saved there is real and valuable.
That's for one-offs and debugging connections, though. If you're shipping a product, then suddenly the economics change and the software-heavy solutions start to look good again.
- throwaway81523 5y agoThanks, what I'm wondering is whether you can program one of those boards as a USB converter one time and be done with it. It really shouldn't take KLOC, I hope, and it even seems likely that such code is already out there. The idea then is that you can use a board with that code instead of an FTDI cable from then on.
- exmadscientist 5y agoUnfortunately USB stacks are pretty heavyweight. On a Cortex-M3 class part they end up around 6kB compiled. You have three basic options for getting them going: 1. Trust your vendor's libraries/ROM drivers/example code. This is the fastest to bring up, the least flexible, the buggiest (it's vendor code!) and the hardest to debug. (Trust me on the debugging part.) 2. Use a library like tinyUSB. This can actually go pretty quickly, since you've got full source control. If your part is popular enough that someone else has already done most of the work, this is by far the best choice. Even if you have to get personal with the hardware, I still like this option. (tinyUSB is much better than what came before... I wish it'd been around last time I had to do this.) 3. Write your own. Don't do this. (You might have to do parts of this if you tried #1 and it isn't panning out.) All of these are doable. Any of them are enough work that if you're only making one, just put the FTDI down and call it done.