Example ICSP (Programmer not included)
Product Description:
High quality PIC microcontroller development board.
1. Reset button.
2. 4M crystal onboard ,Using socket,Crystal frequency can be replaced easily at any time
3. 4 independent push buttons, connected to RB0 RB1 RB2 RB3
4. 8 LED’s connected to the RD port, J3 is jumpered to enable LED’s. Remove to disconnect.
5. Standard RS232 communication interface, microcontroller computer communication interface.
6. USB power supply interface.
7. External 5V DC power interface
8. Power switch.
9. ICSP (ZR) programming interface (K150 PICKIT2 PICKIT3 ICD2 etc.)
10. VCC GND Pin power expansion interface, can use for access or to 5V power supply.
11. Microcontroller IO port Pin leads for convenient expansion.
12. DS18B20 temperature sensor interface
13. LCD1602 LCD interface
14. LCD12864 LCD interface
Package includes:
1. 1 x PIC development board
2. PIC16F877A chip
3. 1 x USB cable
Please note a separate programmer will be required to program the microcontroller such as item HCDVBD0002
Order Yours Here.
Schematic:
Example Program (requires MPLAB and HI-TEC C compiler):
Code: Select all
/* FILE: PIC_16F877a_LED_Test.cpp
DATE: 26/07/14
VERSION: 0.1
AUTHOR: Andrew Davies
This test program will flash the LED's connected to port D on the development board.
It was written using the MPLAB IDE and the HI-TECH C complier. Make sure that you
have the HI-TEC C compiler tools installed with MPLAB to compile this program.
You may copy, alter and reuse this code in any way you like, but please leave
reference to HobbyComponents.com in your comments if you redistribute this code.
This software may not be used directly for the purpose of selling products that
directly compete with Hobby Components Ltd's own range of products.
THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
REASON WHATSOEVER.
*/
#include <pic.h>
#include <htc.h>
#define _XTAL_FREQ 4000000
__CONFIG(0x3FB1);
void main(void)
{
TRISD = 0;
while(1)
{
/* Turn off LED's on port D. */
PORTD=0xFF;
__delay_ms(150);
/* Turn on LED's on port D. */
PORTD=0x00;
__delay_ms(150);
}
}
Great Cow Basic 1602 LCD Example:
Code: Select all
' FILE: PIC_GCB_16F877a_LCD_Example
' DATE: 07/08/14
' VERSION: 0.1
' AUTHOR: Andrew Davies
'
'This program was written using the Great Cow Basic IDE for use with our PIC
'16F8777A development board (HCDVBD0003) and our 1602 parallel LCD module
'(HCMODU0013 or HCMODU0038) to display some example text.
'
'You may copy, alter and reuse this code in any way you like, but please leave
'reference to HobbyComponents.com in your comments if you redistribute this code.
'This software may not be used directly for the purpose of selling products that
'directly compete with Hobby Components Ltd's own range of products.
'
'THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES,
'WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED
'WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR
'LACK OF NEGLIGENCE. HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE
'FOR ANY DAMAGES INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR
'CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER.
'Chip Settings. Assumes our 16F877A development board with with external 4MHz
' crystal
#chip 16F877A,4
'Use LCD in 4 pin mode and define LCD pins
#define LCD_IO 4
#define LCD_RW PORTE.1
#define LCD_RS PORTE.0
#define LCD_Enable PORTE.2
#define LCD_DB4 PORTD.4
#define LCD_DB5 PORTD.5
#define LCD_DB6 PORTD.6
#define LCD_DB7 PORTD.7
'Main program
Main:
'Clear the LCD
CLS
'Display some text on both lines
Locate 0,5
Print "HOBBY"
locate 1,3 '
print "COMPONENTS"
'Do nothing
Do Loop
Goto Main
Microchip MPLab (TM) Development environment software can be downloaded from the Microchip website here
We have now put together a quick start guide for using the Great Cow Basic development environment. This software is open source and excellent way to get started quickly with PIC mincrocontrollers. You can find the guide in the software section of our forum here
PIC16F877A Datasheet: