PIC18F4620 Programming problem


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Posts
    21

    Default PIC18F4620 Programming problem

    Hello everyone. I am having a problem with PBP where I am not able to program my PIC18F4620. I know everything is OK with my PIC and the circuit as I can use another program called PIC18 Simulator IDE to program it and everything works fine. I use a bootloader but even without the booloader it just doesn't work when I try to program it with PBP. I am thinking that I must have something not configure properly on my PBP or something. I'll appreciate if someone can help with this as I have already spent three days on this and can't locate the problem. Following my code:

    '********************
    DEFINE LOADER_USED 1 'Bootloader Used
    @ __CONFIG _CONFIG1H, _OSC_HS_1H
    DEFINE OSC 8
    loop:
    Serout2 PORTB.7,16468,["Testing123"] 'For PC
    High PORTA.0
    Low PORTD.0
    pause 1000
    Low PORTA.0
    High PORTD.0
    pause 1000
    Goto loop
    '*********************


    Thanks in advance.

    Javier.
    Last edited by JavPar; - 5th December 2008 at 04:34.

  2. #2
    fronkensteen's Avatar
    fronkensteen Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JavPar View Post
    Hello everyone. I am having a problem with PBP where I am not able to program my PIC18F4620. I know everything is OK with my PIC and the circuit as I can use another program called PIC18 Simulator IDE to program it and everything works fine. I use a bootloader but even without the booloader it just doesn't work when I try to program it with PBP. I am thinking that I must have something not configure properly on my PBP or something. I'll appreciate if someone can help with this as I have already spent three days on this and can't locate the problem. Following my code:
    Saw this one earlier today

    http://www.picbasic.co.uk/forum/showthread.php?t=10214

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Welcome to the forum.

    Here is how it works with people trying to sell books and simulators.

    I made an LED blink on a 16F84...Now I am expert with MiroChips!
    I will write a book.

    I downloaded a compiler to use... made LED blink..Expert again!
    I will make a Simulator.

    It is obvious the person that made the simulator does not know PIC chips or they would have had an error show when you are trying to use an ADC pin as an output before it has been set up for that function.

    Stop wasting your time with that crap and spend the same time reading the data sheet and the manual of the parts/ compiler you are using.

    This thread should get you going.
    http://www.picbasic.co.uk/forum/showthread.php?t=561
    It talks about setting the ADC to digital.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Dec 2008
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Thank you for the links, but they do not help me. Maybe I didn't explain myself clearly. I only use the simulator to write the code which I burn into the chip which works 100% in my real life circuit. I use the melabs U2 programmer. Regarding reading the datasheet, I have it and I always refer to it when working on my chip.

    I am trying to NOT use the simulator program anymore so I can only use PBP. But it is not working.

    Javier.

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JavPar View Post
    I only use the simulator to write the code which I burn into the chip which works 100% in my real life circuit.
    I am trying to NOT use the simulator program anymore so I can only use PBP. But it is not working.
    I am not sure what is not working.
    Dave
    Always wear safety glasses while programming.

  6. #6
    fronkensteen's Avatar
    fronkensteen Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JavPar View Post
    Maybe I didn't explain myself clearly.
    There's no maybe about it.

    Regarding reading the datasheet, I have it and I always refer to it when working on my chip.
    And if you actually did have and/or use the datasheet, you would know that PortA.0 (and many other pin) function as analog inputs upon reset and will not function as digital outputs without further configuration.

    I am trying to NOT use the simulator program anymore so I can only use PBP. But it is not working.
    Huh?

  7. #7
    Join Date
    Dec 2008
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    I really appreciate you guys trying to help. The code that you see on my previous post makes the leds blinks, both porta.0 and portd.0. I do not know about other pics, but on the 18F4620 the port is digital as per the datasheet. If you want to use for ADC, then you must specify it on code. It is on chapter 19 of the datasheet. Again, the code works 100% when I use the Basic editor on the simulator or if I use assembler. I only use the basic editor of the simulator to write the code and create the hex file to then burn it on the chip.

    My point is, when I use MicroCode Studio to write code and I want to pass it to my chip, the code does not work. In other words, the leds do not blink. I think there might be something wrong or I am doing something wrong on my code.

Similar Threads

  1. 16F676 programming problem
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th May 2009, 17:39
  2. Programming Problem with PIC16F819
    By Dick Ivers in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 24th July 2007, 18:42
  3. Problem with Interrupt on PIC18F4620 PORTB
    By rookie in forum Off Topic
    Replies: 1
    Last Post: - 22nd March 2007, 01:34
  4. Problem programming the PIC16F648A
    By Edgardo_2 in forum General
    Replies: 2
    Last Post: - 29th December 2006, 00:02
  5. Problem with "on Interrupt" and PIC18F4620
    By philtep in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st September 2005, 02:24

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