Monthly Archives: November 2012

Setting the precise dimensions of a window

I wrote this little program to let me set the exact dimensions of any window on my desktop. This is something I often need to do for taking screenshots that fit nicely in a blog post. The complete C code … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

RoboSlam: robots for beginners

Next week, as part of our continuing drive to push the love of engineering and programming out into the wider community, Damon Berry and I are running a two-part robot building workshop for beginners called RoboSlam in MAKESHOP on Lincoln … Continue reading

Posted in Uncategorized | Tagged , , , , , | 2 Comments

Simple dsPIC33FJ32MC202 example

This is a very simple example circuit and C program for Microchip’s dsPIC33FJ32MC202 microcontroller. The basic circuit used to connect the PICkit 2 to the dsPIC33FJ32MC202 is shown below. One thing that confused me when I tried to wire this … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , | 19 Comments

Rational Hunt: Finding a rational approximation to a value

Earlier this afternoon, I was trying to work out why the internal fast RC oscillator in every dsPIC microcontroller (well, every one I’ve used) has a frequency of 7.37MHz. It turns out that it’s because it facilitates the convenient production … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Servo motor control example for the PIC18F4620

This is a simple servo motor control example for the PIC18F4620 microcontroller. The servo is controlled by the PWM signal from CCP1 (pin 17 on the PIC). The PWM period is 20ms and the pulse width varies between 1ms and … Continue reading

Posted in PIC, Uncategorized | Tagged , , , , , , , , , | 17 Comments

Polyphonic Keypad

Inspired by Paul Leamy’s dsPIC musical instrument, the microKey, I’ve just created a little polyphonic instrument of my own using a 12-button keypad that Richard Hayes gave me a couple of months ago. The code is set up to scan … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , | 3 Comments

Creating a shadow template of a PGM image

I’ve just been cleaning up a scanned copy of a line drawing on paper. The background of the scanned image is quite dark and the shadowing is a bit uneven over the full image region, which makes it difficult to … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , | 1 Comment