FOR HITECH C USERS
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);
}
}
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)