ICD & PBP && how to get it to work


Closed Thread
Results 1 to 27 of 27

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    pic = 18f252 I/SP
    MCS+ = 3.0.0.5
    PCP = 2.46

    should be supported, yes?

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by archendekta View Post
    pic = 18f252 I/SP
    MCS+ = 3.0.0.5
    PCP = 2.46

    should be supported, yes?
    PBP YES from ver 2.40
    MCS+ YES
    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.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    compile for ICD ops, ICD run, then bring up the serial communicator
    If you're using MCS+ ICD, then you should not be trying to use the standard serial
    communicator in MCS+.

    Inside the ICD window HSEROUT will display whatever you send in the lower section of
    the ICD window. When it lands on an HSEROUT while running the ICD, and small serial
    ICD terminal window will automatically pop-up asking for input.

    Code:
    DEFINE LOADER_USED 1 ' using MCS+ bootloader
    DEFINE OSC 20 ' <-- DEFINE your OSC speed. gotta have this for MCS ICD.
    
    MyVar VAR BYTE
    
    Loop2:
          HSERIN [MyVar] ' <-- window pops-up waiting for input
          HSEROUT ["MyVar = ",DEC MyVar,13,10] '<-- displays input
          PAUSE 500
          GOTO Loop2
    I've attached a screen capture of the above running in MCS+ ICD. Tested on an
    18F4431.

    If you still have trouble try blinking an LED with the ICD just to make sure you have
    everything setup properly.
    Attached Images Attached Images  
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4
    Join Date
    Jan 2009
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    got it. thanks.

    also looked at this that helped ;-)

    http://www.rentron.com/PicBasic/MCS_X3.htm

  5. #5
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Can't get Variables to appear in MCS+ ICD project

    Quote Originally Posted by Bruce View Post
    I've attached a screen capture of the above running in MCS+ ICD. Tested on an
    18F4431.

    If you still have trouble try blinking an LED with the ICD just to make sure you have
    everything setup properly.
    Bruce,
    I have my program running so I can monitor it line-by-line with the MCS+ ICD. However, in the ICD Project Window I only see Registers, Memory and EEPROM.....no Variables are shown. How do I get them to appear so I can see how they are changing during the ICD??

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    It's tough to offer help on source code I haven't seen. Can you post the code you're having problems with?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7
    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:

  8. #8
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I think you might need to actually declare a few variables if you expect MCS ICD to show them...;o)

    I don't think MCS+ ICD is smart enough to yank variables from include files. That + ZERO support is
    why I no longer use, nor recommend, MCS+ ICD.
    Last edited by Bruce; - 22nd March 2010 at 00:40.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  9. #9
    Join Date
    May 2007
    Location
    Republic Serbia
    Posts
    105


    Did you find this post helpful? Yes | No

    Unhappy

    Quote Originally Posted by Bruce View Post
    If you're using MCS+ ICD, then you should not be trying to use the standard serial
    communicator in MCS+.

    Inside the ICD window HSEROUT will display whatever you send in the lower section of
    the ICD window. When it lands on an HSEROUT while running the ICD, and small serial
    ICD terminal window will automatically pop-up asking for input.

    Code:
    DEFINE LOADER_USED 1 ' using MCS+ bootloader
    DEFINE OSC 20 ' <-- DEFINE your OSC speed. gotta have this for MCS ICD.
    
    MyVar VAR BYTE
    
    Loop2:
          HSERIN [MyVar] ' <-- window pops-up waiting for input
          HSEROUT ["MyVar = ",DEC MyVar,13,10] '<-- displays input
          PAUSE 500
          GOTO Loop2
    I've attached a screen capture of the above running in MCS+ ICD. Tested on an
    18F4431.

    If you still have trouble try blinking an LED with the ICD just to make sure you have
    everything setup properly.
    One question :
    If I want to use ICD with 18F4550
    Code:
        DEFINE LOADER_USED 1 ' using MCS+ bootloader
        DEFINE OSC 48
    I get error from MCSP that can't find OSC48 setup for ICD in any file...
    Any help please.
    Regard's

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


    Did you find this post helpful? Yes | No

    Default

    You can't use the ICD with the PIC running at greater than 40Mhz.
    There's no real reason other than MCS+ won't let you.

    But, you can increase the divider so the the core runs at a lower freq.
    _CPUDIV_OSC3_PLL4_1L will give 24mhz.

    Then change to DEFINE OSC 24.

    Also, the ICD is not compatible with standard USB routines.
    It will likely drop the connection to the PC because it's not servicing fast enough. (Unless using USB_ASM_Service.pbp)
    <br>
    DT

  11. #11
    Join Date
    May 2007
    Location
    Republic Serbia
    Posts
    105


    Did you find this post helpful? Yes | No

    Thumbs up

    Quote Originally Posted by Darrel Taylor View Post
    You can't use the ICD with the PIC running at greater than 40Mhz.
    There's no real reason other than MCS+ won't let you.

    But, you can increase the divider so the the core runs at a lower freq.
    _CPUDIV_OSC3_PLL4_1L will give 24mhz.

    Then change to DEFINE OSC 24.

    Also, the ICD is not compatible with standard USB routines.
    It will likely drop the connection to the PC because it's not servicing fast enough. (Unless using USB_ASM_Service.pbp)
    <br>
    OK Darrel ,
    I only test ICD on 18F4550.
    In Proton+ I was probe and work OK. But I was edit .XML to accept 48Mhz clock and at that freq. need to use 115200 speed in definition of HSEROUT ..
    That is problem in PBP ICD 100% but we or I cant edit .ICD file for new devices...

    I was probe your suggesst an work 100% ok.
    In my code for test I not use USB. Only simple keypad reding + LCDOUT.

    Best regards

  12. #12
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Where did this quote come from...not in this thread??

    Quote Originally Posted by phoenix_1 View Post
    One question :
    Originally Posted by Bruce
    If you're using MCS+ ICD, then you should not be trying to use the standard serial
    communicator in MCS+.

    Inside the ICD window HSEROUT will display whatever you send in the lower section of
    the ICD window. When it lands on an HSEROUT while running the ICD, and small serial
    ICD terminal window will automatically pop-up asking for input.


    Code:
    DEFINE LOADER_USED 1 ' using MCS+ bootloader
    DEFINE OSC 20 ' <-- DEFINE your OSC speed. gotta have this for MCS ICD.

    MyVar VAR BYTE

    Loop2:
    HSERIN [MyVar] ' <-- window pops-up waiting for input
    HSEROUT ["MyVar = ",DEC MyVar,13,10] '<-- displays input
    PAUSE 500
    GOTO Loop2I've attached a screen capture of the above running in MCS+ ICD. Tested on an
    18F4431.

    If you still have trouble try blinking an LED with the ICD just to make sure you have
    everything setup properly.
    Where did this quote come from since I don't see it in this thread. I would like to go to it and review the referenced image.

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


    Did you find this post helpful? Yes | No

    Default

    Where did this quote come from...not in this thread??
    Post #5, this thread.
    DT

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 : 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