Archive for August, 2008

Kicad now compiles on Mac OSX

Friday, August 22nd, 2008

Just downloaded revison 1200 of kicad from svn using th following command

svn checkout http://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad kicad-sources

I also upgraded to cmake 2.6.0 using the macports system and then followed the included instructions and it compiles ok on my macbook.

It is working a lot better but PCBnew is still fairly buggy.
The schematic side of it is working great though.

Worth a look but I’ll have to keep using the windows version for any stable work.
I’m going to keep an eye on the kicad-dev group and see if this makes any progress.

Note: my wxwidgets were installed via macports at

wxWidgets_CONFIG_EXECUTABLE=/opt/local/bin/wx-config
wxWidgets_ROOT_DIR=/opt/local/include/wx-2.8

but i noticed a version was already installed in a couple of places. Here is what locate gave me:

% locate wx.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/wx-2.5/wx/wx.h
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wx-2.8/wx/wx.h
/opt/local/include/wx-2.8/wx/wx.h
/opt/local/var/macports/software/wxWidgets/2.8.7_0/opt/local/include/wx-2.8/wx/wx.h
/opt/local/var/macports/software/wxWidgets/2.8.7_1/opt/local/include/wx-2.8/wx/wx.h
/usr/include/wx-2.8/wx/wx.h

% locate wx-config
/opt/local/bin/wx-config
/opt/local/var/macports/software/wxWidgets/2.8.7_0/opt/local/bin/wx-config
/opt/local/var/macports/software/wxWidgets/2.8.7_1/opt/local/bin/wx-config
/usr/bin/wx-config

Cheap 3D accelerometers and SPI issues.

Tuesday, August 12th, 2008

Just added support for Kionix accelerometers to the Butterflylogger project. In particular the KXPS5 using the breakout PCB from Crodnet. The main advantage of this accelerometer of others as far as I can see is the price as well as having both digital (SPI and I2C) as well as analogue interfaces.

Had a small hiccupp in getting the SPI bus to behave. It seemed that when I drove the SCLK line while clocking out a response from the accelerometer, the cross talk (with the MISO Line) would interfere with the output (see above)

After a number of ineffective tweaks with speed and the IO setup for the lines I decided to shorten the lines. After shortening the lines all the problems went away. For reference the original lines were approximatly 10cm between the butterfly and the breakout board.

NOTE: the code for talking to the accelerometer is KXPS5-3157.c and KXPS5-3157.h The will be included in the next code release but for the meantime you will need to get them from the CVS repository.

How to disable the open firmware password on a G4 iBook

Tuesday, August 12th, 2008

I recently replaced the HD in the old G4 iBook (now I see why people were excited about the new macbook designs… this vs this). Partitioned and formatted the hdd prior to installing. Thought I’d use the old “hold down T during boot to turn the laptop into a firewire drive” trick….

unfortunately this page http://support.apple.com/kb/HT1661 has the note

Important: The computer will not go into FireWire target disk mode if “Open Firmware Password” has been enabled.

So here is how to disable the open firmware password on an ibook. (After the print env command check to see if the security-mode option is command or full.)

reboot
hold down cmd-opt-o-f
printenvsetenv security-mode none
reset-all

reboot
hold down T

copy files

reboot
hold down cmd-opt-o-f
setenv security-mode command/full what ever it was before
reset-all

get on with your life 😉

Useful links:
http://manuals.info.apple.com/en_US/Command_Line_Admin_v10.5.pdf pg134
http://www.firmworks.com/QuickRef.html
http://www.ifixit.com