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.
|
Recent Posts
Blogroll
My PIC12F683 Development Board | |
Circuit diagram for each experiment may not be available separately because they are conducted with PIC12F683 development board that I made. So, the readers should first see the schematic of my development board. |
Monday, September 27, 2010
Serial LCD for Low Pin-Count PIC Microcontrollers using 74HC595 Shift Register
Introduction
Labels:
74HC595,
mikroc,
PIC12F683,
Serial LCD
Saturday, September 25, 2010
Experiment No. 6: PIC12F683 Timer1 used as a Frequency Counter
Objective: Determine the frequency of an external clock source (0-65535 Hz), send it to PC through serial port, and display it on a hyperterminal application window.
Introduction
The Timer1 module in PIC12F683 is a 16-bit timer/counter. It can operate as Timer or as a synchronous/asynchronous counter. In asynchronous mode, the Timer1 will increment at the arrival of each external clock pulse at T1CKI port. Whereas, in synchronous mode the input clock pulse to Timer1 module is synchronized to the microcontroller internal clock. A dedicated control register, T1CON, is available to set-up and control the Timer1 module. We are going to use the counter feature of it to measure the frequency of an external clock source. The Timer1 register pair (TMR1H:TMR1L) increments from 0000h to FFFFh and rolls over to 0000h. When Timer1 rolls over, it indicates timer overflow by setting Timer1 interrupt flag (TMR1IF) bit of PIR1 register. To enable the interrupt on rollover, following bits must be set:
Introduction
The Timer1 module in PIC12F683 is a 16-bit timer/counter. It can operate as Timer or as a synchronous/asynchronous counter. In asynchronous mode, the Timer1 will increment at the arrival of each external clock pulse at T1CKI port. Whereas, in synchronous mode the input clock pulse to Timer1 module is synchronized to the microcontroller internal clock. A dedicated control register, T1CON, is available to set-up and control the Timer1 module. We are going to use the counter feature of it to measure the frequency of an external clock source. The Timer1 register pair (TMR1H:TMR1L) increments from 0000h to FFFFh and rolls over to 0000h. When Timer1 rolls over, it indicates timer overflow by setting Timer1 interrupt flag (TMR1IF) bit of PIR1 register. To enable the interrupt on rollover, following bits must be set:
- Timer1 interrupt enable (TMR1IE) bit of PIE1 register (PIE1 = 01h could do that)
- PEIE and GIE bits of the INTCON register (INTCON = C0h could do that)
My 555 Timer IC Experiment Board
Subscribe to:
Posts (Atom)
Online Embedded Systems Lab
This online laboratory teaches you the fundamentals of microcontroller-based embedded system development through a series of laboratory exercises. Most of the time, students and hobbyists could not afford expensive development kits and software to learn these things. These tutorials are prepared such that you will be building microcontroller projects at a minimum cost. Check this out |