![]() |
||||||||||||||||||
![]()
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() I use
and
recommend Firefox for the best internet browsing experience. Click below for your free copy today: CLICK
THE IMAGE:
Note:
I find it faster
and easier to use and it has great plugins. It even imports all your current browser settings! There's
no risk as your existing browser is not affected in any way - you can just choose which
one to use.
|
|
Useful For You. Readers
comments
|
||||||||||||||||
Beginners guide to the PIC Microcontroller
More Resources...
Part 1 :IntroductionThis guide will show you what a PIC microcontroller is and what you can do with it.First of all what is a PIC microcontroller?A microcontroller is a self contained fully functional computer with built in peripherals.The idea of a microcontroller is that it can stand alone and does not require any other circuitry to do a useful task. Normal processors such as those found in desktop PCs require a multitude of circuitry before you can get anywhere near a useful system. Another important point about a microcontroller is that it is not intended to be a super-duper all singing all dancing mega MIP device it is intended for doing fairly simple tasks that do not require huge amounts of processing power. Note : You can now get DSP microcontrollers which do allow very complex operation at high speed - but these require advanced knowledge of signal processing mathematics. PeripheralsHaving said that a microcontroller is actually extremely efficient for doing fairly simple tasks for the simeple reason that it has built in peripherals.These include such as timers, ADCs, analogue comparators, pulse width modulators, USARTs...and more. Ths is one I find amazig the 12f675 is has only 8 pins (the same as a 555). It has : *Two timers. *One analogue comparator. *10 bit 4 input ADC. *Six usable I/O pins (you need one for power and and one for Ground) *1024 program memory words (program space). *64 Bytes Ram *128 bytes EEPROM *Internal oscillator. *External clock capable to 20MHz *ICSP port. Phew - just compare that to a 555 = 1 comparator! Note: A 12F675 tutorial is available on the site. Actually the 'simple tasks' are only simple in comparison to the computing power of a PC. In reality the microcontroller is ideal for tasks that require low level hardware control. These ready-to-use peripherals save you from having to wire up extra circuitry all you have to do is program the internal peripheral to configure the microcontroller for your application.
More Resources...
Project examplesExamples of what you can make using a microcontroller are:*Inductance/Capacitance meter. *Ultrasonic range finder. *Universal Infrared controller. *Frequency counter. *X10 home automation controller. *Metal detector. *Home security alarm. *Servo controller. *Dot matrix led controller. *Binary clock. *Seven segment Digital clock. ...and many more... ... In fact the list is endless because you can make up virtually any electronic project you can think of and... ...a microcontroller makes it easy. The website and this guide focus on only a few microcontrollers in the PIC range since all PIC devices share common internal peripherals (so learning about a peripheral means you have learned the peripheral for all PIC devices): 12F675 - 8 pin. 16F88 - 18 pin. 16F877 - 40 pin. Note: Sometimes there are small differences - so check the data sheet - but in general the peripherals are identical across the same range of devices. Structure of a microcontrollerCPUAll microcontrollers have a Central Processing Unit (or CPU) and this is responsible for taking the data, processing it and spitting out a result.For the PIC microcontroller mid range devices (16F) the processing block is 8 bits wide so the microcontroller works only with data having 8 bits in it. MemoryPIC Microcontrollers have three types of memory:
Memory ArchitecturePIC devices use a Harvard architecture which simply means that Data memory and Program memory are entirely separate.The idea is that you can get a speed improvement by storing the program and the data in separate memory sections because you can retrieve data from both sections at the same time. For a von-neumann architecture (where the same memory is used to store program and data) the processor has to fetch the program instruction and then fetch the data so it works more slowly. For this reason you will see references to the PIC saying it has 12bit or 14bit architecture etc. - this refers only to the program memory - all you really need to know is the data memory size as this is the fundamental unit that the microcontroller operates on - it's usually 8 bit. Program memoryProgram memory is based on Flash technology (this is the 12bit or 14bit spec.). This is non volatile memory which stores your program instructions.Note: non-volatile means that it keeps its contents even when the power is turned off so it's ready to go as soon as power is applied. This is also the memory that you program using an external programmer (using the PIC ICSP port) and programmed from a PC using the programming software e.g. ICPROG. Data memoryData memory is simply memory based on SRAM technology. This type of memory retains its values only while the power is on.Unlike Flash memory you can easily change the values stored in data memory while the program is running. So you can create counters to store the number of events detected or temporarily store the intermediate result of a computation. This is memory that stores changing data i.e. you store variables in Data Memory. EEPROM memoryEEPROM memory is another data store - it's a cross between the program memory and data memory. You can store any data in it and retrieve any data from it - but it takes more effort to store and retrieve data.This is because it is also non-volatile just like the flash memory but under program control you can change the stored values just like data memory but when the power goes off it keeps the stored values. It is Electrically Erasable PROM : Non volatile Data Memory. Note: Newer devices let you alter the program memory itself - which is why bootloading is possible. EEPROM usageFor a normal program you would use EEPROM to store program settings that you need to keep between power cycling of the device.For example if you had designed a programmable power supply you would want the microcontroller to remember the last voltage so the unit powers up to the same voltage at the next session.
More Resources...
Next time... ... Ports - Using microcontrollers to communicate with the 'real' world. Whats the best way to learn how to use a microcontroller?... ...It's to learn by doing! Build up your circuits, create programs for them, program the chip and see your project fly. If you have not built your own circuits before and want to learn how to use PIC microcontrollers by programming them in C then: This course teaches you C programming by giving you fully developed (and debugged code) which you will see running on your own hardware. Try it risk free. P.S This course is for you if you want to start the right way using PIC Microcontrollers. |
||||||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||