Recent Posts

Blogroll

                                          My PIC12F683 Development Board
Office Map 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.

Saturday, April 3, 2010

Experiment No. 2: User Inputs from Tact Switches and Software UART

In this experiment, we will demonstrate how to read inputs from tact switches, and then will also show how to send character data from PIC12F683 to a desktop PC Hyper-Terminal program through UART communication. Remember that PIC12F683 doesn't have hardware UART module, so we are going to use the Soft_UART library routines from mikroC for this purpose. Regarding the Hyper-Terminal setup on PC, read this. Besides, to read the user inputs from tact switches, Button Library routines in mikroC will be used.
Snapshots of the required Library Routines from mikroC User's Manual


Setup:
The two switch inputs in our board will be connected to GP0 and GP1 port (Pins 7 and 6 respectively). GP5 (Pin 2) will be used for Software UART Tx. So here is what you need to do:
  • Connect SW1 and SW2 (tact switches) to GP0 and GP1 using jumper wires,
  • Connect GP5 to input Tx of TTL to RS232 Level Shifter circuit,
  • Connect Rx(2) and Gnd(5) pins of a RS232 port to the board.

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