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.

INTRC (osc), ICProg & MPLab - How to do this?

Status
Not open for further replies.

bsodmike

New Member
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
 

Exo

Active Member
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...
 

bsodmike

New Member
:oops:

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 :D

Cool thanks, that solves another problem! Saw some of your other posts, your really helpfull thanks!
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top