Searching \ for 'CCS OSSCAL Setting' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=ccs+osscal+setting
Search entire site for: 'CCS OSSCAL Setting'.

Truncated match.
PICList Thread
'CCS OSSCAL Setting'
1999\10\10@154032 by Tim

flavicon
face
Hi,
       Does anyone have a example on how to program the calibration data for
PIC12C672s using the CCS compiler?  If so would you mind tell me how? I
am using the eprom type now, but will start to use the OTP ones soon.  I
can't seem to find this information anywhere.

Thanks a lot,
Timothy Deterly

1999\10\10@160601 by Dan Creagan

flavicon
face
I'm probably off on what you want, but you can integrate MPLAB with CCS and
configure the oscillator parameters in the MPLAB project.   Just get the
project going, read the unprogrammed JW part and then put oscillator
calibration data into the project.  You should mark the JW part with its
calibration number (I usually just scratch it onto the  metal part of the
chip).

You can set fuses (WDT, protection, etc) with the #fuses directive in CCS.

If you are not inclined to use the MPLAB integration, then you can use the
#ROM directive to insert calibration data into the chip.

Dan

{Original Message removed}

1999\10\10@161613 by Tim

flavicon
face
Thanks for the reply, but my question should have been. How do you use
the #ROM directive to insert the calibration data back into a 12C672 JW
and or OTP?  The ROM directive is what I thought I had to use but I
couldn't figure out how to.

Thanks again,
Timothy Deterly

Dan Creagan wrote:
{Quote hidden}

> {Original Message removed}

1999\10\11@131802 by Peter Schultz

flavicon
face
Hi Tim
You have to use the  # ROM statement.Just substitute the correct address and
value.
Example:
# ROM  0x2100 = {0x0080}

          Peter Schultz
Email: spam_OUTPeterSTakeThisOuTspamminimed.com
Phone: (818) 362-2358x3837
     Fax: (818) 362-4370
12744 San Fernando Road
      Sylmar, CA 91342

{Quote hidden}

1999\10\11@134123 by Pekka Ritamaki

flavicon
face
    <<  Tim <.....timdetKILLspamspam@spam@SAN.RR.COM>

<<Thanks for the reply, but my question should have been. How do you use
<<the #ROM directive to insert the calibration data back into a 12C672
JW
<<and or OTP?  The ROM directive is what I thought I had to use but I
<<couldn't figure out how to
Tim,
You can use ROM-setup, which CCS puts to rom code after compile:

#ROM 0x1ff={0xcb0}  // B0 is calibration value

or direct assembly before you need exact timing:  

void main ( void) {
 char ch,i;
 setup_counters(RTCC_INTERNAL,RTCC_DIV_2| ENABLE_PULLUPS);

// 0x90 or  0x7F  are common values

 #asm
  MOVLW 0x90
  MOVWF   5
 #endasm

or direct byte method
#byte OSCCAL= 0x5

void main ( void) {
OSCCAL=0x90;
...
}
But what to do when you have lost your calibration value?
You can easily find it!
Make a loop, which sends osccal variable to RS232 e.g. 9600 baud and
look when baud and osccal are the
same!
If anybody wants it send a mail.
Pekka

--
Û¼¡`¡¼Û¿,üü,¿Û¼¡`¡¼Û¿,üü,¿
Pekka Ritamaki, Probyte Oy Microprocessor software & hardware design
Nirvankatu 31, 33820 TAMPERE, FINLAND http://www.sci.fi/~pri
tel: Int. 358-3-2661885 fax: Int. +358-3-2661886 email:prispamKILLspamsci.fi

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...