The 12f675 - A Pic Microcontroller Project Guide.

675 is one of the smallest PIC Microcontrollers - it's aYou could also implement a state machine for more
tiny device with 8 pins but it's packed with peripheralscomplex control of the functionality e.g. pressing once
and it even has a built in 10bit ADC which can readmoves to the next dimming level in the current direction
analogue inputs from 4 pins.while press and hold changes the dimming direction.
It has the following internal peripherals:Using a state machine while not trivial lets you control
1. Two timers.complex operation which you could not achieve
2. An analogue comparator.(without a great deal of effort) using discrete
3. 10 bit ADC.hardware - and the advantage of using the
It also has an internal oscillator and internal reset circuit.microcontroller is that if you get it wrong you just re
This means the device uses minimal externalcode your software and test it again.
components to make it work (other devices require anNote: The 12F675 and 12F629 use Flash programming
external crystal oscillator). Of course it also has thememory i .e. they are re-programmable - you can
usual internal programming memory, EEPROM andchange their functionality instantaneously with NO
RAM needed for programming.re-wiring.
Ideas for projects:The only problems are
1. 4 channel volt meter.1. You need to program the device.
2. Multi channel Servo controller.2. You need a programming language.
3. Temperature controller.Programming the Device
4. Inductance meter.Surprisingly you can program the device using the
5. Touch lamp.standard 4 pin PIC serial interface - ICSP (In Circuit
6. Courtesy light time delay.Serial Programming) and with careful design you can
Note: To get data out of the device you caneven connect your programmer to the same pins that
implement a serial RS232 transmit interface to youryour circuit uses.
PC.Programming language
Why use it?The programming language normally recommended is
One reason is that because of its size its easy to putassembler and there are good reasons for using
into restricted spaces e.g. for a model aircraft or modelassembler - e.g. very fast code and smaller final code
trains and it's cheaper than the larger devices.size but I would recommend using a high level
Note: The 12F629 is the same device without the ADClanguage such as Basic or C.
- so it's even more cost effective.This is because for assembler you need to work at
So it's useful in designs that you would not normallysuch a low level that you spend a lot of effort to do
think of using a microcontroller for instance you couldtrivial tasks and this is better left to the high level
make a touch lamp dimmer - Note using thelanguage.
microcontroller means you can make far betterFor the example mentioned setting up and maintaining
functionality than using discrete hardware (and evena state machine would be extremely difficult in
change its programming later on).assembler but much easier in C.
With a lamp dimmer you could have an auto off delayYou can find some of these 12F675 pic projects here
function e.g. if no activity for an hour then turn off.Copyright © John Main 2007 Free to distribute if the
State machinesarticle is kept complete.