Translating easy board design into easy code.

Posted in AVR, Programming on August 16, 2009 by barney_1

7-segment_finishedI’ve been working with some 7 segment displays lately.  I found an old computer on the side of the road and pulled a 3-digit display out of it.  The hundreds digit can only display a 1 and it has no decimal points.  After pulling it off of the board I find that it is a 16-pin module; one pin is common anode, one pin is the cathode for both segments of the hundreds digit, and the other 14 pins are cathode pins for one segment each.

I did some breadboarding with this module and was able to get things working pretty easily.  When I decided to do some PCB design things became more complicated.  For ease of programming I had connected all of the segments of the ones digit to PortD of an ATtiny2313.  I then connected all of the segments of the tens digit as well as the single pin for hundreds to PortB.  This setup makes for easy coding as each number you want to display can be stored as an 8-bit char and written directly the the Port for the corresponding digit.  The problem is that the board design to match this is not at all easy. Read more »

RSS Reader using AVR mega8

Posted in AVR on February 25, 2009 by barney_1

I spent part of an afternoon developing a hardware RSS reader (most of my time was spent on the python side of things).

It’s pretty simple and uses an AVR microcontroller connected to a computer via a serial cable.
x1
Read more »

Ubuntu FTP Server

Posted in ubuntu on February 20, 2009 by barney_1

Today I noticed that WordPress has a new version out (2.7.1).  I don’t have an ftp server setup on my Ubuntu box so I’m unable to use the automatic upgrade.  It’s not really a problem to upgrade manually, I usually tunnel in over ssh and then use “wget” to download the new package.  But, why not set up ftp and try it out the easy way?
Read more »

What will replace my Palm?

Posted in Consumer Electronics on February 18, 2009 by barney_1

Palm Tungsten e2

I have been a Palm user since 1999. I have long depended on my Palm for my schedule, my address book, my check book, my e-reader, and as an alternative to carrying pictures in my wallet (I don’t carry a wallet). I love the fact that I can easily sync everything for access on my desktop or in case I lose my Palm and therefore, my schedule book (what a nightmare to lose all my scheduling!).

I currently have the Palm Tungsten e2 and am very happy with it. The battery life is great, the screen gorgeous, and it’s a pretty fast device. Better yet, it is very easy to sync it with my Ubuntu 8.10 desktop (linux) using j-pilot. But, palm is no longer making non-smartphone devices.  Looking toward the future, what am I going to replace this device with?
Read more »

WordPress Theme Design

Posted in Programming on February 2, 2009 by barney_1

Over the last year I’ve really adopted the use of wordpress not only as a blogging platfrom but as a content management system (CMS).  I have now helped set up three different organizations with wordpress as a replacement for their previously hard-coded website content.  Through this process I discovered that it is actually incredibly easy to take an already pristing (fully validated and tweaked for IE bugs) css website and convert it to a wordpress theme.  Here’s some of the things I learned in my adventures.
Read more »

WordPress on non-standard port (not Port 80)

Posted in Uncategorized with tags , on January 9, 2009 by barney_1

I have a copy of wordpress running on my home server as well as on wordpress.com. At home my ISP blocks several common ports (Port 80, Port 21, etc). Because of this I have to use port forwarding with my router in order to serve webpages.

I use www.dyndns.com to give my dynamic IP address a more easy to remember name (ie: yourmadeupword.homelinux.org). This works well except that I have to add the non-standard port at the end: http://yourmadeupword.homelinux.org:3333

This is all fine and good except when it comes to wordpress. After installation I could not figure out why I wasn’t getting to my blog from outside the house. When I try I keep getting redirected to the url without the port number at the end.

Well, after much searching, I found you need to make sure you have wordpress set up for that specific port.

Log in as administrator, go to settings and click general. Change both urls listed there to include the port number you will be using.

AVR Development in Eclipse IDE (Part 2)

Posted in AVR, Programming with tags on December 13, 2008 by barney_1

I’ve been using Eclipse for a week or two now. I must say I do like the added features (I was using kate text editor and the command line before).

Subversion
I’m using the subversion plugin for eclipse called Subversive. It makes everything quite a bit easier with point-and-click checkouts, commits, and updates. I also appreciate the ability to compare code in side-by-side windows. If working on larger projects with several developers the functionality that eclipse provides is invaluable.

Compiler Flags
I found there are a few compiler flags I’m used to that aren’t run by default in eclipse. Read more »

AVR Development using Eclipse

Posted in AVR with tags , , on December 6, 2008 by barney_1

I’ve just today set up and started using Eclipse as an IDE for AVR development. I got here in a rather roundabout way. My current project is a tetris-like game played on a 3595 lcd screen. I’m having a bit of trouble with the scalability of the playing area and needed to do some debugging. I installed avarice and avr-gdb and did a bit of debug-wire work with those for the first time, but I wanted a way to tie everything together. It seems that eclipse will allow me to code, build, program, debug code, and hardware debug all in one. First thing is first though, I needed to get eclipse installed and running.

Trial and Error
I use Ubuntu 8.10 Intrepid Ibex and Eclipse is in the repositories, yay!! An hour and a half of downloads later I can’t get the AVR-eclipse plugin to work. Great.

Well, come to find out that Ubuntu has Eclipse version 3.2.2 in the repository and the AVR plugin needs a minimum of 3.3 installed. Fortunately eclipse comes as a java package, requiring no compiling. In fact, I don’t think you even need administrative privileges to install it.

Go download the Eclipse IDE for C/C++ developers here:
http://www.eclipse.org/downloads/

Unpack it, I just put the eclipse folder from the tar package in my home directory. To run it just go into that directory and type:
./eclipse

We will need to AVR plugin for eclipse. To install it go to Help –> Software Updates. Click the available software tab, click add site and put in this url:
http://avr-eclipse.sourceforge.net/updatesite/
In the window to the left expand the tree next to the url you just entered. Check the box next to AVR Eclipse Plugin and click Install to the right.

The plugin will download and install and then you will be prompted to restart eclipse, do so. Once you are back in use the AVR plugin help file to get things going. Find this by going to Help –> Help Contents –> AVR Plugin –> Getting Started.

Following that guide for about 5 minutes I was able to code, build, and program an app that flashed 6 leds in sequence on my development board (Dragon Rider 500) using a mega168 (what I already had sitting in the board. I’m asking my self why I didn’t start using this method much sooner.

There is a pretty good wiki regarding this AVR plugin:
http://avr-eclipse.sourceforge.net/wiki/index.php/The_AVR_Eclipse_Plugin

I’m going to look into on-chip debugging using eclipse along with avarice and avr-gdb. Check back for more on that.

Version Control using Subversion (SVN)

Posted in Uncategorized on November 21, 2008 by barney_1

The code for my projects has been getting ever more complex. Add to that the fact that I’m now using multiple computers for development and I find I have a need for a version control system.

I have had experience checking out projects on both CVS and SVN control systems but have never made commits or maintained the system myself. Luckily there are some good guides out there and Ubuntu has everything I need in the repositories to get my chosen package system, Subversion, up and running.

Tutorials
I used parts from both of these tutorials:

Installation

I did not install or setup the web interface system. Right now I’m trying everything out using my local network so installing the subversion ubuntu package is all I really needed.

I followed the Community Documentation’s guidelines to create a directory at /home/svn and to add the group “subversion” making myself and www-data members of that group.

Commands
Create the project:

sudo svnadmin create /home/svn/myproject

Import the first version of the code you have written. This will import all files in the DIR_TO_IMPORT:

svn --username YOUR_USERNAME import DIR_TO_IMPORT file://YOUR_LAN_ADDRESS/home/svn/myproject -m "First file import"

Check Out the first revision of the code. You want to make sure to check out from SVN now instead of working from what you just imported. This will make committing your changes easy.

svn co file://YOUR_LAN_ADDRESS/home/svn/myproject

note: these command should be run from the working directory.
Commit changes you have made to the repository:

svn commit

Show the changes you have made since checking out the latest version:

svn diff

Update to the most current version from the repository:

svn update

Breakout Board for 3595 LCD

Posted in Uncategorized on November 20, 2008 by barney_1

2008-11-20-lcd-breakout-boardI have manufactured a breakout board for the nokia 3595 lcd screen. As you can see this facilitates both interface with the screen itself as well as a backlight.

For the backlight I salvaged two LEDs from the phone board itself. I carefully measured and laid out the location for the copper to interface with the “spring” connection for the screen as well as the holes for the LEDs. The LEDs are SMD devices that are soldered to the bottom of the board and stick through a hole to the top of the board. I then cut the keypad area off of the plastic housing for the LCD and used that in conjunction with the metal frame from the phone to mount the unit to my home built PCB.

This is my first double-sided PCB. It doesn’t have the cleanest lines but it works and that’s good enough for me. I found it a bit more difficult to iron on the toner to both sides without smearing it (due to too much heat or from moving the paper while I worked).