Multiple Serial Devices in One Terminal

Dear Fans,

I am excited to say that now according to Google Analytics I now actually have fans. Cool. Perhaps I will start selling shirts.  Now for today’s exciting news item. My good friend and all around computer genius [Jim] has produced quite a nice terminal program that can host multiple serial devices in a single prompt. Its super easy to use. In hurry? Grab the git repo: https://git.jim.sh/jim/terminal.git. Just add all the devices you want to display as command line arguments and *presto* you have a color coded super prompt:

Multiple device terminal emulator

Multiple Device Serial Terminal! A 21st century HyperTerm

This is a great tool for debugging multiple devices at once. My latest project involves an EZ430 wireless kit and unfortunately I don’t have the $$ for IAR or CodeWorks. *yet*. So I am forced to use gcc which is cool but the Simpliciti network stack for the EZ430 has to be ported over and there are all sorts of hiccups and bugs that plague this sort of wireless network setup.

EZ430 RF2500 boards

Building wireless links == frustration

So, there I was angrily trying to debug the invisible ether when Jim comes along with this beauty. I threw in a couple of Micro FTX boards for USB->Serial, and in no time I had both devices printing out updates over their UART’s and I could see the communication in real time. Check it out:

Debugging multiple devices with a single terminal emulator

Debugging like a pro with a a multiple device terminal emulator. Sweet!

Excited? Yeah most definitlely. Just grab the git repository and you’re good to go.

$ git clone https://git.jim.sh/jim/terminal.git
$ cd terminal
$ ./terminal.py --help
usage: terminal.py [-h] [--quiet] [--baudrate BAUD] [--crlf] [--all] [--mono]
[--raw]
DEVICE [DEVICE ...]

Simple serial terminal that supports multiple devices. If more than one device
is specified, device output is shown in varying colors. All input goes to the
first device.

positional arguments:
DEVICE                Serial device. Specify DEVICE@BAUD for per-device
baudrates.

optional arguments:
-h, --help            show this help message and exit
--quiet, -q           Less verbose output (omit header) (default: False)
--baudrate BAUD, -b BAUD
Default baudrate for all devices (default: 115200)
--crlf, -c            Add CR before incoming LF (default: False)
--all, -a             Send keystrokes to all devices, not just the first one
(default: False)
--mono, -m            Don't use colors in output (default: False)
--raw, -r             Don't escape unprintable characters (default: False)

Note you need the pySerial module to get this running so grab that with your favorite python installer (pip, easy_install, etc). One nickel to the first poster who can figure out the maximum number of devices this thing can support.

till next time,

jd

PS. Get the news hot off the press: Follow the RSS Feed!

Posted in Uncategorized | 7 Comments

Touch.it.Fa.bulo.us/ly

First of wall, what a cool URL. I thought it would be fun to connect a website to the real world so this is what I’ve been working on lately. The traffic really blew up when Hackaday posted it, now about 10-15 visits happen per day. Its fun to watch it randomly count down while I’m working in the lab. The next project is interactive Tic-Tac-Toe. Cool!

An interactive website that changes things in the *real* world.

Check out the site: http://Touch.it.Fa.bulo.us/ly  *note I’m working on a spam filter, but until that’s finished be aware that some of the comments are less than savory*

The 7 segment displays are powered by an ATMega32U4 which talks over USB to my webserver. Check out the website for more info. I’m looking for anyone else interested in exhibiting their interactive hacks online. Leave a comment or better yet submit your info on the site.

*Update*

Wow, a shout out from my hero- the developer of LUFA (the USB library I use for this project).

 

Posted in Uncategorized | Leave a comment

Converting Breakout Headers to a Breadboard

So here’s a simple hack to get a breakout board with two inline headers onto a breadboard nicely. My latest project involves TI’s EZ430-RF2500 which is quite a nice setup to get a wireless project up and running quickly. Unfortunately the breakout pins are aligned in 2 parallel rows on the side of the board making it impossible to plug directly into a breadboard.

Breakout Board for MSP430

2 Rows of Breakout Pins- How can this be breadboarded?

Ideally this board should be connected in the center of a breadboard like a DIP package. So the challenge is how do you convert 0.1″ spacing into DIP package spacing?? Here’s my solution.

1.) Solder header into the breakout pin holes and *cut off the pins on the outside row*. Then place it into a bread board with a single row of header next to  it.

Place board and single row of header into the breadboard

Setup the "jig" for soldering. *Note use 2 rows of header on the board and clip off the outside row pins from the bottom*

2.) Solder a second single row of header across the outside row of the breakout board to the header on the opposite side of the divide.

Soldering header across the divide

3.) Presto! Complete transformation from 0.1″ spacing to DIP package. Ready to prototype. Cool.

DIP spacing for a 0.1" Header

Rows of 0.1" Header expanded to DIP spacing. Ready for Prototyping!

Breadboarding with EZ430-RF2500

Ready for Prototyping!

Posted in Uncategorized | 7 Comments

ATtiny10: Introduction to a Tiny Micro

Part II: Using  Open Source Tools with the AVR ISP MKII

Missed Us?

Part I: Using  Open Source Tools with the AVR ISP MKII

Welcome back to our new series on the ATtiny10 micro. A wonderful little chip but a little difficult to program… until now! Last time we went over how to use the MKII programmer with Atmel’s all-in-one IDE AVR Studio but booting up such a complex programming environment is not really necessary, especially since our little chip doesn’t even support debugging. A quicker easier way it to use the open source tools instead. In order to make this as painless as possible you are going to want to use a Linux distro with package management. I recommend Ubuntu. If you haven’t used the command line before, fear not, we’ll go step by step.

Install the latest edition of avrdude. As of now this is 5.11.1. Unfortunately many package management frameworks don’t have the latest version so its best to build it from source.

  1. Get the source code for 5.11.1 here, or just enter the following commands into your bash shell
#get the source
wget http://download.savannah.gnu.org/releases/avrdude/avrdude-5.11.1.tar.gz
tar -xvf avrdude-5.11.1.tar.gz #uncompress it
sudo apt-get build-dep avrdude #get the dependencies
cd avrdude-5.11
./configure #the standard linux installation stuff
make
sudo make install
avrdude -v #make sure you are running 5.11.1

2.) Now get your AVR ISP MK II programmer and connect it up.

avrdude -c avrisp2 -P usb -p t10 -U flash:w:[your_code.hex]

Done! Easy! Don’t have a MK II programmer? Don’t worry, next we’ll go over using the Bus Pirate programmer.

till next time,

jd

Posted in Uncategorized | Leave a comment

ATtiny10: Introduction to a Tiny Micro

Part I: Programming with AVR Studio and Atmel Hardware

Dear Fans,

I know many of you have been wondering when some actual content will appear on this blog. After successfully defeating SOPA (see protest post) we finally feel comfortable providing some engineering material. Today I am starting a somewhat extensive writeup on my new favorite micro, the AT Tiny10. A note to the history buffs, this is the new ATtiny10 and *not* the old, never released version. There are many ATtiny10 resources out there but they either fall short or provide a bunch of technical jargon and no examples. Like its datasheet. Where is one to turn for good practical ATtiny info? (like this poor guy on instructables.com) Look no further!

The ATtiny10 comes in the super tiny SOT23 package. Equiped with four GPIO pins, a 4 channel 10 bit ADC, PWM, and several other goodies this thing is an amazing little device. The only trouble is programming the thing. The ATtiny use the appropriately named “Tiny Programming Interface” (TPI) which is cool since it uses only 3 pins, but uncool because its not JTAG, ISP, or something people actually use. There are two main ways to get your computer to talk TPI: AVR Studio, and the free open source avrdude.

AVR Studio

This is an attractive solution to those not comfortable with the command line and it also has a cool simulation environment where you can run your code and check whats going  on in memory, the registers, etc. Here’s how to get it working:

Get AVR Studio: It’s available for free after an easy registration at the Atmel website

Start a New Project

Select Assembler

Choose the ATTiny10 as the platform. Note that the only supported programmers are the AVRISP MKII, and the STK600. You *must* use one of these types of programmers if you want to work in AVR Studio. Don’t have one? Check back next week when I show you how to build your own MKII programmer!

Write some cool code. This guy has a great writeup on AVR Studio and a cool blinking light demo ready to go.

Connect your programmer and choose “AVR Programming” from the Tools menu.

Once the dialog appears, you want to select ATtiny10 as the chip and use the TPI mode to program it. To make sure everything is working read the DeviceID and make sure it is 0x1E 0×90 0×03

Now you are ready to try and program it. You might be presented with the following dialog and of course choose your programmer (not the simulator).

*IMPORTANT* The ATTiny10 does not support debugging so to flash the chip you must run without debugging. Select “Debug>Start Without Debugging “. There is also an icon is with speedy little lines that runs the chip without debugging. This will program the chip but it won’t be very obvious. That it worked. Never fear, plug in the LED and …

Watch it go!

Pretty easy stuff. But what if you don’t want to load up some super crazy interface like AVR Studio every time you want to rock some assembly code? Well there’s avrdude to the rescue. This program is a little more daunting because its command line interface only, but don’t worry we’ll walk through it step by step. Stay tuned!

till next time,

jd

Posted in Uncategorized | Leave a comment

**ATTiny Update**

My man Jim is now mad and absolutely destroying the programmer. He’s gonna go hari kari all over the AVR thingamajig. Pictures to follow.

This is exciting

-jd

Posted in Uncategorized | Leave a comment

ATTiny10

Dear Fans,

I just received the world’s smallest microchip in the mail. Here is its size:

 

 

.

 

 

 

 

That is it. A real picture taken with a SEM (scanning electron microscope). There are 6 pins and no way to program it. Literally the thing cannot be programmed. I have one of my guys Jim on it 24×7 and he can figure none of it out. There’s some big manual thats too many words not enough pictures and absolutely 0 jokes. There’s also a big box full of CD-ROM’s and a programmer that claims it can write to any AVR chip made in history- or the future. Bunch o lies.

 

Stayed tuned for intermittent updates.

 

Yours,

jd

Posted in Uncategorized | Leave a comment

SOPA

Today we’re joining the many websites blacking out their content. The rest of this post is censored.

Posted in Uncategorized | Tagged | 2 Comments

The Future

Good news!

The future is here (almost):

http://jdonnal.xvm.mit.edu/

Posted in Uncategorized | 1 Comment

The start of something new

Dear Readership,

Today is the first day of a new age.

Carry on,

bjt

Posted in Uncategorized | Leave a comment