Just a few minutes ago, I soldered the last joint to a little ‘flying board’ I’ve built that connects into the original PIC programming board we bought all those months ago.

For reason known only to the Velleman designers, they’d put the main interrupt input pin as an LED output, but this hasn’t stopped me.  That link above takes you straight to the page of said programmer.

I unhooked the resistor feeding the little LED and connected one of the three flying leads (…the other two are +5 volts and ground…) so the new circuit was fully connected.

I then turned it on, and…


Shouts of disbelief as again and again I touched a wire across the two terminals and two LED tell-tales faithfully lit up twice to show me that yes, it had gone into the Interrupt Service Routine (ISR) and yes, it had taken notice and to prove it they lit.

Thankfully, I was fully dressed at the time, so couldn’t do the full “I’m Too Sexy For My Cat” dance routine, but this was probably for the best.  There were mothers and small children walking past, and I wouldn’t really have enjoyed explaining ISR’s and LED’s to our friends in blue ‘down the yard’.  Methinks they wouldn’t have quite understood the intricacies of it all.

So, the next step is to neaten up the code then build the first seven segment display board so when the bike wheel clicks, there’s a display you can refer to.

Of course, at first this will just be numbers that don’t actually mean anything, but very quickly -thanks to the math routines embedded within ‘C’- I’ll be able to make it display in Kilometers.

Then its the small matter of providing a speed output, but as that involves using the timers on the PIC, well, that’s for another day I feel.

In the meantime, the Wardian Household tonight is a happy place, and Heaven knows, we need all of those we can get right now.

More soon.

Print Friendly