Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top