Skip to main content

Posts

Showing posts with the label PIC12F683

Digital Voltmeter using PIC12F683

This is a digital voltmeter project based on PIC12F683 microcontroller. It measures and displays input voltage from 0 to 20V with high accuracy. You cannot feed 20V directly to PIC port, so a simple resistor divider network is used for this purpose. A 5.1V zener diode is used to prevent any damage to PIC port in case the input voltage goes way above 20V. Since PIC12F683 does not have sufficient pins to drive a LCD, 3-wire serial discussed before is used to display the measured voltage.

Make your own Serial LCD for PIC Microcontrollers

HD44780 based character LCD displays are very popular among hobbyists. They are easy to interface with microcontrollers and most of the present day high-level compilers have in-built routines for them. However, the bad part is at least 6 I/O pins of microcontroller are required to use them in your project. Therefore, they are not applicable for 8-pin devices like PIC12F series microchips. The aim of this project is to allow LCD interfacing to such devices using 3-wires. I am going to demonstrate this with PIC12F683 microcontroller. The character data or command from the microcontroller will be transferred serially to an 8-bit serial-in parallel-out shift register (74HC595), and the parallel output will be fed to the LCD driver pins.

Using PIC Timer1 Module for Counting Frequency of an External Clock Source

The Timer1 module inside PIC12F683 is a 16-bit timer/counter. If used as an asynchronous counter, this module can be used for counting the frequency of an external clock source applied to its GP5/T1CKI port. The following example is a 0-65535 Hz frequency counter using Timer1 module of PIC12F683. The Timer1 module is reset first and then turned ON for 1 sec to count the clock pulses arrived at its T1CKI port during that period. The number of pulses arrived in  second is frequency itself. The measured frequency value is sent to PC through serial port and displayed on a hyperterminal receiver window. If the external clock frequency is over 65535 Hz, Timer1 overflows and an interrupt is generated. In case of the overflow, "Frequency out of range " message is displayed on the window. A 555 Timer IC running as an astable multivibrator is used as the external clock source.

A tiny Temperature Data Logger using PIC12F683 and DS1820

For past few days, I have been working on a PIC12F683 based temperature data logger. I just finished this project and the product is available on my PIC12F683 blog page.This is how the finished product looks like. It reads temperature values from a DS1820 sensor and stores in its internal EEPROM. It has 3 selectable sampling intervals (1 sec, 1 min, and 10 min). Three tact switches provides 7 functions, and this runs with 3  AAA batteries. It can be interfaced to a PC through serial port, and also has an ISCP header for firmware upgrade.

External Interrupt Demonstration with PIC12F683

PIC12F683 has got one external interrupt input which is edge triggered. If you want to learn how to write an Interrupt Service  Routine (ISR) using mikroC compiler, check this out. When an interrpt arrives, the PIC12F683 displays the interrupt arrival information as a part of ISR on a windows PC hyper-terminal through software UART.

Using ADC in mikroC

With mikroC built-in library, use of ADC on PIC microcontrollers has become more simple. PIC16F628A doesn't have in-built ADC in it, so I am going to demonstrate this with my PIC12F683 development board. The analog input will be given through a potentiometer, and the 10-bit digital output will be displayed on a hyperterminal window on PC.

PIC12F683 Development Board

I have recently made a new PIC development board for PIC12F683. It is an 8-pin microcontroller with a lot of good features including 10-bit ADC and PWM. The development board has following features: 1. A Regulated +5V power supply. 2. 3 Red LED outputs which can be connected to any GPIO pins using jumper wires. 3. An ON/OFF power supply switch. 4. A Green LED as a power ON indicator. 5. An 8-pin IC socket for PIC12F683 microcontroller. 6. Two potentiometers: one for providing Vref, and other for simulating analog input to ADC. 7. An ICSP header connector. 8. Two tactile switches for input operation. 9. A TTL to RS232 level shifter using a transistor circuit. 10. A piezo buzzer. 11. A DC motor with driving circuit. 12. Access to individual pins of PIC12F683 through female header pins.