Wednesday, August 26, 2009
1. Programming a PIC Microcontroller: A Short Tutorial
The purpose of this document is to provide a simple, easy to use tutorial on programming PIC microcontrollers. The tutorial begins with instructions on selecting a specific PIC and ends with directions for breadboarding the microcontroller. CLICK HERE to download the complete PDF.
2. Making a Simple PIC Programmer
In this tutorial we will make a simple serial port based programmer for PIC microcontrollers. I have tried several easy to make programmers and software, and here I a presenting the programmer that worked the best. CLICK HERE for details.
3. PIC microcontrollers, for beginners too (Online Free, author Nebojsa Matic)
PIC microcontrollers : low-cost computers-in-a-chip; they allow electronics designers and hobbyists add intelligence and functions that mimic big computers for almost any electronic product or project. The purpose of this book is not to make a microcontroller expert out of you, but to make you equal to those who had someone to go to for their answers. Book contains many practical examples, complete assembler instruction set, appendix on MPLAB program package and more...
Thursday, August 13, 2009
Continued from previous part.
11. An IC Tester : A universal IC tester is very difficult to make but one can build a digital IC tester for one or few groups/families of digital ICs, such as standard CMOS gate ICs, ADCs, Decoder/Encoder ICs, etc. The idea is there will be a ZIF socket to hold the test IC, an input interface to select the IC family/number, and a display device to show the result. Some sort of automatic detection of the test IC family can also be implemented.
12. Home Appliances Control Through PC : You can control and monitor the various household appliances using a microcontroller interfacing with a PC. The microcontroller will communicate with the PC to receive user inputs as well as to supply the status of the appliances to PC. The software running on a PC will record all the activities and send the report through email to a remote user. The user can also set timers for individual appliances to turn ON and OFF. This project can be slightly modified so as to use as a Electric Power Management in Hotels. The customers often don't care to turn OFF the fan and lights in the room while leaving. With this system, the lights and fans in hotel rooms can be switched OFF from the main counter while there is nobody in the rooms.
13. Microcontroller Based Frequency Meter : Make a frequency meter using a microcontroller that measures the input signal frequency and display on a LCD screen.
Saturday, August 8, 2009
1. Finger Print Based Car Ignition System : Your vehicle can be easily driven away by someone who manages to get access to the keys. The fingerprint based ignition, therefore, provides a wonderful solution to the above problem.
2. Home Appliances Control Through PC : You can control and monitor the various household appliances using a microcontroller interfacing with a PC. The microcontroller will communicate with the PC to receive user inputs as well as to supply the status of the appliances to PC. The software running on a PC will record all the activities and send the report through email to a remote user. The user can also set timers for individual appliances to turn ON and OFF. This project can be slightly modified so as to use as a Electric Power Management in Hotels. The customers often don't care to turn OFF the fan and lights in the room while leaving. With this system, the lights and fans in hotel rooms can be switched OFF from the main counter while there is nobody in the rooms.
3. Microcontroller Based Frequency Meter : Make a frequency meter using a microcontroller that measures the input signal frequency and display on a LCD screen.
4. Ultrasonic Range Finder : Transmit ultrasonic signal and measure the time interval between the transmission and returned echo signal to determine the distance travelled. Display the range on seven-segment displays or LCD screen.
5. Patient Monitoring System : Build a system that monitors the temperature and heart beat of a patient and the data collected by the sensors are transmitted wirelessly to a remote display located in a doctor's room. Switch on an alarm if there is any abnormality in body temperature or hear beat rate.
6. PC Based Running Message Display: Use your PC to input the text to a running message display. Use a microcontroller as a communicating medium between the two. You can either make your own LED Matrix Display (that requires some hard work) or these days you can buy ready made display.
7. A Microcontroller Based Thermostat: Design a thermostat using an Atmel or Microchip microcontroller that computes the current temperature every second and then send an on/off signal to a heating device which would then regulate the temperature to a desired target temperature. In addition, you can also keep a time of day clock, as well as record the maximum and minimum temperature values that have occurred. Use a LCD for display and a Keypad for user input to make your project more user friendly.
7. A Spectrum Analyzer: Spectrum analyzers are used to determine the frequency contents of an arbitrary input signal. Such a system can be developed with a microcontroller if you have enough knowledge about digital filtering techniques. You can sample the input analog signal and convert it to digital and then pass through various bandpass filters to determine the spectral information. You can find a similar project here.
8. An Autonomous Car: This one is a very popular robotic project. Use various optical sensors on a toy vehicle to make it follow a line on floor. You can find a lot of information regarding this project on internet as this is not the first time being done.
9. Two Way Laser Communication System: Laser communication is a wireless transmission of information by modulating a laser beam. Laser communications systems can be easily deployed since they are inexpensive, small, low power and do not require any radio interference studies. However, laser communication requires line of sight between transmitter and receiver. You can demonstrate by transmitting your vocal through atmosphere using laser beam, or by transmitting data through a PC to another PC.
10. Home Security System: Design a digital home security system that monitors your house when you are not present. Use temperature, smoke and motion sesnors to detect possible fire or break in attempt and inform the home owner by automatically dialing his cell number and playing a pre-recorded message regarding the type of event happened.
This project is a clock that displays the time and date on seven segment led displays. Two buttons are used to set the time and date. The program takes care of changing the date and keeping track of leap years. It is recommend all displays are purchased at the same time otherwise a difference in brightness may occur. The downloads below contain project documentation, circuit diagram, 'C' program and Hex code. The Hex code can be used to program the PIC without a compiler. The 'C' Program contains time compensation which corrects for differences in crystals etc. This should be used as you can change the value to match your project. MORE...
6. A Simple Metal Detector
This is one of the simplest metal detector with just six components. This uses 8 pin PIC12F683 microcontroller. More...
7. Solar Recorder
Build a simple data recorder for solar energy lab. The Recorder uses a calculator solar cell as the input sensor and a Multimedia Memory Card for nonvolatile data storage. The device was built with a PIC18F458 and the 128MB Multimedia Memory Card, MMC. The solar radiation is measured by a calculator solar cell. The PIC chip interfaces the MMC using SPI mode. More...
Tuesday, July 28, 2009
I have selected these projects out of hundreds on the basis of their completeness, explanation detail, and uniqueness.
1. An Alarm Clock Based on PIC16F84A
2. PIC16F628 Based Frequency Counter
3. Digital Thermometer
Saturday, July 25, 2009
1. MCUMALL (www.mcumall.com)
I exactly don't know where they are located but last month I ordered a PIC programmer and it was shipped from China. They have a wide variety of PIC programmers online ranging from $17.99 to above hundred, depending upon your requirements.
(i) PRG-022 Enhanced JDM PIC programmer
The cheapest one is PRG-022 Enhanced JDM PIC programmer. It is the most popular JDM type PIC programmer that comes with a RS232 cable and a link to download necessary software. However, this product does not work on Windows Vista. It has on board ICSP Header that let user program the chip In-Circuit. The price for this product, as mentioned on their website is $17.99.
(ii) PRG-017 USB PIC programmer
This is a low cost USB based PIC programmer that can be used in Windows Vista platform too. It acquires power from the USB port itself, and works on laptop which has no RS232 serial port. This can program a wide variety of PIC devices. The complete list can be found on the website. The price for this item is $24.99 on their websites, and it comes with a link for software and a USB cable.
2. Softworld (http://www.alibaba.com/product/pk105521569-105221534-0/PIC_Programmer.html)www.alibaba.com and they are located in Pakistan. This programmer supports a wide variety of 16F and 18F PICs. An Excellent Offer to Hobbyists and Students!
3. iCircuit (www.piccircuit.com)This is another cheapest PIC programmer I have seen on web. It does not come with any ZIF socket. It is an In-Circuit Serial Programming (ICSP) with USB interface with PC. It can be used for programming the popular Flash PIC MCU, includes PIC10F, PIC12F, PIC16F and PIC18F family, and it does not require any additional power supply. It supports both Windows XP and Windows Vista. The cost is only $15.00. If you are willing to pay $22.00 you will get both the ICSP programmer and 40 pin ZIF adaptor.
4. FUTURLEC (www.futurlec.com)
This is an online electronic store and they sell wide range of electronic components: from tiny LEDs to microcontroller development boards. I had made two deals with these guys a couple of months ago, they have really very low prices of electronic components. But I would say they are little bit slow in their shipping, but the prices are great.
If you go to Boards -> Programmers section on their website, you will see this product. They mention the price for this product $59.00. It has two ZIF sockets so as to program 8-40 pins PIC microcontrollers. It derives power from USB port, no external supply is required. In-circuit programming is also available with a wide range of adapters (sold seperately). It comes with a Windows version programming software.
This is a PIC development board that comes with a PIC18F458 microcontroller pre-installed with all the necessary support components included. It has a large breadboard area for additional circuitry and testing. All the input/output ports are available through female header pins. The power supply is not included and need to be purchased seperately. If you have purchased a PIC programmer seperately, this item will be very useful to start developing PIC projects without much discomfort. The price for this item is $30.90 online.
5. KEE Electronics (www.keeelectronics.com)
The physical location of this store is not mentioned on web (most possibly in China), but they have four varieties of PIC programmers, all under $50.00.
(i) ICD2.5 Debugger with PIC Programmer ($49.95)
(ii) PICkit 2 Development Programmer/Debugger ($38.00)
(iii) USB Microchip PIC Programmer ($34.00)
(iv) USB Microchip PIC Programmer (JB3 Chip Burner) ($37.00)
Please visit the website for detail specifications of these products.
6. Total Project Solution (www.onlinetps.com)
TPS is an Indian based company that sells a serial port PIC programmer for IRs 700.00 (equivalent to $18.00 approximately). It can program more than 150 different PIC devices from 8- to 40-pins. It does not require any external power supply and it comes with a software CD and a RS232 cable. Students and hobbysts from India, Nepal, Pakistan, and Bangladesh may save shipping time and cost with this purchase if they are looking for a simple and low cost PIC programmer.
Shopping on ebay has become very popular these days, as the prices are comparatively cheaper on ebay stores. You can find a large number of stores on ebay selling PIC programmers. I have listed the names of few stores where you can find PIC programmers at a good price.
(i) QLS_Microchip pic mcu/mpu tools
(ii) Stella Collectible and Electronics
(vi) sivava store
Friday, July 24, 2009
How it differs from a Microprocessor
Microcontrollers are special-purpose computer systems, usually programmed to perform a single task. However, a microprocessor is tasked to perform a wide variety of functions. For example, a microcontroller in a traffic light control system is dedicated to timely switch ON and OFF the various switches so as to allow smooth traffic flow. On other hands, a microprocessor inside a desktop computer can do a wide variety of jobs depending upon the user inputs. As a matter of fact, a microcontroller has a built in microprocessor too that executes the instructions loaded in its memory.
Example of microprocessors: Intel 8085, 8086, Pentium, etc
A microcontroller can do nothing without it is instructed to do something. The instructions can be loaded into its memory so that it could execute them repeatedly and perform the task it is supposed to do based on those instructions.
Most of the modern microcontrollers have Flash EEPROM to store the instructions. It means you can erase the old instructions and reprogram. You need a programming device to do this. There are many companies who build these programming devices. A few websites where you can buy microcontroller programmers are listed here:
You can find many more on google search.
Additional features of Microcontrollers
Microcontrollers are available with extra features such as analog-to-digital converters (ADCs), watchdog timers, controller area network (CAN), and so on. With an inbuilt ADC, you can directly connect an analog input to the microcontroller. Similarly, a watchdog timer is a piece of hardware that can be used to automatically detect software anomalies and reset the processor if any occur.
A typical example of how microcontroller work?
Source : http://www.maxim-ic.com/products/microcontrollers/designers_overview.cfm
Let's examine how a microcontroller functions while cooking a bag of popcorn in a microwave oven.
You open the door and put the bag of popcorn inside. You close the door and push the button labeled "Popcorn." A few minutes later, a tone announces the popcorn is done. What happened behind the scenes?
When you opened the door, the microcontroller sensed the door switch, turned on the light and disabled the magnetron. The microcontroller continually scans the keyboard. When you pushed the "Popcorn" button, the microcontroller confirmed that the door was closed and began to count timing pulses, started the motor for the turntable, set the power level of the magnetron, and controlled the display. When the timer reached zero, the microcontroller shut down the magnetron, stopped the turntable, and signaled you.
Wednesday, July 22, 2009
What is a Microcontroller?
A microcontroller is a complete computer system on an integrated chip, typically combining a Central Processing Unit (CPU), memory units (RAM, ROM), and I/O ports so that they can function as a tiny, dedicated computer. The input ports are used to detect action by a user or read input from attached sensors (e.g., light, heat, motion sensors), whereas the output ports are to display the results (on LEDs, LCD Display, Monitor, etc) of processing based on the inputs, or to take any actions (like switching on/off devices, send messages to remote stations, etc). In the physical sense, the I/O port relates to metal pins on the part package that are used to connect to other circuitry in the system. Microcontrollers usually have just a few I/O pins, as few as 8 or as many as 100.
Microcontrollers are everywhere.
Microcontrollers have become common in many areas, and can be found hidden in many categories of products like home appliances, computer equipments, automobiles, etc.
A microwave oven with a LCD screen and a keypad contains a microcontroller. Microcontrollers are used in running the traffic light at an intersection. In automobiles, the engine, the anti-lock brakes, the cruise control, and so on, are all controlled by microcontrollers these days. From the simplest gadgets, like digital cameras, cell phones, printing machines etc, to highly sophisticated satellite and rocket missile systems, the microcontrollers have become ubiquitous.
How does a microcontroller look?
Figure 1(a). PIC16F628 microcontroller
Figure 1(b). Pin description of PIC16F628
Figure 1(a) above shows a 18 pin microcontroller named PIC16F628, manufactured by Microchip company. The metal pins are Input/Output and power supply pins. The description of the various pins of PIC16F628 is shown in Figure 1(b). You don't have to understand the detail functions of these pins at this point. Just move ahead.