Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

htc.h file in mplab hitech c

Status
Not open for further replies.

Praful

Member level 3
Joined
Jul 3, 2005
Messages
54
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,665
Can anybody send me a htc.c file for mplab hitech c
 

It's in hitech c compiler folder when you installed them.
 

//A SIMPLE LED RUNNING PROGRAM//
//LEDs CONNECTED TO PORT B WILL RUN FROM RB0 TO RB7 AND BACK FROM RB7 TO RB0//

#include <htc.h>
#define _XTAL_FREQ 4e6 // 4MHz
__CONFIG(0x3FFA);

void main()
{
TRISB=0;
PORTB=1;
__delay_ms(250);
GO:pORTB=PORTB*2;
__delay_ms(250);
if (PORTB<=64){goto GO;}

GO2:pORTB=PORTB/2;
__delay_ms(250);
if (PORTB>=4){goto GO2;}
}
 

//A SIMPLE LED RUNNING PROGRAM//

that's probably the most un-C C program you can find.

you really should consider taking a class in C Programming 101.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top