I'm currently sitting at my desk with a flashing LED in front of me. This is the first bit of hardware I've successfully programmed. It's taken me years to get to this. My first programmed chip-thing!
Trying to get a flashing LED to light up on a micro-controller is probably the most common first program attempted by new programmers. But it's a big deal for me for a few reasons. It's a first step towards making my own custom hardware for my digital cinema camera rig. I have attempted some pic programming before, but as I'll explain below, this never got off the ground for me until just this past week.
But firstly, what's it for?
I'm working on a small program with an 8-pin chip, to set off the camera recording. In essence, it's a digitally encoded record button. But it has a little more functionality than a plain switch. I've got a tally light and a switch that allows me to toggle how the record button operates. One setting will mean one press to start recording, and another press to stop. While the other setting is a hold down to record, lift to stop.
I've designed the record trigger like this because my camera rig is made to be for a solo operator. So I've made a run and gun handle with a trigger to fire the record button. I'll post more about the handle another time.
For now though, the idea is to not have to use the record button on the side of the camera to start recording, or buy expensive external handles just to set it off. I want to be able to start recording without having to take my hands off the grip. It's a convenience and functional thing.
While nothing special in the world of hardware programming, it's a relief to finally have made the starting step for myself. I've had nothing but problems with getting an LED to flash. It turns out, for years, the programmer wasn't delivering enough power to run the chips properly. I don't know if there's a problem with my device, or it's just how it is. But it meant the chips would never work correctly and did funny things. Not knowing enough about chip programming, I could never figure out why. It frustrated me to no end, and I didn't know anyone who could help me.
I went into a local electronics place last weekend after having another go at it with a new breadboard and chip. I bought an external power board as a last ditch effort (finally thinking it was a power problem), plugged it into the breadboard and it didn't work. Not at first. Because I then discovered I had a blown LED!!! Dear-o-dear, it never rains, it pours. After spending a few hours searching on what was going on, I finally tested the LED to see that it didn't work, so I swapped it out for a new one - and woot! It worked! Couldn't believe it. Years and years and all I needed was a $9 circuit board and a new LED.
Now I can flash LED's on the press of a button. I still need to figure out how to read the tally signal from the camera, that's the next step. But at least we're underway - properly this time!