2009-05-24

Follow up on Balcony garden

Our vegetables have been growing steadily for the past two weeks. I've been moving some of the sprouts that were born in the yogurt cups to the bigger vases, but now I don't have any more space. On some, instead of removing them from the cup, I just cut the cup bottom and push them into the vase.

I learned that carrots don't like and should not be moved! No wonder now that they took so long to adapt, on the other hand tomatoes, kale and the celeriac don't seem to bother being moved and are developing nicely.
On the "battle of the veggies" I seem to be up front in the kale, celeriac and carrots, unfortunately my tomatoes look like little dwarfs compared to Ana's..

Last week my kale reached some "maturity" and before it became too hot to eat a soup we decided to try doing a caldo-verde.

We used some of the bigger leaves of our kale to do it, with some "chouriço" and bread, hum ... delicious...

2009-05-07

SBC6120 Assembly

Some time ago I started looking at a strange (in today's terms) old mini-computer PDP-8 from DEC. It is 12bit machine with one accumulator and program counter, further allows one level of indirection, some models had some memory positions that could be accessed with auto increment and others still had memory paging capabilities.
This mini-computer was so wide-spread that two Integrated Circuit versions of it were produced (IM6100, IM6120) although they came a bit late to a market that progressed beyond the original design.
The book "The Art of Digital Design - An Introduction to Top-Down Design"from Franklin P. Prosser and David E. Winkel describes how to design your own PDP-8 either using normal logic or using a bit slice components, something I would like to build... both versions... :-)
But would I also like to test drive the CPU before I build one, the easy solution would be to find a IM6100 and build it in a bread board... During my search I found that Sparetimegizmos (a company in the US) was selling a kit that included the very hard to find chip! The first time I visited the site it said there were no more ICs, a month ago they had new kits available, so I bought one. They also have front panels but the price tag is bit over my budget, but still very interesting. Here are two pictures the original and the "original copy":



I finished assembly of all the sockets and all the logic ICs, I had some difficulty in finding the IM6402 UART (it is also not cheap), the half-size oscillators, the interface connector and connector that look good on the board, so for now I have a "wrapped version" that I expect to put to work during this week. At least get something on my terminal window :-)
A great thanks to Bob Amstrong and Sparetimegizmos for having the time to design, build and
sell the kit.

2009-05-05

Munny Software

Finally I had the time and the patience to write a "clean version" of the Munny code.
I wanted to use avr-as instead of AVR-Studio, it was much more difficult than what I expected. Information about using avr-as is scarce and I was unable to find an example of an assembler only project for avr-as. The main problem was that when you use preprocessor commands you must use preprocessor comments!
So remember the following:

#define ADC_SETTLE -32 /* arround 20ms */ GOOD
#define ADC_SETTLE -32 ;arround 20ms WRONG

I'm not a web-wizard but I wanted to post the code "online", I tried using google code. Probably I'm not using correctly and I don't think it was designed for such small projects but here is the link to the download.
Because the project might interest to more than one community I also tried to posted the project at the AVRFreaks site, usually the place to search for information when dealing with avr-gcc toolchain but unfortunately I cannot add a file to the project...
Programming the flash is straight forward with avrdude, but programming the oscillator calibration value and the fuses needs some more work. I used the interactive mode of avrdude ( -t) :
read calibration
write flash 0x3ff calibration_value
read flash 0x3ff 0x10
Here is a picture of the PCB during testing:

The software is a bit difficult to understand, the micro is put to sleep most of the time except once once every 32 times of watchdog resets.

Then a temperature measure is made, a port pin is used to power the temperature sensor and the micro is put to sleep for some 20ms, then a analog to digital conversion is started and the micro put to sleep again until the conversion is finished. Then the value is stored and the sensor is powered down (to save maximum power).

The following step is calculating the colors function of the temperature, according to the temperature one of Red, Green or Blue or a mix of two is calculated. Each color has a value of [0..255].

Finally blinking the LED, a software 3 channel pwm controller is created, a counter is incremented every Timer1 output compare and the calculated color values are compared with this running counter. When the counter value is higher than the set value the corresponding LED color is turn off, otherwise turned on. Timer 1 is set to auto reload every 1/25.6 ms this gives a 256 bit resolution every 10ms, this make the colour mixing invisible to the eye. After 100 repeated counter runs the micro goes to sleep until next Watch dog reset.

2009-04-19

Dad at his Workshop

This Easter we went back to Portugal for a week. Make:Online had a "competition" about workshops... I immediately thought of my Dad's workshop, the most hectic I've ever seen. It's an all in one, Land Rover garage, metal workshop, wood workshop and electrical workshop. Through out the years I've seen many things coming out (and probably many getting in never to be seen again)... From repairing bikes, doing metal stands, from small cabinets to bookcases, welding and metal cutting to fixing a toaster (the current task).
To my Dad, because he deserves it! For trying to build a Galena radio with me when I was 9 (we didn't finish), for teaching me how to ride a bike, for showing me how to do some woodworking, for letting me see him working with the welding machine, for taking me to a factory shop and teach me to watch carefully the machines and keep my hands away from moving parts, for teaching me so much.
tis first on the internet, maybe one day I can push him to blog on his creations or failures.
Obrigado Pai!