Back home   |   Bookmark   |   Start page   |   Site map    
Services
News
Channels
Home & Family
Leisure
Technology
Business
Science
Site Search
Free email




The 12F675 - A PIC microcontroller project guide.

John Main
The 12F675 is one of the smallest PIC Microcontrollers - it's a tiny device with 8 pins but it's packed with peripherals and it even has a built in 10bit ADC which can read analogue inputs from 4 pins.

It has the following internal peripherals:

1. Two timers.
2. An analogue comparator.
3. 10 bit ADC.
It also has an internal oscillator and internal reset circuit. This means the device uses minimal external components to make it work (other devices require an external crystal oscillator). Of course it also has the usual internal programming memory, EEPROM and RAM needed for programming.

Ideas for projects:

1. 4 channel volt meter.
2. Multi channel Servo controller.
3. Temperature controller.
4. Inductance meter.
5. Touch lamp.
6. Courtesy light time delay.

Note: To get data out of the device you can implement a serial RS232 transmit interface to your PC.

Why use it?

One reason is that because of its size its easy to put into restricted spaces e.g. for a model aircraft or model trains and it's cheaper than the larger devices.

Note: The 12F629 is the same device without the ADC - so it's even more cost effective.

So it's useful in designs that you would not normally think of using a microcontroller for instance you could make a touch lamp dimmer - Note using the microcontroller means you can make far better functionality than using discrete hardware (and even change its programming later on).

With a lamp dimmer you could have an auto off delay function e.g. if no activity for an hour then turn off.

State machines

You could also implement a state machine for more complex control of the functionality e.g. pressing once moves to the next dimming level in the current direction while press and hold changes the dimming direction.

Using a state machine while not trivial lets you control complex operation which you could not achieve (without a great deal of effort) using discrete hardware - and the advantage of using the microcontroller is that if you get it wrong you just re code your software and test it again.

Note: The 12F675 and 12F629 use Flash programming memory i .e. they are re-programmable - you can change their functionality instantaneously with NO re-wiring.

The only problems are
1. You need to program the device.
2. You need a programming language.

Programming the Device

Surprisingly you can program the device using the standard 4 pin PIC serial interface - ICSP (In Circuit Serial Programming) and with careful design you can even connect your programmer to the same pins that your circuit uses.

Programming language

The programming language normally recommended is assembler and there are good reasons for using assembler - e.g. very fast code and smaller final code size but I would recommend using a high level language such as Basic or C.

This is because for assembler you need to work at such a low level that you spend a lot of effort to do trivial tasks and this is better left to the high level language.

For the example mentioned setting up and maintaining a state machine would be extremely difficult in assembler but much easier in C.

About the Author
©2006 All rights reserved
You can find some of these 12F675 pic projects here Copyright © John Main 2007 Free to distribute if the article is kept complete. John Main's website best-microcontroller-projects.com/index.htm provides microcontroller resources and free projects which are fully documented including schematics and source code.

  Click here to see related videos
More articles
Graphic car
Electronic waste
Corporate hackers
Powerful Powerpoints
WiFi standards
Microcontroller project guide
Wireless warehouse solution
Becoming e-wasted
Data recover
Build your PC
Privacy protection software
PCs 20 years time
Slowing PC
Notebook for casual user
RAR File Explained
Speed up your computer
Video games
Used computer
Recovering data damaged DVDs
Bluetooth advantages disadvantages
Quotes
Ive always wanted to be a scientist. That way, I could get a bunch of grants and do research into whether money can really buy happiness.
Kyannke.

Ive always wanted to be somebody, but I see now I should have been more specific.
Lily Tomlin

Writers
If you are a writer and want to see your article published at Theallineed.com, just click here to submit.

Info
Today...
In the news...
Economic integration can spur development in Western Asia
Closer economic integration can help the Western Asian region overcome recent conflicts and political tensions and also spur progress towards internationally agreed anti-poverty goals, Secretary-General Ban Ki-moon said today.
How do you prefer your breakfast eggs?
Sunny side up not easy
Sunny side up easy
Boiled
Poached
Scrambled
Other
 
Things to ponder
Why do they put Braille dots on the keypad of the drive-up ATM?

Did you know...
In tennis, zero points is referred to as love, which is possibly derived from the French word for egg, l'oeuf, referring to the physical appearance of the number zero.

Quote of the day
I felt like poisoning a monk.
Umberto Eco

Featured article
Anyone who is keen to watch internet satellite TV channels for free might want to take note that this is entirely possible. The TV bills that pile up every single month can quickly snuff out whatever budget you have set aside for the family.

 
© Lexur