An other newby, an other blinky probem


Closed Thread
Results 1 to 3 of 3
  1. #1
    Maniac's Avatar
    Maniac Guest

    Smile An other newby, an other blinky problem

    Hello

    I've been reading the posts for quite a while. I hoped that I can figure some stuff out by myself... that didn't happen.
    I am trying to program an 18f452, with no luck do far. I have PBP, and a picstart+ programmer. Also, I used a bootloader from Martin Dubuc's site. (http://mdubuc.freeshell.org/) I insert the bootloader's hex file using the picstart+ in MPlab, then using the Colt bootloader to program the chip in the circuit. I can load the sample blink.hex file (Martins) no problem, and it works.
    When I try to load the hex file generated by pbp, it doesn't.
    I checked my .int files, and changed XT to HS, since I am using a 20MHz crystal. I chaned this at the programmer settings as well. I used the code for the blinking led from a book (PIC robotics), from the PBP manual, and from this site. I added the line: define loader_used 1, so the bootloader code is (or should be) protected.
    Anyone would have any ideas what else should I try? I don't have much experience with programming or PICs.


    thanks, and sorry for an other blinky problem
    Attila
    Last edited by Maniac; - 22nd September 2005 at 18:16.

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


    Did you find this post helpful? Yes | No

    Default

    mmm, what if you skip the bootloader process and dump the PBP .Hex file directly to your PIC without the DEFINE BOOTLOADER_USED 1 ?

    Did you also write at the top DEFINE OSC 20 ???

    What about your code???
    Steve

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

  3. #3
    Maniac's Avatar
    Maniac Guest


    Did you find this post helpful? Yes | No

    Default

    I did what you suggested and it worked! Thanks!
    I still would like to figure it out why it didn't work with the bootloader. I would like to program the PIC in circuit without taking it out.

    Here is the code I used:

    define OSC 20 '20MHz crystal

    loop:
    high PORTB.1 'turn on LED on RB1
    low PORTB.0 'turn off LED on RB0
    Pause 1000 'wait 1 sec
    low PORTB.1 'turn off LED on RB1
    high PORTB.0 'turn on LED on RB0
    pause 1000 'wait 1 sec
    goto loop


    thanks again
    Attila

Similar Threads

  1. DT-INTs Blinky Light question
    By circuitpro in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 5th February 2010, 03:29
  2. RS485 bus - starting probem
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th January 2010, 13:35
  3. Blinky not working with TOGGLE
    By AndrewC in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 08:45
  4. My first Blinky!
    By nomad in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 25th September 2007, 17:29
  5. Newby with ADC problems.
    By Mark Scotford in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th March 2005, 20:09

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