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
 
Tools
Old 8th May 2004, 03:21 PM   #1
Default INTRC (osc), ICProg & MPLab - How to do this?

Hello all!

This is my first post here, and I would like to know how I can get my PIC to use the internal osc. I have used done the following to calibrate the osc on start:

Code:
	org	00h		;the reset vector is defined as address 00hex
	call	07FFh		;get calib info into wreg

	bsf	_status,5	;move into bank 1

	movwf	_osccal		;calibrate the Int Osc

	bcf	_status,5	;move into bank 0

   	goto	Setup		;and we tell it to go to 'Init'
According to the 12C672 manual the 'call 07ffh' will invoke a 'retlw xx' command returning the trimming value to the wreg (this val is different by each PIC and is set by microchip).

So please let me know how to get the INTRC to work. I do know that during programming @ address 2007h (register - CONFIG) bit FOSC<2:0> need to be set to 101 to enable INTRC, and activate clkout on OSC2.

the problem is that ICprog only has RC/XT/LP and HS as osc options

Thanks!

Regards,

Mike
__________________
"Ambition is the last refuge of failure..." --Oscar Wilde
"Success is not final, failure is not fatal: it is the courage to continue that counts." -- Winston Churchill
bsodmike is offline  
Old 8th May 2004, 04:06 PM   #2
Default

Wich version of IC-prog are you using? I've got 1.05C here and it offers all the necessairy intosc options for the 12C672...
Exo is offline  
Old 8th May 2004, 04:09 PM   #3
Default

ops:

To be honest I've only used ICProg with the 16F84/A and didn't look under the 12C671/2 - D'oh! :?

Just setup my labPC and will be checking this out tonight

Cool thanks, that solves another problem! Saw some of your other posts, your really helpfull thanks!
__________________
"Ambition is the last refuge of failure..." --Oscar Wilde
"Success is not final, failure is not fatal: it is the courage to continue that counts." -- Winston Churchill
bsodmike is offline  
Reply

Tags
icprog, intrc, mplab, osc

Thread Tools
Display Modes




All times are GMT. The time now is 04:23 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker