Power off an USB device in software on Windows

Some USB hubs have the ability to turn power off to its downstream devices. “Is it possible to power up ports on a USB hub from Ubuntu?” https://askubuntu.com/questions/149242/is-it-possible-to-power-up-ports-on-a-usb-hub-from-ubuntu Which points to some c source for hub-ctrl.c See: http://www.gniibe.org/development/ac-power-control-by-USB-hub/index I tested this on Ubuntu with a Dream-Cheeky USB LED unit, and it did seem to turn … Read more

Does it matter which microcontroller to use for 1st time embed system programmer?

Personally, I’d recommend an ARM Cortex-M3 based microcontroller. The higher-power ARM cores are extremely popular, and these low-power versions could very well take off in a space that is still littered with proprietary 8/16-bit cores. Here is a recent article on the subject: The ARM Cortex-M3 and the convergence of the MCU market. The Arduino … Read more

What is a “packed” structure in C?

When structures are defined, the compiler is allowed to add paddings (spaces without actual data) so that members fall in address boundaries that are easier to access for the CPU. For example, on a 32-bit CPU, 32-bit members should start at addresses that are multiple of 4 bytes in order to be efficiently accessed (read … Read more

What is the difference between baud rate and bit rate?

Bits per second is straightforward. It is exactly what it sounds like. If I have 1000 bits and am sending them at 1000 bps, it will take exactly one second to transmit them. Baud is symbols per second. If these symbols — the indivisible elements of your data encoding — are not bits, the baud … Read more