The power of relevance

If you are a news junkie like myself, you may have noticed that ABC News provides Google-like references to purportedly relevant news articles to the one being viewed, down the right side of the page. I have noticed however that their relevance engine clearly has some issues. The story this morning was titled “Sydney welcomes second cruising Queen” which was about the historic event tonight as two large ocean liners, Queen Victoria and Queen Elizabeth II will pass each other on Sydney Harbour. A had good chuckle when I read that the supposedly related articles were:-

  • Council welcomes second airline – 21 Mar 2003 (Planes not ships – and hopefully not passing each other at 100m distance!)
  • PM welcomes Swedish royals – 7 Nov 2005 (Some real royals)
  • India cruising in Hobart – 14 Jan 2004 ( A royal game maybe, but the Indian cricket side is cruising along here)
  • Australia cruising to huge total – 7 Oct 2005 (This time it is the Aussie cricketers going for spin)
  • Melbourne welcomes Prince Edward – 12 Mar 2006 – (Another real royal)

Not a ship to be seen. Oh well Aunty ABC, maybe you should have a chat to Google!

┬ÁControl freak

After attending LCA2007 (last year) and catching Tim Ansell’s show and tell on some PIC microcontroller based projects, I got inspired. He mentioned that Microchip offer free samples of their PIC chips, so I managed to get my order in for a small variety (a 12F629, 16F88, 16F688 and a 18F2550). All of these have a different target application (small and simple (8 pins), to mixed salad (18 pins, with 16 I/O including analogs and USART) and up to USB capability. Anyway I have had the chips for a while and I was researching programmers (to burn your program on to the chip). I didn’t want to spend much money, and was going to build my own, but eventually I got lucky and got a PICkit2 clone from Sure Electronics on eBay. I also board a breadboard and to get me going on a project some 8×8 LED display modules.

Anyway I have been having quite a bit of fun. I managed to build up a simple display driver circuit using an idea I thought of, but it seems others have as well, using shift registers to latch the row and column data for the display. This also minimises the pins required from the microcontroller. I also got digital and analog inputs working, with a potentiometer able to adjust the rate my display changes. I am using the 16F88 PIC along with 74HC595 shift registers.

Eventually I wouldn’t mind build a message display using the 8x8s and a USB connected PIC. The “real” projects I would like to work on would be some simple sensors around energy and water – but don’t hold your breath. The thing I found amazing is that I have picked up, and even enjoyed , programming at assembly level again. PICs are basically RISC processors, so there is not many instructions to learn (less than 40 for for PIC16). Working at that level you have to think a lot about timing and conserving space, how best to get input and provide output (with limited resources). While my current programs are just endless loops, grabbing inputs and stuffing output pins (and mind you this is probably what you want a hard real time system to do), the next thing I want to learn is to set up timers, interrupt service routines (watch for timeouts and/or input changes) and so on.

Where microcontrollers excel over discrete logic is that provided you bring inputs and outputs together at the right level, you have a lot of opportunity to tweak the processing of inputs late in the design process. This has a lot of advantages to somewhat impassioned and impatient creative types like me.

Any way I have attached a photo of my breadboard, and a dump of my (very messy) code.

My breadboard