bootloader questions


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Posts
    72

    Default bootloader questions

    hello all

    i use a bootloader in a project out in the field.
    it is a read in from some buttons and send the value out over serial command. now, sometimes it sends obviously always the same code on each button instead a specific one. it seems that it is after a new power up and stays as long as power is supplied...

    beside this, some questions for validation. i have tested all before shipping, but just in case :

    - this bootloader (16F876a_04.hex) works also on a 16LF876A, or?
    - the bootloader waits after power up for some serial stuff. the pic doesn't send out anything by himself if he hasn't received something first, right?
    - in the application program, the code below is at begin. the fuse config and the define osc didn't affect the bootloader, or?

    thansk a lot for your answers, mischl

    Code:
    Include "modedefs.bas" ' Include serial modes
    
    '-- FUSE CONFIGURATIONS ----------------------------------------- 
    
    @ device pic16F876a, hs_osc ' oscillator selection 
    @ device pic16F876a, wdt_off ' watchdog timer 
    @ device pic16F876a, pwrt_on ' power-up timer 
    @ device pic16F876a, bod_on ' brown-out reset 
    @ device pic16F876a, lvp_off ' low-voltage programming 
    @ device pic16F876a, cpd_off ' data eeprom protection _on 
    @ device pic16F876a, wrt_off ' flash program memory write 
    @ device pic16F876a, protect_on ' program code protection _on 
    
    '-- DEFINITIONS ------------------------------------------------- 
    
    Define LOADER_USED 1 ' for bootloader 
    DEFINE OSC 4
    i know it's only microcontrolling, but i like it!

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


    Did you find this post helpful? Yes | No

    Default

    Config fuses don't affect anything in your code. They must be set manually only when loading the Loader.HEX file the first time.

    Code:
    @ device pic16F876a, hs_osc ' oscillator selection
    @ 4MHZ it should be XT... but the default one should already be XT

    Code:
    @ device pic16F876a, bod_on ' brown-out reset
    If the application run @3V... it may cause some problem... if it's the application i feel it is...

    - this bootloader (16F876a_04.hex) works also on a 16LF876A, or?
    Should
    - the bootloader waits after power up for some serial stuff. the pic doesn't send out anything by himself if he hasn't received something first, right?
    Yup!
    Steve

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

  3. #3
    Join Date
    Jan 2005
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    hi steve

    thans a lot for your answers.

    the circuit is at 5volt so no problems with brown out.

    a question to the oscillator selection : i burned the 4mhz bootloader with HS set as config fuse. as i read in the datasheet, there is a table with testing at 4mhz of both, hs and xt. is this correct to use hs at 4mhz?

    thanks again
    i know it's only microcontrolling, but i like it!

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


    Did you find this post helpful? Yes | No

    Default

    Usually XT is for 4MHZ. I heard some lazy crystal (not resonator) may work better with HS but... there's certainely something better to do prior using HS fuse... well... as now i never have any problem with any 4MHZ crystal i use, and always set XT fuse for that. So is this because of the HS fuse? Maybe yes maybe no. It's sounds to me a bad crytsal or PIC start-up for sure but why? Bad capacitor, bad crystal, HS fuse. The only thing i can suggest is to set to XT and test it. Same problem? Could also be caused by a slow start-up power supply... Power-up timer fuse 'may' help.
    Steve

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

Similar Threads

  1. PIC18F4680 bootloader
    By vinyl_theif in forum General
    Replies: 1
    Last Post: - 29th January 2009, 17:45
  2. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 23:51
  3. USBDemo with Bootloader
    By vacpress in forum USB
    Replies: 4
    Last Post: - 25th January 2007, 22:29
  4. More MCS+ Bootloader Questions
    By milestag in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 21st October 2005, 20:43
  5. Bootloader Problems
    By rossfree in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th February 2005, 17:51

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