18F2550 and Blink Led


Closed Thread
Results 1 to 40 of 50

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    Tried to follow this method:

    http://melabs.com/support/mplab.htm

    This time I get: Whitelist: Processor 18F2550 disabled in this version of PBP.
    To obtain additional device support, visit melabs.com.*

    Edition is student edition and 18F2550 is definitely included.

  2. #2
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    Restarted the PC, and now compile trough MPLAB works fine, but it is not handy to do so.

  3. #3
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    Figured out. Access restriction rules were causing the problems. Disabled UAC and it now works just fine!

  4. #4
    Join Date
    Mar 2008
    Posts
    59


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    No blinky what am I doing wrong? The below config come from meconfig.exe.


    ;----[18F2550 Hardware Configuration]-------------------------------------------
    #CONFIG
    CONFIG PLLDIV = 5 ; Divide by 5 (20 MHz oscillator input)
    CONFIG CPUDIV = OSC1_PLL2 ; [Primary Oscillator Src: /1][96 MHz PLL Src: /2]
    CONFIG USBDIV = 2 ; USB clock source comes from the 96 MHz PLL divided by 2
    CONFIG FOSC = INTOSCIO_EC ; Internal oscillator, port function on RA6, EC used by USB (INTIO)
    CONFIG FCMEN = OFF ; Fail-Safe Clock Monitor disabled
    CONFIG IESO = OFF ; Oscillator Switchover mode disabled
    CONFIG PWRT = OFF ; PWRT disabled
    CONFIG BOR = ON ; Brown-out Reset enabled in hardware only (SBOREN is disabled)
    CONFIG BORV = 3 ; Minimum setting
    CONFIG VREGEN = ON ; USB voltage regulator enabled
    CONFIG WDT = ON ; WDT enabled
    CONFIG WDTPS = 512 ; 1:512
    CONFIG CCP2MX = OFF ; CCP2 input/output is multiplexed with RB3
    CONFIG PBADEN = OFF ; PORTB<4:0> pins are configured as digital I/O on Reset
    CONFIG LPT1OSC = OFF ; Timer1 configured for higher power operation
    CONFIG MCLRE = OFF ; RE3 input pin enabled; MCLR pin disabled
    CONFIG STVREN = ON ; Stack full/underflow will cause Reset
    CONFIG LVP = OFF ; Single-Supply ICSP disabled
    CONFIG XINST = OFF ; Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
    CONFIG DEBUG = OFF ; Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins
    CONFIG CP0 = OFF ; Block 0 (000800-001FFFh) is not code-protected
    CONFIG CP1 = OFF ; Block 1 (002000-003FFFh) is not code-protected
    CONFIG CP2 = OFF ; Block 2 (004000-005FFFh) is not code-protected
    CONFIG CP3 = OFF ; Block 3 (006000-007FFFh) is not code-protected
    CONFIG CPB = OFF ; Boot block (000000-0007FFh) is not code-protected
    CONFIG CPD = OFF ; Data EEPROM is not code-protected
    CONFIG WRT0 = OFF ; Block 0 (000800-001FFFh) is not write-protected
    CONFIG WRT1 = OFF ; Block 1 (002000-003FFFh) is not write-protected
    CONFIG WRT2 = OFF ; Block 2 (004000-005FFFh) is not write-protected
    CONFIG WRT3 = OFF ; Block 3 (006000-007FFFh) is not write-protected
    CONFIG WRTC = OFF ; Configuration registers (300000-3000FFh) are not write-protected
    CONFIG WRTB = OFF ; Boot block (000000-0007FFh) is not write-protected
    CONFIG WRTD = OFF ; Data EEPROM is not write-protected
    CONFIG EBTR0 = OFF ; Block 0 (000800-001FFFh) is not protected from table reads executed in other blocks
    CONFIG EBTR1 = OFF ; Block 1 (002000-003FFFh) is not protected from table reads executed in other blocks
    CONFIG EBTR2 = OFF ; Block 2 (004000-005FFFh) is not protected from table reads executed in other blocks
    CONFIG EBTR3 = OFF ; Block 3 (006000-007FFFh) is not protected from table reads executed in other blocks
    CONFIG EBTRB = OFF ; Boot block (000000-0007FFh) is not protected from table reads executed in other blocks
    #ENDCONFIG




    ADCON1 = %00001111
    CMCON = 7
    OSCCON = %01110000
    TRISB = %00000000
    OVER:

    low portb.0
    PAUSE 200
    high portb.0
    PAUSE 200
    GOTO OVER
    Last edited by n0yox; - 24th February 2018 at 03:20.

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


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    The oscillator block on the USB equipped devices are a bit complicated.
    It looks to me as if you're trying to run off of the internal oscillator at 8MHz (judging by OSCCON setting INTOSC to 8MHz) yet the two least significant bits of OSCCON selects the primary oscillator - where you may or may not have a x-tal connected (you don't tell us anything about your hardware setup)?

    And you have not told the compiler what frequency you're aiming to run at.

    So, we need a bit more detail regarding what you're trying to do exactly.

    /Henrik.

  6. #6
    Join Date
    Mar 2008
    Posts
    59


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    Thank you for your reply. You are right I am trying to use the internal oscillator and have no idea how to setup the oscillator section. I do not plan to use any of the special features “usb ” of this processor. I did notice my mistake late last night and fixed these lines,
    CONFIG FOSC = INTOSC_XT ; Internal oscillator, XT used by USB (INTXT)
    CONFIG MCLRE = OFF ; RE3 input pin enabled; MCLR pin disabled

    I am blinking now but have no idea how to set up the rest of the configuration. I am using the 18f2550 in place of a 16f648a to acquire more code space. I need all of my IOs to be digital with int.pullups on the top 4 of PORTB “4-7”. The datasheet is a 426 page fun read to say the least. Any help you offer will be appreciated.
    Thank You,

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    The config you have seems fine but unless you want to use the watchdog turn WDT off and you can turb VREGEN off as you're not using USB. One question though, if you aren't using USB, why not use a device similar to 2550 but with additional features and more memory eg 18F25K22?
    George

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