PIC

Julian on April 14th, 2010

Too great a compromise. That’s the upshot of trying to use two 5.6 volt zener diodes in series instead of a single 9.1 volt diode. The 9.1 volt has a completely stable reverse voltage over a wide range of current. The 5.1 and 5.6 volt zeners are completely different and have a non-linear current/voltage relationship. [...]

Continue reading about Zener Zeitgeist (continued)

Julian on March 16th, 2010

This program uses Timer0 and the PICs interrupt system to flash an LED connected to GP2 on the PIC 12F683. The program uses a special kind of subroutine called an interrupt service routine (ISR), but there’s no ‘call’ instruction anywhere in the code. Instead, the subroutine is called by the PIC hardware by enabling interrupts. [...]

Continue reading about 12F683 Flashing LED using Timer0 and interrupts

Julian on January 21st, 2010

While I was looking for a solution to the EMC issue, I thought about turning the regular 122Hz PWM frequency into something more like white noise. The idea was to spread the spectrum of the emmited radiation so that at any one frequency, the signal would be weaker. It didn’t work. The intended effect was [...]

Continue reading about Fibonacci

Julian on December 13th, 2009

This program is a bit of a novelty, it uses the PIC’s watchdog timer to flash an LED. It’s probably the least sensible way to make an LED flash, but it illustrates some interesting features of the 12F683 microcontroller. A few things to note. We intentionally don’t use the CLRWDT instruction, we want the WDT to timeout and [...]

Continue reading about 12F683 Flashing LED using watchdog timer

Julian on December 7th, 2009

The PIC 12F683 has 3 timers, Timer0, Timer1 and Timer2. Timer0 is an 8 bit timer with an 8 bit prescaler and is currently being used to drive the LED pattern generator. Each time Timer0 overflows, a register called ‘pattern’ is incremented and analysed to determine whether the LED should turn on or off. These [...]

Continue reading about 12F683 Timers

Julian on September 6th, 2009

This is the regulator circuit that generates 5 volts for the PIC microcontroller.  The 1N4001 diode decouples battery voltage Vbatt from the regulator circuit. The various capacitors provide smoothing and decoupling to provide the microcontroller with a clean stable power supply. A 100n capacitor is connected as close to the PIC supply pins as possible. [...]

Continue reading about 5 Volt Regulator

Julian on August 31st, 2009

Gotta watch these PICs, they’re out to get you! Think I’ll flash an LED on GP0. Let’s see… bsf GPIO,0 call delay bcf GPIO,0 call delay Hmm, doesn’t work. That’s because GP0 hasn’t been defined as an output. OK… bcf TRISIO,0 bsf GPIO,0 call delay bcf GPIO,0 call delay Hmm, still doesn’t work. That’s because TRISIO [...]

Continue reading about PIC Gotchas

Julian on August 11th, 2009

Another consequence of having the FET on the high side of the load is that we need a high voltage supply to drive the FET gate. In previous tests, it was found that the FET would turn on with as little as 4.5 volts on its gate (with respect to its source), but the datasheet [...]

Continue reading about Charge Pump

Julian on August 10th, 2009

Here’s the circuit  for battery voltage measurement. The zener diode (1N959B) drops 8.2 volts off the battery voltage to bring it closer to the 5 volt range that the microcontroller A/D converter can measure. The potential divider provides a further reduction and defines the maximum measurable battery voltage. The 1n5 capacitor smoothes out ripples caused by PWM [...]

Continue reading about Measuring Battery Voltage (revisited)

Julian on August 10th, 2009

Centre stage is the PIC12F683

Continue reading about Vero Prototype

Google+