Calibration Word & Processor Speed


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2014
    Posts
    6

    Default Calibration Word & Processor Speed

    Hi,

    I'm new to PICs & PicBasic Pro, but not new to microcontrollers in general. Atmel, ST9, Picaxe,8051

    I was recently given a (legal) copy of PBP 2.46,.Microcode Studio, MPLAB 7.11 and and (2) ICD2 Programmers, along with a box full of PIC16F684 and 12F688 PICs. I am slowly muddling my way through the toolchain and getting fimilar with the little idiosyncracies.

    After building a programming board for use with the ICD2 I got an LED to blink after a couple of hours of trial an error. Not bad. It took me 3 days with an ST9B ....

    Thanks to information posted in this forum, I was able to quickly figure out how to change/modify the configuration word bits, as I want to try using using a 20Mhz crystal instead of the internal RC oscillator, However ......

    I have a question about the factory loaded "calibration word" loaded at 2009h.

    How can this be changed or reloaded if, for example, it gets overwritten? I have searched and found no information on how to do this with an ICD2. To the best of my limited knowledge, the ICD2 does not have a stand alone programming app, and its "operating system" is programmed to leave this data alone.

    Also, the PIC 16F684 has a default 8Mhz internal clock, yet PBP by default slows it down to 4Mhz. ...Why is this?. Does 8Mhz not work well or cause some PBP features to misbehave?

    I changed the clock to 8Mhz with "DEFINE OSC 8" but see no obvious improvement in performance. How can I easily tell if the oscillator speed actually changed ? Is there a simple way to test the performance with PBP or MPLAB ?

    Thanks in advance.

    cyberroth
    Last edited by cyberroth; - 25th February 2014 at 14:36.

  2. #2
    Join Date
    May 2009
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: Calibration Word & Processor Speed

    The Define OSC 8 does not change the oscillator speed. I only tell the compiler the speed so that internal delays are calculated correctly. To change the internal oscillator speed the osccon register should be modified in you code. The define OSC x should then be set to match your selection as defined in the osccon register.

  3. #3
    Join Date
    Feb 2014
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: Calibration Word & Processor Speed

    Thanks, I should have know that !

  4. #4
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: Calibration Word & Processor Speed

    Quote Originally Posted by cyberroth View Post
    Thanks, I should have know that !
    I don't see how. I mean no disrespect and not to be argumentative, but it is a frustration to me that there is this gray area in many procedures where PBP does some of the setup and leaves other parts to be done by the user. After some time I am catching on to the pattern and learning where to look when things don't work as expected, but ... from a beginner's standpoint... I could wish the manual was more clear in some respects on this. That said, I really enjoy using PBP and the process of learning it is enjoyable to me. Between reading carefully, scratching my head, and the outstanding help in these forums it is getting easier. After not too long it seems I might actually be able to create the things I envision! I hope you find this to be the case as well... and welcome to the forums!

  5. #5
    Join Date
    Feb 2014
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: Calibration Word & Processor Speed

    Not argumentative at all.

    I should have know that because I have considerable experience with another PIC based BASIC system where you can peek / poke the OSCON register to change the internal RC oscillator frequency. And , I did not read the PBP manual very thoroughly before starting.

    I do agree that the manual leaves a bit to be desired from a beginners standpoint. Aside from being unclear in places, I find some of the examples inadequate or irrelevant and not very "real word". But such is the case with a lot of products. Most of the effort goes into the software & marketing, while manuals / datasheets are an afterthought or a necessary inconvenience given a back seat . Good tech writing seems to be becoming a lost art.

    I have found that looking at others well commented code is a really good way to learn.

Similar Threads

  1. Processor Speed Test?
    By Ramius in forum FAQ - Frequently Asked Questions
    Replies: 4
    Last Post: - 14th May 2011, 01:31
  2. High Resolution Timer & Speed Calculator
    By WOZZY-2010 in forum Code Examples
    Replies: 4
    Last Post: - 7th February 2010, 16:45
  3. 4 Low Speed PWM & HSERIN
    By MasterSparky in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th October 2007, 19:12
  4. Replies: 0
    Last Post: - 26th October 2005, 06:47
  5. Inverting a Word & Assigning Array To Bytes
    By CocaColaKid in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 25th August 2005, 23:44

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts