The PIC Advanced development board is a development board which demonstrates the capabilities of the 40-pin, 28 Pin, and 18 Pin PIC16F/18F devices.
PIC Advanced development board can be used stand-alone board built with an in-circuit USB programmer. Sample programs are provided to demonstrate the unique features of the supported devices.
PIC Advanced development board Kit comes with the following:
☞PIC 16F877A IC
☞CD-ROM, which contains: a) Sample programs b)PIC Advanced development board User’s Guide
PIC Advanced development board has the following hardware features:
☞40-pin ZIF socket.
☞+12V and +5V regulators for direct input from 15V, 500 mA AC/DC wall adapter
☞RS-232 socket and associated hardware for RS-232 interface.
☞ICSP USB 2.0 Programmer with busy LED indication
☞Two 5 KΩ pot and one LM35 for devices with analog inputs.
☞Four push button switches for external interrupts and Reset.
☞Red power-on indicator LED.
☞Eight red LEDs connected to 10 Pin FRC.
☞A 10 MHz crystal oscillator.
☞Microchip 25C040 Serial SPI EEPROM.
☞Atmel AT24c04 Serial I2C EEPROM
☞Dallas DS1307 Serial I2C Real-time Clock
☞LCD display with backlight Selection Jumper.
☞Piezo buzzer and OEM Relay.
☞Dallas DS1820 thermal sensor.
☞Four 7Segment multiplexed display
☞ULN2803 driver for unipolar Stepper motors
☞4×4 matrix keypad
☞8 way DIP switch for digital input
☞8 way Configuration DIP switch for multiple operation
☞ENC28J60 Ethernet driver
☞128×64 Graphical LCD
PIC Advanced development board HARDWARE
One FLASH device is included. The device types may change, but will generally include PIC16 and PIC18 40-pin DIP devices.
The PIC Advanced development Kit includes a CD-ROM with sample programs. These programs may be used with the included sample devices. For each type of device (PIC16 or PIC18), demo source code with compiled Hex file is provided.
40 Pin ZIF socket is provided for the processor. Microcontroller can be removed from the board easily. This socket is intended to use our development board as programmer to program other IC’s.
28 Pin and 18 Pin IC bases are given so the user can use 28 pin and 18 pin devices as well. But these devices have limited I/O lines; some of the on-board peripherals can be inaccessible. These can be accessed externally.
10 pin FRC box type connectors: This will be found in each section of PIC 16F/18F development board. A 10 pin FRC cable is used to make connection with the main board section. Any 8 bit port of microcontroller can be used for interconnection. Ports having less than 8 bits are used as control signals for various sections.
Pins 1-8 are Data Pins. Pin 9 is VDD and the Pin 10 is GND. All 10 Pin FRC connectors will follow the same rule.
|JP1||Power Supply||Placing a jumper between : 1 & 2à Power from onboard Regulator: 2 & 3à Power from USB|
|J2||Power Supply||Power ON/OFF Switch|
|J19||CAN||RXD 1 and 2 shortedTXD 1 and 2 shortedWe can connect these pins with microcontroller pins having CANprotocol. The combination is RXD1 and TXD1, RXD2 and TXD2|
|J11||Main Board||Middle and RISEà Interrupt on Rising EdgeMiddle and FALLà Interrupt on Falling Edge|
|J9||GLCD||LCD mode: Place Jumpers between LCD and CONTRAST, GLCD and LCD_BLGLCD Mode: Place a Jumper between GLCD and CONTRAST|
|J10||MAIN BOARD||ICD2 or PICKIT2 Connector for programming the IC’s from an External Programmers. Or use this connector to program external ICs using Onboard Pickit2 Programmer|
|J1||USB Program-mer||This is for factory debugging. The User should not do anything withthis connector.|
SW1: 8 way Multifunctional switch
|DIP SWITCH PIN||DESCRIPTION|
|ADC||Supply select for Analog channels|
|DS1820||Connects DS1820 temperature sensor to RC0|
|CS, SCL, MISO, MOSI||SPI and I2C Selection pins:Turn ON SCL and MISO for I2C operationTurn all the pins for SPI operation|
|TXD, RXD||RS232 communication transmit, receive pins|
The external power can be AC or DC, with a voltage (15V, 1A output). The PIC board produces +5V using an LM7805 voltage regulator, which provides supply to the peripherals. Power supply is controlled through slide switch J2.
INSTALLING MPLAB IDE AND HI-TECH C COMPILER
1. Open up the user CD comes withPIC Microcontroller Board, Navigate to MPLAB IDE Folder
2. Double Click Setup.exe and Click >> Next
3. Click >> I accept the terms of the license agreement and Click >> Next
4. Select >> Complete check box and Click >> Next
5. Click >> Next
6. Click >> I accept the terms of the license agreement for both Application Maestro as well as MPLAB c32 windows and Click >> Next, Next
7. Click >> Next to Start Copying Files
8. Now the MPLAB IDE setup will Progress
9. After finishing installation MPLAB IDE, it will prompt for HI-TECH C Installation. Click >> Yes
10. Click >> Next
11. Click >> License agreement Check box and Click >> Next
12. Click >> Next
13. Check >> Add to environment path and Click >> Next
14. Click >> Finish
15. Click >> Finish to InstallShield Wizard Complete
16. Just Close the MPLAB IDE Document Support
CREATING A PROJECT ON MPLAB IDE
1. Double Click the MPLAB IDE v8.xx from desktop
2. To create a new project, Click >> Project and Project Wizard.
3. At the first page of Project Wizard, Click >> Next.
4. Step ONE: Next, you will need to select the device for your project. For this demonstration I will use PIC16F877A as the device.
5. After selecting the device, click >> Next
6. Step TWO: Select the Compiler for your Project.
7. Click the Active Toolsuite and select HI-TECH Universal ToolSuite.
8. There should not be any red “X” mark (For those with the red “X”, please reinstall the HI-TECH C for PIC 10/12/16). Click Next to continue.
Example: See the “Red X” mark that appears before CCS C compilers
9. Step Three: Select the directory to store your project and your project name.
☞Click on Browse to open a browser where you choose the directory and the project name.
☞It is advised that you use a new folder for a new project, and all the coding file (c file, h file, asm file) should be stored under the same folder.
10. Now enter the Project Name and Click >> Save
11. Click >> Next to the following window
12. Step four, Add existing file to your project. Just Skip this by clicking Next.
13. You have successfully created the project. Click Finish to continue.
14. The project that you create will be open after you successfully create it, and this is what you will see at the IDE, a Project window and an Output window.
If you don’t have these windows on your IDE, you can always enable it back by clicking View >> Click the Project and Output.
15. Click on the icon (New File) to create a new file.
16. After creating the new file, now save it. Click File and Save As.
17. To save it as a c file, put a “.c” at the File name of the file to save. Save the file in the same directory of your project.
18. Now include the “.c” file into your project, right click at the Source File, and click Add Files.
19. Select the file that is being saved.
20. Now the code file “main.c” is added to your project. You can see that it is shown under the Source Files at the Project window.
21. To compile the project, click on the Build Project button or the Rebuild project button.
22. Now you successfully created all the things. Now write your code and Compile it.
☞First attach the PIC Microcontroller Development Board with PC via USB cable.
☞Connect the 15V AC/DC Adapter with Development Board.
☞Turn ON the Power Switch.
☞Wait until the Pickit2 Finishes Driver Installation. If the driver is not detected just try to reconnect or RESTART your system, then try again.
5. After Finishing the Hardware driver installation. Open MPLAB IDE. Select Programmer >> Select Programmer >> PICkit2
6. If the Kit is properly connected, you can see the Pickit2 Icon set on the Toolbar (Yellow Set) and the PICkit2 Ready Message. Very First icon is used for “Programming the device”.
7. Finally open our Example Programs, Burn into the controller, do the hardware connection as per Chapter 4 and See the result.
Error 1: MPLAB may throw “Write Failure-Get lost Error”. If it does, follow the instructions below,
☞Unplug the Power supply from target board
☞Plug the AC/DC adapter
Error 2: MPLAB may throw “target not found” or “unspecified device id “error, If it does, follow the instructions below
☞Ensure whether the PIC 16F/18F development board placed properly in ZIF jacket.
☞In Configure–>Select device, ensure PIC16F877A (or any) is selected.
Error 3: MPLAB may throw “Verified Failed” error, due to the following
☞Hex File may be old, so compile the project once and try Programming.
☞Faulty microcontroller device, Replace it with new one.
Note *: If the error still retains check your windows firewall or antivirus software to allow this MPLAB and Pickit2 programmer.
PROGRAMMING THE IC’S
1. Just open one of our Example Program, the PICkit2 will be automatically detected and will show the Found PICkit2 message, Click Program the target device (First one in the yellow Icon set). The following message will be displayed,
RUNNING THE PROGRAM
1. Once the program is loaded into microcontroller, press the RESET button to run the loaded program.
2. Do the Hardware configuration as per chapter 4 (Example programs)
Example Programs and Connections
|This Source code is written to access the Internal EEPROM of PIC 16F/18F development board. So No hardware con-nection is needed.Connect Serial cable between USART Section in the Board and PC.“Hello World” will be displayed in HyperTerminalClick “View |?| EEPROM”Click “Programmer |?| Read EEDATA” in MPLAB to see the contents of Internal EEPROM|
RELAY and BUZZER
USARTUSART with PRINTF
Setting up HyperTerminal
HyperTerminal is automatically installed under Programs >> Accessories,
1. Click Start >> Programs >> Accessories >> Communications >> HyperTerminal
☞Enter Name (e.g. Com1_9600) and choose any one ICON.
2. Click the drop-down arrow by Connect Using >> COM1 >> Click OK
3. COM1 Properties, Port Settings
☞Bits per Second: select 9600 (or desired baud rate)
☞Data Bits: select 8
☞ Parity: select None
☞ Stop Bits: select 1
☞Flow Control: select none
4. Now you get the HyperTerminal window.