PIC 18F4550, firmware


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    May 2007
    Posts
    21

    Default PIC 18F4550, firmware

    Hi,

    I recently started to use PICBASIC PRO, and trying to write a code which will simply light a led. While using bootloader I recognized that I need to allocate some free space for firmware. How can I do this in PICBASIC? In CCS C, it is possible to write such a code like this.

    #build (reset=0x800)
    #build (interrupt=0x808)
    #org 0x0000, 0x07ff
    void bootloader () {

    #asm
    nop
    #endasm
    }

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by kutsi View Post
    Hi,
    I recently started to use PICBASIC PRO, and trying to write a code which will simply light a led. While using bootloader I recognized that I need to allocate some free space for firmware. How can I do this in PICBASIC? In CCS C, it is possible to write such a code like this.
    #build (reset=0x800)
    #build (interrupt=0x808)
    #org 0x0000, 0x07ff
    void bootloader () {
    #asm
    nop
    #endasm
    }
    Which bootloader are you using?
    Which PIC are you using?
    Which version of PBP are you using?
    Why would you need to allocate free space for firmware while using a bootloader?
    How complicated is this 'shine an led' program of yours?

  3. #3
    Join Date
    May 2007
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    I guess, firmware needs first 2kb of the memory.Therefore the first 800h bits must be allocated...

    PIC18F4550
    PICDEM FS USB DEMO TOOL VERSION 1.00

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by kutsi View Post
    I guess, firmware needs first 2kb of the memory.Therefore the first 800h bits must be allocated...

    PIC18F4550
    PICDEM FS USB DEMO TOOL VERSION 1.00
    As long as your bootloader is supported by PBP, then you shouldn't have to worry about anything.
    What about the rest of the questions?

  5. #5
    Join Date
    May 2007
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Define ONINT_USED 1

    LED var PORTL.0 ' Alias PORTB.0 to LED

    loop: High LED ' Turn on LED connected to PORTL.0
    Pause 500 ' Delay for .5 seconds

    Low LED ' Turn off LED connected to PORTL.0
    Pause 500 ' Delay for .5 seconds

    Goto loop
    End
    This is a simple example from the guide.
    Do I need to define anythin further? osc 20mhz?

    PBP 2.46

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by kutsi View Post
    Define ONINT_USED 1
    LED var PORTL.0 ' Alias PORTB.0 to LED
    loop: High LED ' Turn on LED connected to PORTL.0
    Pause 500 ' Delay for .5 seconds
    Low LED ' Turn off LED connected to PORTL.0
    Pause 500 ' Delay for .5 seconds
    Goto loop
    End
    This is a simple example from the guide.
    Do I need to define anythin further? osc 20mhz?

    PBP 2.46
    Which page is 'Define ONINT_USED 1' on in the guide?

    And since when does a PIC18F4550 have a PortL?

Similar Threads

  1. Pic to Pic Firmware upgrade
    By rjones2102 in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th October 2007, 00:06
  2. getting started with a PIC 18F4550
    By bigbear in forum General
    Replies: 2
    Last Post: - 16th October 2006, 02:31
  3. Build PIC bootloader firmware in PBP?
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th August 2006, 19:53
  4. Pic 18F4550 & VB6
    By lentz in forum USB
    Replies: 1
    Last Post: - 5th April 2006, 00:55
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

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