The Screamer bootloader and LCDout


Closed Thread
Results 1 to 7 of 7
  1. #1
    ice's Avatar
    ice Guest

    Default The Screamer bootloader and LCDout

    Hello,
    I am able to run simple programs like blink an LED using the
    DEFINE LOADER_USED 1

    and the Screamer bootloader http://www.sparkfun.com/tutorial/Bloader/bloader.htm

    The bootloadr states thatthe initial line has to be
    org 0x0004, which the DEFINE LOADER_USED 1 seems to do

    However the moment i put a line such as LCDout in my program,
    the screamer REFUSES to load it into the pic

    My other programs[which are in asm] run smoothly with the bootloader,even my serial routines.

    any idea whats going on here

    I also tried the microchipc bootmloader.The problem is,the loader downloads it to the chip,but the program doesnt start at all

    Help me out here please.
    -ice

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


    Did you find this post helpful? Yes | No

    Default

    do you load the bootloader .Hex file into your PIC before?

    If so, i can't help BUT i'll really recommend you the MicroCode Studio Bootloader comming with the full version... that will solve all your problems.
    Steve

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

  3. #3
    ice's Avatar
    ice Guest


    Did you find this post helpful? Yes | No

    Default

    yes i did,
    The serial test routines that are bundled with the loader also work well

    -ice

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    PBP always inserts a goto INIT at location 0. Normally this is all PBP will
    insert from locations 0 - 3 if you use DEFINE LOADER_USED 1 to force the ORG 4.

    Here's an example of what happens with DEFINE LOADER_USED 1

    ORG 0 ; Reset vector at 0
    goto INIT ; Finish initialization <-- a PBP thing for initialization
    ORG 4 ; Make sure no library code in first 4 loc

    When you use the LCDOUT command with PBP, it inserts clrf FLAGS before goto INIT.

    Here's what it looks like.

    ORG 0 ; Reset vector at 0
    clrf FLAGS ; Clear all flags on reset
    goto INIT ; Finish initialization
    ORG 4 ; Make sure no library code in first 4 loc

    FLAGS is a system variable used by PBP, and it only gets inserted before goto INIT when using the LCDOUT command.

    Here's what you can do to fix it to work with the Bloader software.

    Open the PBPPIC14.LIB file and look for this section. Comment out clrf FLAGS as shown below. Save the library file.
    Code:
    ;******************************************
    ;* Startup Code                                                     *
    ;*                                                                        *
    ;* Input      : None                                                 *
    ;* Output     : None                                                *
    ;*                                                                        *
    ;* Notes      : Must be first library routine.                  *
    ;******************************************
    
    ; <<other stuff snipped out here>>
    
      LIST
        ORG 0                       ; Reset vector at 0
      NOLIST
        ifdef ICD_USED
      LIST
            nop                     ; Skip first location for ICD
      NOLIST
        endif
    
        ifdef FLAGS_USED
      LIST
        ;    clrf    FLAGS           ; Clear all flags on reset <----- COMMENT OUT
      NOLIST
        endif
    If you use the LCDOUT command then clear FLAGS in the begining of your PBP code. This instruction should be the first code executed.

    FLAGS=0

    That's it. The clrf FLAGS will not be automatically inserted at location 0, and your PBP programs will work with the Bloader software as-is.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    ice's Avatar
    ice Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks alot Bruce,
    your reply for explantory,ill try tht tday

    BTW,i reloaded the microchip Bootloader V9 and all my PBP programs work well with it including LCDOUT
    i was working on the V2 of the loader.

    Thank you once again.
    -ice

  6. #6
    bartleph's Avatar
    bartleph Guest


    Did you find this post helpful? Yes | No

    Default BootLoaders and 16F877

    Hi,
    I wonder if anyone can help please:-
    I'm trying to use the PicLoader Bootloader. I have PICBASIC PRO Ver 2.30.
    How do I stop my Program from writing over the BootLoader vector...I've seen Bruce's reply further up where he says to modify the PBPPIC14.LIB file to stop the LCD clrf Flags from causing a problem, and I've done that. Should I be using DEFINE ONINT_USED 1 or
    DEFINE LOADER_USED 1 with this version of PicBasic Pro?

    Any help appreciated....Thanks Paul

  7. #7
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by bartleph
    Hi,
    I wonder if anyone can help please:-
    I'm trying to use the PicLoader Bootloader. I have PICBASIC PRO Ver 2.30.
    How do I stop my Program from writing over the BootLoader vector...I've seen Bruce's reply further up where he says to modify the PBPPIC14.LIB file to stop the LCD clrf Flags from causing a problem, and I've done that. Should I be using DEFINE ONINT_USED 1 or
    DEFINE LOADER_USED 1 with this version of PicBasic Pro?

    Any help appreciated....Thanks Paul
    Yes. DEFINE ONINT_USED 1 was used for PBP versions prior to 2.33. Later versions use DEFINE LOADER_USED 1.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. bootloader Freqout problems
    By handgio in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th December 2007, 13:38
  2. help!! With Keypad change
    By clare1 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 12th December 2006, 21:13
  3. Help with me labs Bootloader
    By teknoman2420 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th August 2006, 09:37
  4. Alfat Sd/mmc
    By eoasap in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 24th July 2006, 06:10
  5. LCDout Command causes Interrupt!!??
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 31st March 2005, 04:18

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