Oscillator/Hserout woes


Results 1 to 9 of 9

Threaded View

  1. #4
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    You should set the OSCCON register in your code. There are a lot of speed options for your chip, from 8mhz to 32khz. Looks like it defaults to 8mhz if left untouched.
    Thanks for the input guys

    As it goes (out of desperation), I tried a few permutations of OSCCON prior to posting (but wasn't too sure whether the OSCCON setting overode the define command or not)

    I have to say all the config setting surrounding something as elementary as setting an oscillator up is very confusing!

    So having got the fuse correct ( _INTRC_OSC_NOCLKOUT ...at least that's what's in the 16f690.inc MPSAM file)

    Having got the define correct. (define osc 4 ....4Mhz)

    The OSCCON still needs setting? (bear with me here - I seldom change this stuff.....if OSCCON still needs setting what's the purpose of the DEFINE command?)

    I tried getting the interal oscillator presented on the associated IO pins (to see if I could scope them - failed! IS there something unique about the clock that makes it invisible? lol)

    I tried a whole heap of permutations - the Hserout settings I posted were derived from Mr E's calculator.

    The weird things is ...when on internal oscialltor, most of the 'format' of the text onscreen was almost there (eg tabs were in the right places, therefore forming columns as the lines wrapped ...just gobbledegook when on the internal oscillator). I'll come back to this later, but for the time being I'll stick with 20Mhz!

    Incidentally, when I scope the PICs OSC pins when using an external resonator - I can't scope the signal either ....I'm starting to think this is personal & that the clock oscillator from just me!!!!! (not saying I'm paranoid - I used to play rugby but gave up becuase everytime there was a scrum, I thought they were talking about me)
    Last edited by HankMcSpank; - 10th October 2010 at 15:49.

Members who have read this thread : 0

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