Category:PIC

From ElectroDragon
Jump to: navigation, search


Schematic

Quick start guide

  • You will need PICKIT3, and dvelopment board PIC16F72, install the pin headers for programming
  • Find MPLAB 8.x version in our github page, and use the code below, or download here of the workspace zip file - File:Led pic.zip
#include<htc.h>
 
// Config word ?? no need
//__CONFIG(FOSC_HS & WDTE_OFF & PWRTE_ON & CP_OFF);
 
// Define LED pin
#define LED  RA0
 
// Define CPU Frequency
// This must be defined, if __delay_ms() or 
// __delay_us() functions are used in the code
#define _XTAL_FREQ   8000000    
 
 
// Main function
void main()
{	
	TRISA0 = 0;				   // Make RA0 pin output
	LED    = 0;				   // Make RA0 low
 
	while(1)
	{
		__delay_ms(500);       // Half sec delay
		LED = 0;               // LED off
		__delay_ms(500);       // Half sec delay
		LED = 1;               // LED on
	}
}

Toolchain

  • PICkit3
  • K150

Build Guide MPlab IDE

  • Build and program, follow the guide below
  • Use PICkit programmer

PIC programmer.jpg

PIC ICs

  • PIC16F72, PIC12F675-1.5, PIC12F508

This category currently contains no pages or media.