Sunday, January 15, 2012

Teensy hacking

The Teensy is "a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects". I'm using it as an intro to USB. I see USB protocol as my white whale. I'm comfortable with other lower level protocols, but those are going away. Most computers do not even come with a RS232 port, so if you want to create any device that is configured by plugging it into a computer, USB is the way to go. I'm hoping to get some of the basics of implementing a USB profile with the Teensy. I know very little about this, so I'm hoping to write this article to learn the USB stack. Any thing said here should be understood that I might have no idea what I'm talking about.

USB consists of 4 wires, 5V+, GND, D+ and D-.  The USB spec talks about these in detail, but in general, D+ and D- are what send data between devices, and is referred to as the bus. On an established USB bus, their is one node (master) that controls all data flowing on the bus and no device can send data without the master node allowing it. I would call this a poll based architecture.

Well, that was rather brief, but layout out a few things. I'm going to be diving into this tutorial, in hopes to have some C code posted that will do something fancy with a Teensy, outside of the stock examples.

No comments: