ICD & PBP && how to get it to work


Results 1 to 27 of 27

Threaded View

  1. #9
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Need help on these two ICD problems

    Quote Originally Posted by Bruce View Post
    It's tough to offer help on source code I haven't seen. Can you post the code you're having problems with?
    Bruce, to simplify things so I can figure out what is going on, I am running the MCS+ ICD for a rather simple program, for which I have attached the code at the end of this posting.

    My main problem is that when I get the ICD to run, there is no Tab in the ICD Explorer window for Variables (to the right in the attached image), when all the documentation, including your tutorial at your web site, says there should be. I looked everywhere for a menu item or switch to make the Variables tab visible and couldn't find any info on how to do so.

    Another problem I am having intermittently is that sometimes the ICD Run shows what is titled as an "ICD Message" as shown in the second attached image. It doesn't happen all the time, but when it does, I don't understand what is causing it or how to fix it. Since the ICD is apparenty very sensitive to having the clock specified correctly for it to run, I thought it might be that my OSC speed wasn't properly specified in the configs and the DEFINE OSC 16 statement, but I double checked this and it appears correct.

    If you can help me figure out these two problems, it would be greatly appreciated.
    Code:
    '****************************************************************
    '*  Name    : Blinky_test.pbp                                   *
    '*  Author  : John R. Ellis                                     *
    '*  Notice  : Copyright (c) 2010 LodeStar Assoc., Inc.          *
    '*          : All Rights Reserved                               *
    '*  Date    : 3/4/2010                                          *
    '*  Version : 1.0                                               *
    '*  Notes   : 1) Iterations of this program will test all ports *
    '             of the MCU by blinking the EasyPic6 LED connected *
    '             to each port.                                     *
    '*          : 2) This version of the code is written to test    *
    '                the EasyPic6 when 18F2550 or 18F4550 is        *
    '                installed.                                     *
    '****************************************************************
    Pause 10     ' This statement is placed at beginning of code for ICD breakpoint
    ASM ; 18F2550/4550, 8mhz crystal
       __CONFIG   _CONFIG1L, _PLLDIV_2_1L & _CPUDIV_OSC4_PLL6_1L & _USBDIV_2_1L
       __CONFIG   _CONFIG1H, _FOSC_HSPLL_HS_1H
       __CONFIG   _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _VREGEN_ON_2L
       __CONFIG   _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
       __CONFIG   _CONFIG3H, _PBADEN_OFF_3H ; PortB resets as digital
       __CONFIG   _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
    ENDASM
    
    Include "Modedefs.Bas"
    
    DEFINE OSC 16
    TRISA = 0                   ' Set all ports to outputs as test LEDs
    TRISB = 0
    TRISC = 0
    TRISD = 0
    TRISE = 0
    	
    INCLUDE "ALLDIGITAL.pbp"    ' Sets all registers for digital ops.
    
    PORTA = 0                   ' Turn all test LED's off before test mainloop
    PORTB = 0
    PORTC = 0
    PORTD = 0
    PORTE = 0                            
    
    mainloop:
             ' After running this program for PORTA, use EDIT/REPLACE menu to 
             ' then change PORTA to PORTB, PORTC, PORTD and PORTE and run each
             ' case again to complete testing of all ports/LED's.
              
                HIGH PORTA.1    ' Turn on LED connected to PORTA.0
                PAUSE 500       ' Delay for .5 seconds
                LOW PORTA.1     ' Turn off LED connected to PORTA.0
                PAUSE 500       ' Delay for .5 seconds
    
                HIGH PORTA.2
                PAUSE 500
                LOW PORTA.2
                PAUSE 500
    
                HIGH PORTA.3
                PAUSE 500  
                LOW PORTA.3
                PAUSE 500
    
                HIGH PORTA.4
                PAUSE 500 
                LOW PORTA.4
                PAUSE 500
    
                HIGH PORTA.5
                PAUSE 500            
                LOW PORTA.5
                PAUSE 500
            
                HIGH PORTA.6
                PAUSE 500
                LOW PORTA.6
                PAUSE 500
                
                HIGH PORTA.7
                PAUSE 500
                LOW PORTA.7
                PAUSE 500
            
            Goto mainloop   ' Go back to loop and blink LED sequence forever
    End
    Attached Images Attached Images
    Last edited by jellis00; - 22nd March 2010 at 00:30. Reason: Add images:

Similar Threads

  1. Pbp - icd
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 16th March 2010, 04:26
  2. MCSP ICD does not work
    By ardhuru in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th May 2008, 21:15
  3. ICD Woes
    By spad13m in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 14th February 2008, 05:56
  4. How to set ICD-2 clone to work with PBP?
    By G-R-C in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th October 2006, 02:50
  5. PBP "USART.BAS" Doesn't Work
    By Corey in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st October 2003, 12:29

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