Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 7th June 2007, 05:47 AM   (permalink)
Default Configuring the 16f628a's oscillator to input?

Can anyone please tell me what I should change in my config to make my pic use its internal oscillator? The source is just below.

_BODEN_ON EQU H'3FFF'
_BODEN_OFF EQU H'3FBF'
_CP_ALL EQU H'03FF'
_CP_75 EQU H'17FF'
_CP_50 EQU H'2BFF'
_CP_OFF EQU H'3FFF'
_DATA_CP_ON EQU H'3EFF'
_DATA_CP_OFF EQU H'3FFF'
_PWRTE_OFF EQU H'3FFF'
_PWRTE_ON EQU H'3FF7'
_WDT_ON EQU H'3FFF'
_WDT_OFF EQU H'3FFB'
_LVP_ON EQU H'3FFF'
_LVP_OFF EQU H'3F7F'
_MCLRE_ON EQU H'3FFF'
_MCLRE_OFF EQU H'3FDF'
_ER_OSC_CLKOUT EQU H'3FFF'
_ER_OSC_NOCLKOUT EQU H'3FFE'
_INTRC_OSC_CLKOUT EQU H'3FFD'
_INTRC_OSC_NOCLKOUT EQU H'3FFC'
_EXTCLK_OSC EQU H'3FEF'
_LP_OSC EQU H'3FEC'
_XT_OSC EQU H'3FED'
_HS_OSC EQU H'3FEE'

__CONFIG _BODEN_ON & _CP_OFF & _DATA_CP_OFF & _PWRTE_ON & _WDT_OFF & _LVP_OFF & _MCLRE_ON & _XT_OSC
Attached Files
File Type: asm config.asm (1.2 KB, 7 views)
Glacius is offline  
Old 7th June 2007, 06:22 AM   (permalink)
Default

Code:
	__CONFIG        _BODEN_ON & _CP_OFF & _DATA_CP_OFF & _PWRTE_ON & _WDT_OFF & _LVP_OFF & _MCLRE_ON & _INTRC_OSC_NOCLKOUT
Mike.
P.S. You don't need all the equates. They should be in the include file. If you still have problems then post your code in full.

Last edited by Pommie; 7th June 2007 at 06:24 AM.
Pommie is online now  
Old 7th June 2007, 06:33 AM   (permalink)
Default

Sometimes I select these fuse settings when I program with the IC Prog. Just making ticks that I want & don’t want fuses. Not writing in the program.
__________________
Gayan

My Website
http://gsmicro.blogspot.com/
Gayan Soyza is offline  
Old 7th June 2007, 07:12 AM   (permalink)
Default

If the config bits are set correctly (or the whole config word is set) in your code then ICProg should automatically select those fuse check boxes and oscillator type as well.
mvadu is offline  
Old 7th June 2007, 07:17 AM   (permalink)
Default

Awesome it works now, thanks.
Glacius is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Using Oscilloscopes mechie Electronic Theory 9 29th November 2007 10:49 PM
Output = Input - Problems adamthole Micro Controllers 20 24th April 2007 05:09 AM
help needed for configuring only one analog input pin in PIC 16F877A amit_kr Micro Controllers 3 27th June 2006 05:40 PM
Way to charge a capacitor linear over time e-l-e-c-t-r-o General Electronics Chat 54 30th September 2005 02:33 PM
Measure DC offset, Hum, DBs gain, Oscillation walters General Electronics Chat 21 7th June 2005 04:01 AM



All times are GMT. The time now is 06:02 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker