+ Reply to Thread
Results 1 to 2 of 2

Thread: Moving from PIC18F1330 to 18F4331 Int. Osc Issue...

  1. #1
    bsodmike Good bsodmike Good
    Join Date
    May 2004
    Location
    0.05eV below the conduction band...
    Posts
    179

    Default Moving from PIC18F1330 to 18F4331 Int. Osc Issue...

    I just ported some code over, and made the necessary adjustments for pin changes etc; code completely compiles. However this is the strange thing.

    On the 1330 I had OSCCON = 0x70 to enable to 8MHz int osc. and PLLEN =0. Since this does not support the PLL, I've removed that line but OSCCON = 0x70 is showing up as 1.98kHz on RA6 when I use:

    Update: Just realised, it should be Fosc/4 on RA6, and as such this is working.

    Problem solved. I tried to define,

    #define PIC18F1330
    #define PIC18F4331

    and use #ifdef...#endif's to swap between chips, but I don't think the compiler liked those names...
    Last edited by bsodmike; 23rd August 2008 at 05:03 PM.
    "Ambition is the last refuge of failure..." --Oscar Wilde
    "Success is not final, failure is not fatal: it is the courage to continue that counts." -- Winston Churchill


  2. #2
    philba Good philba Good philba Good
    Join Date
    Mar 2006
    Location
    Seattle
    Posts
    1,887

    Default

    what ever compiler you are using probably has a define for the selected chip. I'm sure it's in your documentation somewhere.

+ Reply to Thread

Similar Threads

  1. PIC18F1330 & PWM Update.
    By bsodmike in forum Micro Controllers
    Replies: 4
    Latest: 9th October 2009, 08:40 AM
  2. dot matrix moving sign
    By aang_fukakyon in forum Electronic Projects Design/Ideas/Reviews
    Replies: 9
    Latest: 30th July 2007, 04:22 AM
  3. Moving Charge
    By MrJammin in forum Math and Physics
    Replies: 6
    Latest: 11th July 2007, 02:08 PM
  4. moving screen on MP3 player
    By andrew2022 in forum Electronic Projects Design/Ideas/Reviews
    Replies: 3
    Latest: 14th March 2005, 09:13 PM
  5. please help with moving message display
    By sonusonu in forum General Electronics Chat
    Replies: 1
    Latest: 21st February 2003, 02:44 AM

Tags for this Thread