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);
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment