18f4550


Closed Thread
Results 1 to 16 of 16

Thread: 18f4550

Hybrid View

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

    Question 18f4550

    Hi to every picbasic crazy brain,

    I have an experiance in pic16f628.
    I decide to do the next step to pic's.So i choose the 18f4550.

    Please I need a sample code to begin with a blink led.

    PicBsic pro 2.47
    PICKIT2
    MPLAB IDE v7.60

    Thanks in advance
    Nikos

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ngeronikolos View Post
    Hi to every picbasic crazy brain,

    I have an experiance in pic16f628.
    I decide to do the next step to pic's.So i choose the 18f4550.

    Please I need a sample code to begin with a blink led.

    PicBsic pro 2.47
    PICKIT2
    MPLAB IDE v7.60

    Thanks in advance
    Nikos
    Since you have PBP 2.47, there is an example in the book.

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


    Did you find this post helpful? Yes | No

    Default

    Hello,

    Please help I need sample code for my first program on PIC18F4550.

    Thanks in advanve
    Nikos

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ngeronikolos View Post
    Hello,

    Please help I need sample code for my first program on PIC18F4550.

    Thanks in advanve
    Nikos
    Refer to post #2!!! Section 2.2

  5. #5
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ngeronikolos View Post
    I have an experiance in pic16f628.
    I decide to do the next step to pic's.So i choose the 18f4550.

    Please I need a sample code to begin with a blink led.
    Why not just put one of your existing programs on the 18F4550 ?

    Or are you asking for a sample program to test some of the additional features on the device (which probably wouldnt be needed for "Blink LED")
    Keith

    www.diyha.co.uk
    www.kat5.tv

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


    Did you find this post helpful? Yes | No

    Default

    ok

    Let's say that I am going to use the code from 16f628 to blink a led in Porta.1

    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

    How I will use the internal osc?

    In 16f628 i did this:
    @ DEVICE pic16f628, INTRC_OSC_NOCLKOUT

    Now it did not work.
    What else it needs to work?

    Nikos

  7. #7
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ngeronikolos View Post
    ok
    How I will use the internal osc?

    In 16f628 i did this:
    @ DEVICE pic16f628, INTRC_OSC_NOCLKOUT

    Now it did not work.
    What else it needs to work?

    Nikos
    How did you find out how to set the Internal Oscilator for the 16F628 ?

    Presumably by looking in the datasheet for the device to see what needed to be configured.

    By looking in the datasheet for any PIC you will be able to find what needs to be set. It may take a few tries before you get the correct results but that is how you learn....from your mistakes.

    Also read the sections about Analogue Ports and Comparators.
    Last edited by keithdoxey; - 16th June 2007 at 19:31.
    Keith

    www.diyha.co.uk
    www.kat5.tv

  8. #8
    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.

  9. #9
    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.

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