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.

Configuration setting problem of pic16f676

Status
Not open for further replies.

Noman Yousaf

Full Member level 4
Full Member level 4
Joined
Nov 19, 2003
Messages
208
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Lahore Pakistan
Visit site
Activity points
1,763
HI
i m new in PIC
i m making a simple up counter using PIC16F676.
software is working. mplab's debugger shows that.
but i have some problem while configuring configure bits.
i want :
1. internal oscillator of 4MHZ.
2. RA3 as I/O port.

i configured as follows

pic_config.JPG

doesnt matter watchdog timer is enabled or disabled.
 

hi
are you using assembler or c?
if you use assembler you can include this header in your asm file
Code:
list		p=16f676	; list directive to define processor
	#include	<p16f676.inc>	; processor specific variable definitions
	
	__CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_ON & _XT_OSC & _WRT_OFF & _LVP_OFF & _CPD_OFF
hope it helps
 

1: what does mean by LVP?
2: Is this configured for internal oscillator or external? i think it is for external oscillator. u wrote "_XT_OSC"
 

hi
Lvp is "Low voltage programming" it's an option for programming the ucontroller using low voltage.
_XT_OSC: external crystal oscillator, with this config you can use up to 4 MHZ, if you are planing to use more than that frequency, you must use _HS_OSC ruther than _XT_OSC.

for internal oscillator you must use this code

Code:
list		p=16f676				; list directive to define processor
	#include	<P16F676.inc>		; processor specific variable definitions
	
	__CONFIG    _CONFIG1,  _CP_OFF & _CCP2_RC1 & _DEBUG_OFF & _VBOR_2_0 & _BOREN_0 & _MCLR_ON & _PWRTE_ON & _WDT_OFF & _INTRC_IO
	__CONFIG    _CONFIG2,  _BORSEN_0 & _IESO_OFF & _FCMEN_OFF
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top