Home
PIC Lab-II Manual
Contents
1. to assure a constant supply of 5V we recommend a power source more than 5V The recommendation is 9V at least 300mA load If you are going to drive an external load through the board like motor or LEDs etc make sure that the supply current is appropriate In that case we recommend 9V 12V DC adapter 800mA to 1000mA The adapter must have center pin supplying Positive Reverse polarity is checked however There is a blocking diode which will not allow the reverse polarity to reach the board There is an On OFF switch and a Power ON LED indicator The Voltage regulator IC 7805 is rated as 1A and gets heat up if heavy load is put on it or if a voltage adapter of more than 9V is used The regulated is fitted with commercial heat sink The Microcontroller The board contains a socket for 40 Pin PIC microcontroller Board comes with standard PIC 16F877A mi crocontroller However if you want to change lets say to 18F452 simply take the IC out of socket and in sert the one of your choice The Oscillator Circuit The oscillator circuit consists of a crystal oscillator and two 22pF capacitors The crystal oscillator is not fixed soldered rather there is a base into which it can be inserted The board comes with 20MHz crystal however if you want to change this to another frequency just pull it out and insert the new one PIC 18F series are capable of multiplying the clock frequency by 4 to generate an internal high frequency oscillator Th
2. A A AC a C4 22p sw2 PI U 2o OSCI CLKIN OSC2 CLKOUT MCER VPP ROU TOOSO TICKI RAO RCI TOOSI sel E ef FS el B ed RAI RC2 CCPI 5S RA2 RC3 SCK SCL sh alee el RAS RCA SDISDA RAA TOCKI RCS SDO RAS SS RC6 RBO INT RC RBI RDO PSPO RB2 RDI PSPI RB3 RD2 PSP2 RB4 RD3 PSP3 RBS RD4 PSP4 RB6 RDS PSPS RB7__ RDO PSP6 m REORD RD7 PSP7 VDD REI WR REZ CS Y 1 iD EE 2 vop PIZOI U6 2 5 OK i AOVCC x 5 aa 3 A1 we 6 A2SCL RO 3 3 ICSP RAF 10K G SDA 10K 2304 J10 IRI RAG A IRE pen 1 2 E E ni E E DCBUS n2 VDD TOocki I4 13 RG PWM VDD is C828 RAL RAO RCH 5 RC 2 2 3 2 3 3 4 3 VDD VDb ANI vVDD ANO VDD VDD c lc adata a lu VDD s E VDD or6erana 8 afoj R4A RAB RAC RAD RAE EAE AAA EI e 1 MAX232 U3 10K 10K 10K 10K 10K a 13 RU ser profi eofa Sarai 2 T20UT RIN 78 RN ESI nc 7 RIIN m fey EM 1 TOUT dose o se swap sws SW IPL Lace EE R2IN RCo 7 TOUT ENABLE o T2IN T20UT A E 3 TOUT T 3 4 C6 3 4 5 6 7 oF Cj y C A C eil 1 of A ci c 10u A p 3 a DB 4 SW3 REO SW4 REL SWS RBO SW6 RE2 SW7 RA4 SIS mms EIS VDD 1 2 3 4 6
3. I IC T OCI VIII 2 I ANISCALII PIC Lab ll Motherboard a ed rit ai SAN e 2002 3 E L 22 I1 Abd jJ 1049 TB jt a Li L Li LI TL NOL MIBOLIUIHEEBTA lenny Sar Ter C hia SOT Ld T DOE TESI NIIT L al L User Manual Microtronics Pakistan www electronicspk com Microtronics Pakistan www electronicspk coml PIC Lab II Manual 2 ongratulations on purchase of PIC Lab II development board The board supports most com monly used 40 Pin Mid range PIC microcontroller units and has on board many commonly used peripheral devices All I O lines are available through separate well marked headers for daugh ter boards or projects Every I O line group is provided with a set of power supply so that the daughter board can be powered up from the motherboard Salient Features of Board e Socket for 40 Pin PIC Microcontrollers 16F87x 18FXXX e Changeable Crystal Oscillator 20MHz standard e 5 Push Switches e 1 16x2 Character LCD e USART RS 232 Module e 2C EEPROM e 1 PIZO Buzzer e In Circuit Serial programming Debugging Support e 8 LED indicators e 38KHz Modulated Infra Red Sensor e Connector for two Analog Inputs e Connector for Hardware driven PWM e Connector for TOCKI e Connector for I2C Bus e All I O lines available through Headers e On Board regulated 5V 1A power supply Power Supply The board uses 5V regulated power supply in order
4. based upon HD44780 controller Commonly used is 16x2 character LCD The module uses 4 bit mode in which the highest 4 bits of PORTD are connected to data pins of LCD PORTD 2 is connected to Enable Pin and PORTD 3 to RS Pin of LCD Thus following declarations must be used before initializing the LCD Proton Basic LCD DTPIN PORTD 4 LCD RSPIN PORTD 3 LCD ENPIN PORTD 2 LCD can be enabled or disabled by using DIP Switch 2 Infra Red Remote Control Sensor PORTA 3 A large number of devices are now using infra red remote controls to communicate The standard protocol is based upon 38KHz modulated infra red communication The PIC Lab II board contains a 38KHz modu lated Infra red sensor that will detect the Infra reds which are modulated only at 38Khz Most commonly available remote controls for TV CD and A C use the same protocol However they differ in codes they transmit The Infra red Sensor is connected to PORTA 3 this port is also analog input therefore make sure it is set to digital and configured as Input to read the sensor Microtronics Pakistan www electronicspk coml 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 co
5. e only small amount of power which is enough for microcontroller but not for the entire board N LCDI LCD Charcter LCD aa z BER A o SERRRARRARwERES 2 la D LCD RE 15 meve x cua assa sia FF Fo FI calo n PORTB 16 15 RBO REO RAO RBI 3 REL 5 RAL 3 RB2 3 REZ 3 E RB3 4 A RA3 4 RB4 E RAG RBS c RAS RBO 5 vpp PORTE E RB7 8 9 VDD PORTA i b Tile Size Number Revision B Date TA Mar 2008 Sheet of File D3PIC3MOPin Ddb Drawn By Ul LEDI Bl swi 4004 7805 F 1 ie L vin Vout 3 bi Em 2 ON OFF 336 Di Cj Z Pwr m 5 3 2 IV 160 T 1000 n PEDO LEDS LED7 LEDS LEDS LED LED3 LED UA CA CR CA C
6. ey can run at a maximum of 40MHz therefore using a 10MHz crystal along with enabling an internal PLL will give a speed of 40MHz Microtronics Pakistan www electronicspk coml PIC Lab II Manual 3 In Circuit Serial Programming Traditionally microcontrollers are programmed using a device called programmer The microcontroller is taken out of the circuit and put into the programmer to get it programmed The processor is then inserted back into the board to run the program This is however quite cumbersome to repeatedly take out the proc essor Microchip therefore introduced the idea of In Circuit Programming This is also called ICSP This board supports In circuit Serial programming However not all programmers have ICSP support So you will need a programmer with ICSP support such as Microtronics PIC PG2 ICSP uses two of the microcontroller pins RB6 and RB7 Called PGM and PGD respectively If you are going to use ICSP these pins must not be tied to any circuit that should drain the signals from programmer on these pins The board has kept this feature and RB6 and RB7 are not connected to any device However since these pins are available through headers you can use them in your applications then if the ICSP fails disconnect the device before programming The programmer also supplies 5V output but this power is insufficient to supply the entire board It is therefore mandatory to keep the power on while programming As soon as you c
7. it will need an external PULL up resistor Fortunately SW7 is also connected to this port pin and has a pull up resistor so enabling SW7 will provide the necessary Pull Up resistor in that case don t press the button data will be received through TOCKI connector Analog input Connectors PORTA 0 PORTA 1 Many PIC microcontrollers give analog to digital conversion on chip This is quite advantageous as many sensors give analog data Although the number of analog inputs on a chip vary yet if we talk about 16F877A it has analog inputs on PORTA and E all these pins are available for projects through PORT headers However we have specially included two connectors from PORTA O and PORTA 1 along with power supply on board These three pin connectors can be used directly to any analog device giving upto 5V analog signal Pulse Width Modulation Connector PORTC 2 Pulse Width modulation is a common technique used to alter the speed of motors etc although PWM can be achieved on any digital pin PIC microcontrollers have inbuilt hardware that once set keeps on sending PWM waveform to the device despite processor busy in other jobs This is really a multi tasking 16F877 has two hardware PWM modules one of them is on PORTC 2 which is available through port header as well as through this PWM connector which also has power supply for daughter board if required Boot Loader The supplied 16F877A microcontroller comes with a pre programmed Boot
8. loader software This software eliminates the need for an external programmer device The boot loader program has an associated part which will run on windows terminal The boot loader is configured to work with 20MHz crystal and at top BAUD speed of 115K asynchronous serial communication Therefore configure your windows terminal to use 115K speed Load the program hex file which you want to load Connect serial cable to PIC Lab II board Turn power ON press reset button and immediately click on Write button on boot loader windows application This will immediately write the software into your microcontroller External programmer In case you want to use an external programmer select one which has support for ICSP this will facilitate the programming job and you will not have to remove the microcontroller from its socket again and again The board supports even low voltage programming PGM pin is connected to PORTB 3 When High the Microtronics Pakistan www electronicspk coml PIC Lab II Manual 6 microcontroller will be programmed by LVP This is usually all set by the programmer itself All you need to know is that the programmer might use RB3 RB6 and RB7 so your application must not be using them at least at the time of programming the pins should be free By default these pins are free on board If you are connecting an external board just remove the connector Keep the system power on while programming as the programmers can giv
9. nnects 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 1s as below Switch PORT Pin Comments SW3 PORTE 0O DIP Switch 4 to enable disable SWA PORTE 1 DIP Switch 5 to enable disable SW5 PORTB O 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 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 a
10. nother 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 12C 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 conver
11. onnect the programmer cable to the ICSP connector the MCLR pin goes low this inhibits the microcontroller to run any program Therefore if your programmer does not have the mechanism to release MCLR pin then after programming remove the cable so that the program can run DIP Switch There is an 8 switch DIP switch labeled as Enable on board This switch will connect or disconnect various peripheral devices on board so that the associated pins can be freed for use in other projects We will talk about the related Switch in appropriate topics LED Indicators PORTC 0 PORTC 7 PIC Lab II has 8 Led indicators connected to PORTC of the microcontroller The LEDs are connected through 220 ohms current limiting resistor and are sourced by the microcontroller Therefore a logical 1 or on state of the microcontroller pin will turn the corresponding LED ON DIP Switch 1 will enable or disable the LED module A number of other devices also use PORTC therefore simultaneous use or connection of port pins to LEDs may interfere with other device function For example USART uses RCS and RC6 for communication if LEDs are enabled this communication may Fail Same is the case with Boot Loader programming which uses USART therefore before programming using Boot Loader disable the LEDs using Dip Switch 1 Character LCD PORTD 2 3 4 5 6 7 The board contains a socket for HD44780 based character LCDs with back light The LCD module can be any
12. ts 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 Microtronics Pakistan www electronicspk coml PIC Lab II Manual 5 ured as hardware USART communication pins NOTE since the PORTC is also connected to LEDs if LEDs are enabled receiving data from USART is interfered It is therefore mandatory to disable LEDs while using UASRT PIZO Buzzer PORTA 5 The board contains a connector for PIZO The PIZO buzzer module consists of a transistor and two resis tors The transistor connects directly to PORTA 5 The buzzer has to be given oscillatory signals like a train of Os and 1s to make a sound l O PORTS All I O lines are available as headers on board for connection to other devices or daughter boards The headers are separated fro each PORT and the number of header pins are according to the I O lines available on the respective port Each port header is provided with power supply for the daughter board TOCKI Connector PORTA 4 Although this pin is available trough standard PORTA header it has been provided separately along with power supply to used as external clock signals for Timer 0 The pin is also general purpose and can be used as a serial communication between two boards directly connected together Remember PORTA 4 is open collector and
Download Pdf Manuals
Related Search
Related Contents
取扱説明書 - 三菱電機 Réf. 50360-3 Manuel d`utilisation Intel MFS5000SI User manual Battery charger for Li-Ion batteries LI5000V42 platine electronique a programmation numerique dg 302 User Manual - RVR Elettronica SpA Documentation Server Copyright © All rights reserved.
Failed to retrieve file