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
}
#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
}