Sample 16F676 program in Hitech C

Status
Not open for further replies.

GreenBeret

New Member
Can somebody give me a sample 16F676 source code for just to turn on a LED or a 7-segment. I want to use the internal oscillator. I tried this with the below given code, but not working...

#include <pic.h>

__CONFIG (0x3FB5); // Internal OSC clkout, wdt disabled, power on timer disabled.

main ()
{
OSCCAL = 0b000000;
ANSEL = 0b00000000;
TRISC = 0b000000;
TRISA = 0b000000;
PORTC = 0x3F; // Connected to 7-segment
RA3 = 1; // Common of 7-segment
}
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…