DEFINE OSC for 31 khz


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Oct 2015
    Location
    Redmond, WA
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: DEFINE OSC for 31 khz

    Correction to the below thread.

    -> Use DEFINE OSC 4 instead of DEFINE OSC 3 <-

    I accidently set the Editor Options in MicroCode Studio (View/Editor Options.../Highlighter) to "LowerCase All" instead of "Default". The Define options are CASE SENSITIVE (!!!) so

    define osc 3

    is ignored and defaults to DEFINE OSC 4

    DEFINE OSC 4 sets the OCS value to 4 Mhz (in this case a fudge factor so, when combined with a 32 KHx xtal and the weird serout2 Mode value, it works for 150 baud.

    IMHO, there shouldn't be a LowerCase All as an option in CodeStudio as it prohibits you from using DEFINE (uppercase) which is case sensitive! AAARRRRRG

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: DEFINE OSC for 31 khz

    Hi,
    It's starting to feel like beating a dead horse but since this apparently STILL causes confusion we'll do it one more time:

    It's what you put AFTER the define keyword, ie OSC in this case, that IS case sensitive. The keyword define can be written UPPER CASE, lower case, MixED CAsE, whatever.

    So it's perfectly fine to have the Reserved Word Formatting in MicroCode Studio set to Lowercase all since only DEFINE is a reserved word and IT IS NOT case sensitive.
    define osc 8 will not work, define OSC 8 will and MicroCode Studio will only change the case of the reserved word, ie define, not OSC. So, the problem was not that you had it set to Lowercase all but that you wrote osc instead of OSC.

    /Henrik.

  3. #3
    Join Date
    Oct 2015
    Location
    Redmond, WA
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: DEFINE OSC for 31 khz

    So sorry for the error.

    I read the manual and thought I understood (ha!). I also searched the forum and couldn't find what I might have done wrong. Thanks for the correction. Yes.....still very confusing IMHO.

    Mike

Similar Threads

  1. DEFINE OSC too limited
    By mytekcontrols in forum PBP Wish List
    Replies: 18
    Last Post: - 28th July 2015, 02:32
  2. 'DEFINE OSC 8' seems to be ignored by PBP ?
    By mr.sneezy in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 26th May 2010, 11:50
  3. Define osc 1
    By ronsimpson in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 1st October 2009, 06:35
  4. Define osc
    By jderson in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 2nd July 2009, 06:05
  5. Define Osc Not Working
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd February 2005, 11:23

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