Tuesday, 22 January 2013

PIC Tutorial Series -Basics of PIC Programming

ANSEL=0;   //INPUT AND OUTPUT ARE MADE DIGITAL
ANSELH=0; //INPUT AND OUTPUT ARE MADE DIGITAL

PORTB=0XFF; //RESET PORTB
TRISB=0; //ALL PINS OF PORTB ARE MADE AS OUTPUT.
Delay_ms(milliseconds); //USED TO MAKE DELAY IN LOOP EXECUTION OR HOLD THE PROCESS OF MICROCONTROLLER.
PORTB=0; //INITIAL STATE ASSIGNED AS 0 FOR PORTB.
PORTB=%10000001; //PINS OF PORTB SUCH AS RB0 AND RB7 ARE MADE AS HIGH AND OTHERS ARE MADE LOW.
PORTB=~PORTB;  OR PORTB= not PORTB; //INVERT THE STATE OF PORTB.



Sidharthan G
Electrical Miracles.

Tags:syntax,syntax for pic programming,basic syntax of pic,basics for pic programming.

No comments:

Post a Comment