18F2620 pbp3 example config please


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,617


    Did you find this post helpful? Yes | No

    Default Re: 18F2620 pbp3 example config please

    Hi,
    My guess is that it's because on the 16 series (10 & 12 too I believe) the memory is "measured" in WORDS (14-bit words if I'm not mistaken) while on the 18 series it's measured in BYTES. So I don't think your program is actually getting twice as big, it's just displaying the size of it in BYTES instead of in WORDS.

    /Henrik.

  2. #2


    Did you find this post helpful? Yes | No

    Default Still get pickit2 config bits warning

    I still get the some config bits warning with pickit 2.
    I can't see why?

    Code:
    '------------------------------ General 18F2620 configuration --------------------------
    
    #CONFIG
     __CONFIG _CONFIG1H, _OSC_INTIO67_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
     __CONFIG _CONFIG2L, _PWRT_OFF_2L & _BOREN_OFF_2L
     __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
     __CONFIG _CONFIG3H, _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_OFF_3H
     __CONFIG _CONFIG4L, _STVREN_OFF_4L & _LVP_OFF_4L & _XINST_OFF_4L & _DEBUG_OFF_4L
    #ENDCONFIG
    
    
    DEFINE OSC 8			'Set PicBasic Pro processor speed to 8 Mhz 
    OSCCON = %01110000 		'Internal 8 mhz Osc  
    
    WDTCON = %00010101		'Set watchdog Timer for 1 second 
    
    CMCON  = %00000111		'Comparators Off
    CVRCON = %00000000		'CvRef Powered Down 
    
    CCP1CON= %00001100		'CCP1 Module PWM Mode
    CCP2CON= %00000000		'CCP2 Module Disabled 
    
    HLVDCON= %00000000		'HLVCON Disabled
    
    T1CON  = %00110000		'$30 = Prescaler 1:8, TMR1 OFF
    	
    TRISA = %00001011 		'SET PORTA0, A1 & A3 AS INPUTS, REST AS OUTPUTS
    TRISB = %00000000 		'SET PORTB AS OUTPUTS
    TRISC = %10010000 		'SET PORTC AS OUTPUTS EXCEPT PORT C4 & C7
    	
    ADCON0 = %00000001		'SETUP ADC & ENABLE ADC MODULE on AN0
    ADCON1 = %00001110		'SETUP ADC SET REFV to VDD & VSS AN0 
    ADCON2 = %00100010		'SETUP ADC FOSC/32 LEFT JUSTIFY TAD 8

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,617


    Did you find this post helpful? Yes | No

    Default Re: 18F2620 pbp3 example config please

    Hi,
    What exactly does that mean, what warnings do you get and from where do you get them?

    Your code compiles and assembles fine with PBP 3.0.7.4 & MPASM 5.45. Are you using the standalone software for the PICKit2 and is it THAT software that gives you these misterious warnings?

    /Henrik.

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: 18F2620 pbp3 example config please

    Make a "Complete" set of configs for any chip with ease.

    meCONFIG
    http://support.melabs.com/content/563-meCONFIG
    DT

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: 18F2620 pbp3 example config please

    Yes the pickit 2 software states when programming that some configuration bits not in acceptable condition. It still programs and works fine but is disconcerting for users.

    That new meconfig software is interesting I see quite a few bits/parameters I have ignored/did not know about. :?
    Last edited by retepsnikrep; - 11th March 2014 at 17:00.

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: 18F2620 pbp3 example config please

    The PICkit software expects to see a value for EVERY configuration word.

    The latest versions of PBP3 do create default values for all of them.
    But when you use the #CONFIG block, it overrides all of the defaults, and you should include a "Complete" set for use with the PICkit programmers.

    Like you said, it will program and work ... but a complete set of configs will eliminate that warning.
    DT

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,671


    Did you find this post helpful? Yes | No

    Default Re: 18F2620 pbp3 example config please

    melabs have a neat config editor meCONFIG ITS WORTH DOWNLOADING and free , or check out the DEVICE_REFERENCE folder in your pbp3 installed directory


    but for now try this
    Code:
    #CONFIG
      CONFIG  OSC = INTIO67
      CONFIG  FCMEN = OFF
      CONFIG  IESO = OFF
      CONFIG  PWRT = OFF
      CONFIG  BOREN = OFF
      CONFIG  BORV = 3
      CONFIG  WDT = ON
      CONFIG  WDTPS = 512
      CONFIG  CCP2MX = PORTC
      CONFIG  PBADEN = OFF
      CONFIG  LPT1OSC = OFF
      CONFIG  MCLRE = ON
      CONFIG  STVREN = ON
      CONFIG  LVP = OFF
      CONFIG  XINST = OFF
      CONFIG  DEBUG = OFF
      CONFIG  CP0 = OFF
      CONFIG  CP1 = OFF
      CONFIG  CP2 = OFF
      CONFIG  CP3 = OFF
      CONFIG  CPB = OFF
      CONFIG  CPD = OFF
      CONFIG  WRT0 = OFF
      CONFIG  WRT1 = OFF
      CONFIG  WRT2 = OFF
      CONFIG  WRT3 = OFF
      CONFIG  WRTC = OFF
      CONFIG  WRTB = OFF
      CONFIG  WRTD = OFF
      CONFIG  EBTR0 = OFF
      CONFIG  EBTR1 = OFF
      CONFIG  EBTR2 = OFF
      CONFIG  EBTR3 = OFF
      CONFIG  EBTRB = OFF
    #ENDCONFIG

    ps not sure why your asking for PIC18F4520 config info in a 18F2620 thread why not start a new one ?
    Last edited by richard; - 25th November 2014 at 23:17.

Members who have read this thread : 1

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