Thursday 1 March 2012

SIMPLE AND SAMPLE PROGRAMS

To blink an LED connected at the PORTD

#include<htc.h>
#define _XTAL_FREQ 4000000
void main()
{
int i;
__CONFIG (0x3F7A);
TRISD=0X00;

while(1)
{
PORTD=0XFF;
__delay_ms(1000);
PORTD=0X00;
__delay_ms(1000);
}

}

Tuesday 28 February 2012

LET US START



               To program in hitech c we must have some basic knowledge in the architecture and configurations of pic microcontroller. means how to use timers, counters,serial port etc. also understanding some basic assembly programs is also useful but it is not essential.
               MPLAB is a free compiler cum simulator debugger and programmer from Microchip. to include hitech c compiler in MPLAB we have to choose the option while installing. usage of MPLAB is very easy.
firstly select the compiler suite to hitech c in mplab. then take new project and configure.

Then to the syntax of Hitech-C
firstly i recommend some links for u
www.gooligum.com
also refer the manual available with hitech c suite.it contains variables, syntaxes,  and header files.