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.

[PIC] Regarding Configuration

Status
Not open for further replies.

kvsa

Newbie level 4
Newbie level 4
Joined
Oct 8, 2013
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
45
Hai,
I start to practice micro controller programming, I use PiC 16f676 i need the configuration for that,This is the C code with configuration mention below. kindly edit or give me a suitable configuration for that.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include<htc.h>
#include <pic.h> 
//__CONFIG (CPD_OFF & CP_OFF & BODEN_OFF & PWRTE_ON & WDT_OFF); 
//_CONFIG(BGHIGH & UNPROTECT & BORDIS & MCLRDIS & PWRTEN & INTOSCCLKO & WDTDIS);
//_CONFIG(BGHIGH & UNPROTECT & BORDIS & MCLRDIS & PWRTDIS & INTOSCCLKO & WDTDIS);
//_CONFIG(UNPROTECT & BOREN & MCLRDIS & PWRTEN & WDTDIS & INTOSCCLKO); 
_CONFIG(BGHIGH & UNPROTECT & BORDIS & MCLRDIS & PWRTEN & INTOSCCLKO & WDTDIS);
//__CONFIG  (_INTRC_OSC_NOCLKOUT & _CPD_OFF & _CP_OFF & _BODEN_OFF & _PWRTE_ON & _WDT_OFF);
#define _XTAL_FREQ 4000000
 
void delay_ms(int delay_data)
{
  while(delay_data--)
 {
   unsigned int delay_data1=96;
   while(delay_data1--);
 }
}
 
 
void main()
{
TRISC=0;
 
while(1)
{
 
PORTC=0xFF;
/*PORTC=0x01;
delay_ms(5000);
 
PORTC=0;
delay_ms(5000);*/
 
}
 
}


regards
Kvs
 
Last edited by a moderator:

If Hi-Tech Compiler is being used then docs sub folder of the Compiler folder and open the .html file for your device and read how to set config bits.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top