+ Reply to Thread
Results 1 to 5 of 5

Thread: 18f26k20 working problem

  1. #1
    Licensed User bugi's Avatar
    Join Date
    Aug 2011
    Location
    Istanbul
    Posts
    56

    Default 18f26k20 working problem

    Hi everybody,

    I live a problem with 18f26k20.

    My codes working perfect with 18f46k20. I use serial CLCD with Pll 16x4=64 Mhz. (also all xtal freq.)
    I init the lcd and send data or command with 4 pins and I don't use any spi or other command.
    I use 1 or 0 with port and pin name. (ex. Portb.1=0 faster than the shiftout )

    But 18f26k20 drives the same lcd only with 4-8-12-16 Mhz or 4Mhz with pll=16 Mhz. It doesn't work faster than 16 Mhz. (32 or 64 Mhz.) Pic works all speed also 32 or 64 Mhz but can not drive or init this LCd. I have changed the old pic with a new one but the result is the same. I'm going crazy...

    Are there any factory defect or what can it be ? I use soic package.

    Best Regards.

    Bugra

    Hi, its great to see you visiting our forum. Why not try Proton Compiler for FREE?

    Download the FREE version of Proton Compiler, Its called Amicus18 and its available from HERE

    Already using proton Compiler??? Get rid of these pesky messages... get LICENSED USER STATUS




  2. If you're a Licensed user of PROTON DEVELOPMENT SUITE, apply for Licensed User Status to remove these pesky messages
     and get access to additional forum areas, Beta test downloads and more!

  3. #2
    Super Moderator fanie's Avatar
    Join Date
    Oct 2005
    Location
    Crime riddled ZA
    Posts
    8,019


    Default Re: 18f26k20 working problem

    I live a problem with 18f26k20
    Change your lifestyle or it's going to kill you - eventually

    How big is the program you're pumping in the 18f26k20 ?
    Fanie
    FAZE
    73 de ZS6FAZ
    http://fanie.cambs.net
    Stick to pic

  4. #3
    Licensed User normnet's Avatar
    Join Date
    Jul 2004
    Location
    Minnesota USA
    Posts
    832


    Default Re: 18f26k20 working problem

    Quote Originally Posted by bugi View Post
    Hi everybody,

    I live a problem with 18f26k20.

    My codes working perfect with 18f46k20. I use serial CLCD with Pll 16x4=64 Mhz. (also all xtal freq.)
    I init the lcd and send data or command with 4 pins and I don't use any spi or other command.
    I use 1 or 0 with port and pin name. (ex. Portb.1=0 faster than the shiftout )

    But 18f26k20 drives the same lcd only with 4-8-12-16 Mhz or 4Mhz with pll=16 Mhz. It doesn't work faster than 16 Mhz. (32 or 64 Mhz.) Pic works all speed also 32 or 64 Mhz but can not drive or init this LCd. I have changed the old pic with a new one but the result is the same. I'm going crazy...

    Are there any factory defect or what can it be ? I use soic package.

    Best Regards.

    Bugra

    This is what I arrived at.

    Norm
    Code:
    Device = 18F26K20  
    
    Config_Start
    '   FOSC = HS ; HS oscillator
    '   FOSC = HSPLL ; HS oscillator, PLL enabled (Clock Frequency = 4 x FOSC1)
       FOSC = INTIO67 ; INTERNAL OSCILLATOR .PORTA.6 AND 7 I/O's
       FCMEN = OFF ; Fail-Safe Clock Monitor disabled
       IESO = OFF ; Oscillator Switchover mode disabled
       PWRT = On ; PWRT enabled
       BOREN = On ; Brown-out Reset enabled and controlled by software (SBOREN is enabled)
       BORV = 27 ; VBOR set to 2.7 V nominal
       WDTEN = OFF ; WDT is controlled by SWDTEN bit of the WDTCON register
       MCLRE = On ; MCLR pin enabled, RE3 input pin disabled
       HFOFST = OFF ; The system clock is held off until the HF-INTOSC is stable.
       LPT1OSC = OFF ; Disabled, T1 operates in standard power mode.
       PBADEN = OFF ; PORTB<4:0> pins are configured as digital I/O on Reset
       STVREN = On ; Stack full/underflow will cause Reset
       LVP = OFF ; Single-Supply ICSP disabled
       XINST = OFF ; Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
       Debug = OFF ; Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins
       CP0 = OFF ; Block 0 (000800-003FFFh) not code-protected
       CP1 = OFF ; Block 1 (004000-007FFFh) not code-protected
       CP2 = OFF ; Block 2 (008000-00BFFFh) not code-protected
       CP3 = OFF ; Block 3 (00C000-00FFFFh) not code-protected
       CPB = OFF ; Boot block (000000-0007FFh) not code-protected
       CPD = OFF ; Data EEPROM not code-protected
       WRT0 = OFF ; Block 0 (000800-003FFFh) not write-protected
       WRT1 = OFF ; Block 1 (004000-007FFFh) not write-protected
       WRT2 = OFF ; Block 2 (008000-00BFFFh) not write-protected
       WRT3 = OFF ; Block 3 (00C000-00FFFFh) not write-protected
       WRTB = OFF ; Boot block (000000-0007FFh) not write-protected
       WRTC = OFF ; Configuration registers (300000-3000FFh) not write-protected
       WRTD = OFF ; Data EEPROM not write-protected
       EBTR0 = OFF ; Block 0 (000800-003FFFh) not protected from table reads executed in other blocks
       EBTR1 = OFF ; Block 1 (004000-007FFFh) not protected from table reads executed in other blocks
       EBTR2 = OFF ; Block 2 (008000-00BFFFh) not protected from table reads executed in other blocks
       EBTR3 = OFF ; Block 3 (00C000-00FFFFh) not protected from table reads executed in other blocks
       EBTRB = OFF ; Boot block (000000-0007FFh) not protected from table reads executed in other blocks
    Config_End
    
    '    XTAL = 64      ' REQUIRES PLL  ' USE 16 MHz CRYSTAL & DECLARE: XTAL = 64
    '    XTAL = 48      ' REQUIRES PLL  ' USE 12 MHz CRYSTAL & DECLARE: XTAL = 48
    '    Xtal = 40      ' REQUIRES PLL  ' USE 10 MHz CRYSTAL & DECLARE: XTAL = 40
    '    Xtal = 20
        XTAL = 16  'INTERNAL OSCILLATOR MUST BE 8 OR 16 FOR PLL, CONFIGURE OSCCON AND OSCTUNE FOR PLL
    
        'UNCOMMENT FOR INTERNAL ONLY
        OSCCON = %01110110  'INTERNAL OSCILLATOR
        OSCTUNE = %01000000 '%x1xxxxxx = PLL ENABLED  MUST BE 8 OR 16MHz IN OSCCON FOR PLL

  5. #4
    Licensed User bugi's Avatar
    Join Date
    Aug 2011
    Location
    Istanbul
    Posts
    56


    Default Re: 18f26k20 working problem

    Hi,

    How big is the program you're pumping in the 18f26k20 ?
    There are only lcd init routines in 18f25k20. And I clear the screen difficult colors.
    With 18f46k20, I print to screen many pictures from sd and play wav files. Don't worry I protect myself

    Dear Norm,

    I have tested your configs it woks but without pll. Pll doesn't work. Osctune =$40 doesn't change anything.

    Otherwise, why doesn't device work without config. It should work only Xtal=16 and pll_req 1 declares =64Mhz as usual.

    Is there any problem with Proton? Is It possible?

    I downloaded errata pdf from Microchip and there are a lot of problems in these pics. But I didn't see anyting about this problem for revision ID (0xC) of mine.

    18f46k20 works but 18f26k20 doesn't work. Each one is the same revision (0xC) '26k20 works 16Mhz with internal or external osc. I have bought 20 pieces 26k20 and 10 pieces 46k20. If these are really defected pics I'm going to fire them and I'll always love Microchip Because I don't want to give my time anymore

    I open all advices

    Thanks&Regards

    Bugra
    Last edited by bugi; 6th February 2012 at 17:04.

  6. #5
    Licensed User bugi's Avatar
    Join Date
    Aug 2011
    Location
    Istanbul
    Posts
    56


    Default Re: 18f26k20 working problem

    Hi,

    The bad news.

    I've tried my other 18f46k20 micros and they don't work like 26k20. I can't belive it, only one pic has worked I think there is a ghost inside

    I looked to pins with scope, clock, rs and cs pins at 4-8-10-12-16Mhz without pll and 4-8-10-12-16 with pll.
    Everything looks proportional but only works 4Mhz with pll and all other ocs without pll. (works lcd module)
    At the same circuit and codes are ok with 18f452. 4-8-10-12-16-20 Mhz and 4-8-10Mhz with pll are OK.

    I don't understand, maybe 18FxxKxx family don't like me

    Regards.

    Bugra

+ Reply to Thread

Similar Threads

  1. HID not working
    By DanielN in forum The Lounge
    Replies: 24
    Last Post: 25th March 2011, 18:09
  2. 2x8 LCD not working.
    By Ivan123 in forum Proton Plus Compiler v3
    Replies: 13
    Last Post: 3rd August 2010, 04:39
  3. Got it working!
    By rcurl in forum USBWiz
    Replies: 0
    Last Post: 5th October 2007, 14:01
  4. Why is my I2C bus not working?
    By C H Whitehead in forum The Lounge
    Replies: 24
    Last Post: 3rd February 2006, 01:41

Members who have read this thread since 16th May 2012, 02:15 : 0

Actions :  (Set Date)  (Clear Date)

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