18f4550


Closed Thread
Results 1 to 16 of 16

Thread: 18f4550

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    What the heck happen on this forum since few weeks/months?

    Guys, if you can't help, don't answer, don't waste your/our time and bandwith.

    Even if this is a simple question, 18F4550 have tons of Configuration fuse to set. Can be enough to stop someone to use it.

    There's really a lot of a s s kicking to do here

    --------------------------------------------------------------------------

    ngeronikolos,

    have a look at the following, OK, it's more than a LED blink, but this should give you some hints at least about the config fuses settings.

    http://www.picbasic.co.uk/forum/show...ght=pic18f4550

    HTH
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    What the heck happen on this forum since few weeks/months? Guys, if you can't help, don't answer, don't waste your/our time and bandwidth. Even if this is a simple question, 18F4550 have tons of Configuration fuse to set. Can be enough to stop someone to use it. There's really a lot of a s s kicking to do here
    Because...even without setting config registers (I suppose depending on the programmer and any previous settings that might be 'locked in'), the '4550 will start up (as most newer PICs will) with a 1Mhz internal clock (depending on the PIC model), not perfect, but enough to get things up and running... especially the ol' "blinky led" type program.
    And...You and I both know that the '628 blinky led program wasn't going to work as expected in the earlier post since there is no mention of the ADCON CMCON registers. This is all mentioned in the PBP manual under section 2.5, which is labeled I've Got Troubles, where it specifically mentions the comparator and the analog ports, not to mention the issues with RA4, all of which seem to plague SOOOO many people. But that assumes that the person has a copy of the book.
    And as far as the pins being configured as inputs on reset, the HIGH and LOW statement for the 'blinky led' program should take care of that.
    Last edited by skimask; - 16th June 2007 at 23:01.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    i know you wanted to say CMCON for the 16F628
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask
    Because...even without setting config registers (I suppose depending on the programmer and any previous settings that might be 'locked in'), the '4550 will start up (as most newer PICs will) with a 1Mhz internal clock
    Except that the default config settings in the .INC files for these chips are for a 20Mhz crystal, using the PLL to get 48Mhz to both USB and CPU.

    Maybe if you tell the programmer not to write the config settings it might .. stress might, come up with the internal oscillator, but NOT defining the required conditions, and hoping it does what you want, is obviously NOT the right way to do things.

    And, while we're on the subject of the "right way to do things" ...

    When someone asks a question on the Forum, the "right way" is to attempt to provide an answer.
    Pointing them to Section 2.2 of the Manual (Your First Program), is just plain Rude!<hr>
    Now, for that "Answering the question" part...
    Oh, and let me add here that it's preferable to have actually tested the answers you give.
    Pull out the 4550, plug it in a breadboard and make sure you're giving an answer, not more problems for the person to deal with.

    In my case it's easy... Just pull out the mister_e 18F4550 USB Demo prototype (minus a few LED's) from
    http://www.picbasic.co.uk/forum/showthread.php?p=31405
    (Yup, I keep them.)

    Which then allows me to present the following post, with great confidence that it'll work. Because I've actually done it.
    <br>
    DT

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


    Did you find this post helpful? Yes | No

    Default

    Nikos,

    If you haven't already, it's best to comment out the default oscillator settings in the 18F4550.inc file in the PBP folder, I'm sure you've done that before with other PIC's ...

    Then you can set the options in your main program.
    Here's a possibility for blinking an LED on PORTA.1 with a 4550 using the Internal Oscillator @4Mhz and your original code ...
    Code:
    '18F4550 with Int OSC Blinky
    
    @   __CONFIG   _CONFIG1H,  _FOSC_INTOSC_XT_1H
    
    DEFINE OSC 4         ; CPU runs @ 4 Mhz
    OSCCON = %01100010   ; 4 Mhz Internal Oscillator
    
    ;DEFINE OSC 8         ; CPU runs @ 8 Mhz
    ;OSCCON = %01110010   ; 8 Mhz Internal Oscillator
    
    ADCON1 = $0F         ; Disable Analog inputs
    
    loop:
        High PORTA.1 'Turn on LED
        Pause 500 ' Delay for .5 seconds
        Low PORTA.1 'Turn off LED
        Pause 500 ' Delay for .5 seconds
    Goto loop ' Go back to loop and blink LED forever
    
    End
    Keep in mind that the internal oscillator can't drive the USB module. But you can add a crystal to drive the USB and still run the CPU on Internal. Your choice.

    HTH,
    DT

  6. #6
    Join Date
    Feb 2005
    Location
    GREECE
    Posts
    120


    Did you find this post helpful? Yes | No

    Question

    Thanks to every one that want to help and share with us a piece of his
    (or her) experience.

    According to Darrel and his piece of his program, I have a problem.
    I used to use Micrcode studio Plus for 16f628.
    Now with the 18f4550 I need the MPLAB.So, I download the latest version of it and set it up to me laptop.
    I did what the microEngineering Labs says about the :
    --The PICBASIC™ and PICBASIC PRO™ Compilers can now be used with Microchip's MPLAB®!--
    http://www.melabs.com/support/mplab.htm

    After all that I try to compile the 18F4550 with Int OSC Blinky that Darrel post and I get two errors Error[118] look at the attached photo

    Please advice
    Nikos
    Attached Images Attached Images  

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. 18f4550 usb problem.. so im getting crazy..
    By MeSaKu in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th May 2009, 22:03
  2. Usb Mass Storage With 18f4550
    By wagner in forum USB
    Replies: 8
    Last Post: - 17th August 2008, 16:46
  3. 18F4550 to 18F2550
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th September 2007, 23:13
  4. How can I turn off USB support in 18F4550
    By BrianT in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th September 2007, 03:56
  5. USB Programmer for 18F4550 PICs
    By Kamikaze47 in forum USB
    Replies: 8
    Last Post: - 21st August 2007, 16:29

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