Define osc 8 not working on 12f683 - wondering if Its related to include files?


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Posts
    78

    Default Define osc 8 not working on 12f683 - wondering if Its related to include files?

    Hi gang,
    I've been playing with a 12f683 in 4mhz mode and sending results to a serial LCD using "SEROUT pin, T9600, ["text here"]

    works fine.

    But then I tried bumping the internal osc to 8mhz

    OSCCON = %01110111 ' internal oscillator at 8 MHZ
    define osc 8

    The oscillator frequency is definitely changing
    But the "define osc 8" command looks like its being ignored by PBP3.

    I put an Oscope on the serial clock pulse-width to check.
    And with our without the "devine osc 8" there is no change.

    Where should I look for troubleshooting this?
    I'm using Pickit2 as the programmer.

    Big Thanks!!
    Duane

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


    Did you find this post helpful? Yes | No

    Default Re: Define osc 8 not working on 12f683 - wondering if Its related to include files?

    Hi Duane,
    The manual would be the first place to start when troubleshooting this particular problem :-)
    Define is a case sensitive keyword, ie osc is not the same as OSC. So, try define OSC 8.

    /Henrik.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Define osc 8 not working on 12f683 - wondering if Its related to include files?

    THANK YOU! I've been having the same problem for the past year, just adjusted timing manually and never bothered to figure it out.

  4. #4
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: Define osc 8 not working on 12f683 - wondering if Its related to include files?

    Just make sure you enter any "DEFINE" statements as all CAPS.

    They are case sensistive.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,610


    Did you find this post helpful? Yes | No

    Default Re: Define osc 8 not working on 12f683 - wondering if Its related to include files?

    And again, it's WHAT you trying to define that's case sensitive, not the word define itself
    Code:
    DeFiNe OSC 8  ' works
    define OSC 8 ' works
    DEFine OSC 8  'works
    DEFINE OSC 8 ' works
    DEFINE osc 8  'does not work because OSC is what's case sensitive.
    /Henrik.

  6. #6
    Join Date
    Jan 2007
    Posts
    78


    Did you find this post helpful? Yes | No

    Default Re: Define osc 8 not working on 12f683 - wondering if Its related to include files?

    Actually, I'm using Micro Code Studio editor and it auto-magically changes the case of everything to what it likes.
    So I tried typing all upper case and MCSE just changes it to lower case.
    I've looked in the PBP3 manual and don't see anything that would give a hint.
    I think I'll try to email Mel Labs if they have the time to answer.
    I'm sure they've seen that before.
    They designed the compile code, so I would hope they would know what I should be looking for.
    I wonder if there is something in the include file that is over-riding the define statement.
    I'll post what I find out.
    Thanks my friend :-]

Similar Threads

  1. where to put include files
    By queenidog in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st February 2013, 19:10
  2. Post your INCLUDE files here
    By mackrackit in forum Code Examples
    Replies: 4
    Last Post: - 16th September 2011, 23:50
  3. Where are all the INCLUDE files??
    By Heckler in forum General
    Replies: 3
    Last Post: - 13th September 2011, 08:27
  4. Include Files for some Routines
    By rsocor01 in forum PBP Wish List
    Replies: 2
    Last Post: - 23rd April 2010, 19:13
  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