bootloader


Closed Thread
Results 1 to 8 of 8

Thread: bootloader

  1. #1
    pierre2030's Avatar
    pierre2030 Guest

    Default bootloader

    hi,
    -i am using bootloader to pragramme my PIC16f877A.
    -but,the code i programme to it,i cant get back the result i want.......
    -like

    define loader user 1
    define osc 20

    trisA=%00000000

    blink:

    high porta.1
    pause 1000
    low porta.1
    pause 1000

    goto blink

    end

    -the outcome suppose should be the LED on and off after 1 second
    -but, what i get after programme with the bootloader,the LED only on continue....
    -can anyone help me with this?(i should not have this problem if i using the programmer to progrmamme the pic.)

    thank u

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    First, try PortB instead of PortA and see if it works for you.

    Then go look in the DATASHEET for your PIC to discover how to switch OFF the ADC's (Analogue to Digital Converters) and the Comparators before you play with PortA again.

    Like I keep saying (several times a week), nobody reads Datasheets.

  3. #3
    inteco's Avatar
    inteco Guest


    Did you find this post helpful? Yes | No

    Default

    did you put a 330ohm resistor in front of the LED, else it won't
    blink.
    also need to add
    ADCON1 = %00000110 ' switch off all the ADC
    hope this work

  4. #4
    Join Date
    Jan 2007
    Location
    Boise, Idaho USA
    Posts
    4


    Did you find this post helpful? Yes | No

    Default bootloader problems

    make sure you have your bootloader lines tied to ground (or to power, depending on how you set up your initialization scheme) to avoid unintentionally triggering the bootloader during runtime.

  5. #5
    Join Date
    Jan 2007
    Location
    Boise, Idaho USA
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ken Howell View Post
    make sure you have your bootloader lines tied to ground (or to power, depending on how you set up your initialization scheme) to avoid unintentionally triggering the bootloader during runtime.
    I should have said "tied through a high-value (e.g. 300k) resistor....."

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by pierre2030 View Post
    hi,
    -i am using bootloader to pragramme my PIC16f877A.
    -but,the code i programme to it,i cant get back the result i want.......
    -like

    define loader user 1
    is this typo (define loader user 1) in your code or only here, it should read :
    Code:
    DEFINE LOADER_USED 1 ' Comment out if not using boot-loader
    no?
    Also make sure your config fuses are set correctly and check the connections to your crystal.
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  7. #7
    Join Date
    Dec 2003
    Location
    Storrs, Ct.
    Posts
    91


    Did you find this post helpful? Yes | No

    Default Somewhat off topic

    I've noticed in several posts, some by the big guns also, the use of lower case when doing a DEFINE.
    The manual says all DEFINEs must be in upper case.(DEFINE OSC 20)
    I've had programs not run because of this (DEFINE osc 20) but also had some run with the lower case DEFINE.

    Is this a mandatory rule or just hit or miss?

    Just curious..
    "It will never happen here!" just happened here.
    My thoughts and prayers for Sandy Hook victims and families.

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


    Did you find this post helpful? Yes | No

    Default

    It depends on the assembler you are using.

    MPASM is case sensitive by default, and must have uppercase in the define's. (unless case sensitivity is turned off)

    PM is not case sensitive, so it can take either upper or lower.

    But since you don't know what other people are using, anything posted on the forum should be uppercase. (just a request)
    <br>
    DT

Similar Threads

  1. PIC18F4680 bootloader
    By vinyl_theif in forum General
    Replies: 1
    Last Post: - 29th January 2009, 18:45
  2. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd November 2008, 00:51
  3. USBDemo with Bootloader
    By vacpress in forum USB
    Replies: 4
    Last Post: - 25th January 2007, 23:29
  4. Bootloader Problems
    By rossfree in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th February 2005, 18:51
  5. Replies: 3
    Last Post: - 26th January 2005, 14:41

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