
Microtronics Pakistan | www.electronicspk.com| PIC Lab II Manual [4]
The infrared –Sensor can be enabled or disabled using DIP-Switch 3.
Push Switches
There are five push switches available on board. These switches have all 10K pull up resistors and will be
active low. Therefore when switch is not pressed the associated microcontroller pin will read a logical high
or 1. when switch is pressed, it connects the pin to ground thereby giving a Low state or logical 0.
The switches are named as SW3—SW7
The PORT Pins connected to these switches is as below:
Reset Switch (MCLR)
Reset switch is located on the right hand corner and labeled as RST. When pressed the switch gives a logi-
cal 0 to MCLR pin of microcontroller, which is reset, and starts the software from beginning. All RAM data
is cleared. EEPROM is preserved. Timers are cleared. The Reset switch is specially useful, for boot-loader
programming.
I2C EEPROM (PORTC.3, PORTC.4)
I2C communication bus is very commonly used in electronics devices. More and more devices are coming
up with I2C protocol support. The board contains an EEPROM Chip, (24c08) which is 8K EEPROM. This
chip is attached to microcontroller using PORTC.3 and PORTC.4. The 40 pin, PICs have these pins at-
tached to internal hardware of I2C communication. PORTC.3 is SCL and PORTC.4 is SDA. Due to built in
I2C communication hardware, the software overhead is very much reduced.
The I2C bus contains 10K pull-ups on both SDA and SCL pins.
EEPROM is placed on an 8 pin base, it can be removed and another one inserted, if more memory is re-
quired. The EEPROMs have three address pins, which can be used to connect many more EEPROMs in
parallel. The board has however given this a permanent address of 000 . The I2C code for EEPROM is
1010. next three bits would be EEPROM chip address, and last bit is direction. Therefore the complete ad-
dress to write on EEPROM would be: 1010 000 0 and to read it would be : 1010 000 1
I2C BUS (Connector)
The board also provides an I2C Bus as a connector, which contains connection for SDA and SCL pins
along with Power for daughter boards. The bus connects directly to PORTC.3 and PORTC.4 which are
hardware driven I2C pins. Keep it in mind that these pins have associated 10K pull up resistors already at-
tached. In case these pins are being used for some other application this fact must be kept in mind.
USART (PORTC.6, PORTC.7)
The board contains a standard universal Serial Asynchronous receiver and transmitter. Many devices use
this protocol to communicate with other devices. The communication is hardware independent, and just
needs two wires, on for transmission and one for receiving data. PCs and some other devices, use a level
translator, to redefine the standard signals for logical 0 and 1. this is done so, to minimize noise interference
as well as prolong communication distance. To use these signals, they must be converted back to TTL level
logic. The PIC-Lab-II board contains Rs-232 level converter which converts these signals to TTL level, and
to transmission levels while sending data. Most PIC microcontrollers contain an internal hardware to man-
age this communication, so that software development becomes easy. PORTC.6 and PORTC.7 are config-
Switch
PORT Pin
Comments
SW3
PORTE.0
DIP-Switch 4 to enable / disable
SW4
PORTE.1
DIP-Switch 5 to enable / disable
SW5
PORTB.0
PORTB.0 is also external interrupt, DIP SW-6
SW6
PORTE.2
Dip Switch 7 to enable / disable
SW7
PORTA.4
PORTA.4 is also external clock input for timer 0.
DOP Switch SW 8 to enable/disable