Does 16F628a support debugging or not?


Closed Thread
Results 1 to 19 of 19

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Dave's not here maaann.

    What version of PBP3 do you have?
    The current version is 3.0.5.x
    http://pbp3.com/download.html

    What version of MPLAB do you have?
    Current version - 8.85
    The latest PBP3 will install MPLAB 8.84
    DT

  2. #2
    Join Date
    Jun 2011
    Location
    Indian Harbour Nova Scotia
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: Does 16F628a support debugging or not?

    Sorry Darrel...I know another guy named Dave Taylor.
    I have MCS 5.0.0.3
    PBPX 3.0.1.4
    MPLAB 8.73

    Since I'm grasping at straws here, I will do all the updates.

    BTW, Ran the serial test program you sent me. No matter what character I send out, I get a weird character back, like it's a baud rate problem. I changed baud rates in software to 9600 and the serial comm to same but it still gives same results. I tried even lower rates, no different. My PC serial card was set for 9600 baud, changed it to 19200 and the program and communicator to same. Same results. Type h, get back an "e" with back slanting accent.

  3. #3
    Join Date
    Jun 2011
    Location
    Indian Harbour Nova Scotia
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: Does 16F628a support debugging or not?

    Darrel, I upgraded MPLAB, MCS+ and PBP3.0 as required. No change.
    However, I changed power supply to my circuit, the 16F628a and MAX232 chip. Instead of using the limited power supply of the LabX1, I used my other supply, a switching walwart supply. NOW my serial communicator works first time everytime. Type an "h", get an "h".
    Obviously I was stressing the LabX1 supply and must have caused it to clip or get noisy.

    Still have the compile ICD that doesn't work.

  4. #4
    Join Date
    Jun 2011
    Location
    Indian Harbour Nova Scotia
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: Does 16F628a support debugging or not?

    I have since got my program working on the 16F628 and DO NOT NEED the ICD to troubleshoot it, but I really want to make it work non-the-less for future.

    My serial input works. ICD compile works to the point where I can compile and program, but when I hit RUN, it errors out with a timeout error.

    ICD compile works okay with my 16F887 on the LabX1 board.

    Any ideas?

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


    Did you find this post helpful? Yes | No

    Default Re: Does 16F628a support debugging or not?

    and the CONFIG statement Dave provided cannot have the CPD_OFF fuse because it doesn't exist in a 16F628A.INC file. The program won't compile with CPD_OFF in the string.
    ...

    I have MCS 5.0.0.3
    PBPX 3.0.1.4

    ...

    Darrel, I upgraded MPLAB, MCS+ and PBP3.0 as required. No change.
    Are you saying that you still can't compile with _CPD_OFF in the config line, even after updating?
    If so, you may be compiling for the wrong chip.

    My serial input works.
    And what about the loopback? Do you have that working.
    DT

  6. #6
    Join Date
    Jun 2011
    Location
    Indian Harbour Nova Scotia
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: Does 16F628a support debugging or not?

    • If I put CPD_OFF in the config line, it will not compile, gives me an error that "symbol not previously defined". I looked it up in the .INC file and there is no CPD_OFF key. When I remove it from the CONFIG statement, the program compiles.
    • I have loopback working.
    • I'm compiling for a 16F628a chip. I have 2 circuits with the same chip, one is in the PCB I made, the other is just breadboarded and connected to the MAX232 serial chip to my PC. The latter is for testing.
    • If I ICD compile to the latter circuit, all works well until I RUN and then I get a time-out error. So I'm not even at the point where I can use the serial connection and ICD software.
    Current software: MCS+ 5.0.0.3
    PBPX 3.0.5.4
    MPlab IDE 8.84
    MPLab Suite -XC32 8.84

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


    Did you find this post helpful? Yes | No

    Default Re: Does 16F628a support debugging or not?

    Something doesn't add up.
    This is from the p16F628a.inc file from MPLAB 8.84
    _CPD_OFF is defined, and it compiles fine with the stated config lines.

    Code:
    _LVP_OFF             EQU  H'3F7F'    ; RB4/PGM pin has digital I/O function, HV on MCLR must be used for programming
    _LVP_ON              EQU  H'3FFF'    ; RB4/PGM pin has PGM function, low-voltage programming enabled
    
    _CPD_ON              EQU  H'3EFF'    ; Data memory code-protected
    DATA_CP_ON           EQU  H'3EFF'    ; Data memory code-protected
    _CPD_OFF             EQU  H'3FFF'    ; Data memory code protection off
    DATA_CP_OFF          EQU  H'3FFF'    ; Data memory code protection off
    
    _CP_ON               EQU  H'1FFF'    ; 0000h to 07FFh code-protected
    _CP_OFF              EQU  H'3FFF'    ; Code protection off
    Did you re-boot your computer after installing?
    There is an MPASM-MPLAB Setup that runs once on booting that connects PBP3 to the MPASM path.

    Did you download the larger PBP3 file that has MPLAB in it?
    Did you accept all the defaults during installation?

    If you send the .LST file after compiling, I might be able to see what's wrong. [email protected]
    Last edited by Darrel Taylor; - 5th June 2012 at 02:27.
    DT

  8. #8
    Join Date
    Jun 2011
    Location
    Indian Harbour Nova Scotia
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: Does 16F628a support debugging or not?

    Problem Solved:

    I discovered this BEFORE Darrel replied. He was right on, as it turned out. Here's my post before I read HIS post:

    CPD_OFF was not listed in the hard copy INC file I had (dated 2011 by Microchip) for the 16F628A.

    Having upgraded, I checked again, and in the 2012 version, CPD_OFF IS LISTED. So why no workee?

    I never shut my computer off (put it in sleep) so I hadn't done the reboot required after the upgrade. This was confirmed when I did reboot and a PBP install window popped up asking where the assembler was.

    I put the CPD_OFF switch back in the config line and it now compiles.

    I haven't verified the ICD operation yet, but thought I'd get this new development out so no one would waste their time trying to figure it out.

    Thanks for your patience.
    Last edited by queenidog; - 5th June 2012 at 15:04. Reason: timing info

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