ICD & PBP && how to get it to work


Closed Thread
Results 1 to 27 of 27
  1. #1
    Join Date
    Jan 2009
    Posts
    17

    Default ICD & PBP && how to get it to work

    if this has been thrashed a bit already forgive the redundancy. my dev partner and I are having a bit of a time of getting the ICD to work.

    we have a pic18 series->level converter->computer comm port->PCP

    we then compile for ICD ops, ICD run, then bring up the serial communicator and viola, nothing is displayed. the program is a very very simple, short one using "hserout' and 'hserin" in a loop.

    so, are we making this ICD too complicated or what?

    tia

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


    Did you find this post helpful? Yes | No

    Default WHICH CHIP and Version MCS are you using ?

    The text below is copy / pasted from the Microcode Studio Plus help file, if you are not using the plus version it only supports one chip:<br><b>
    MicroCode Studio uses an ICD Model in order to initialise and control the operation of the ICD for a given PIC microcontroller.

    MicroCode Studio Plus

    The ICD for MicroCode Studio Plus supports the following PIC microcontroller devices.

    16F627(A), 16F628(A), 16F73, 16F74, 16F76, 16F77, 16F870, 16F871, 16F873(A), 16F874(A), 16F876(A), 16F877(A), 16F87, 16F88, 18F242, 18F248, 18F252, 18F258, 18F442, 18F448, 18F452, 18F458, 18F1220, 18F1320, 18F2220, 18F2320, 18F4220, 18F4320, 18F6620, 18F6720*, 18F8620 and 18F8720*

    * Please note that for these devices, the ICD will only support the first 64K of your program.

    MicroCode Studio

    The ICD for MicroCode Studio supports the following PIC microcontroller devices.

    16F628

    Please note that the ICD is not enabled if using the demonstration PICBasic PRO compiler. If you would like to purchase MicroCode Studio Plus, please read How to Purchase MicroCode Studio Plus.
    Last edited by Archangel; - 3rd March 2009 at 01:18.
    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
    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?

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

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

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

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

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

  9. #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 01:30. Reason: Add images:

  10. #10
    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 01:40.
    Regards,

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

  11. #11
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    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.
    pssst... so... just between you, me, and that lamp post over there... What do you use and recommend?
    I'm not looking to jump ship any time soon, but it's nice to know what other folks are using and why they like it.


    steve

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


    Did you find this post helpful? Yes | No

    Default

    If I need to know specific timing for time critical routines, I'll use MPLAB/MPSIM software simulation. Testing on hardware, I just build it & test the code on the hardware it's going to run on. Haven't seen any software yet that acts 100% the same as hardware..;o)

    MCS+ ICD used to be a pretty cool option, but support for it seems to have dropped off the planet.
    Regards,

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

  13. #13
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    If I need to know specific timing for time critical routines, I'll use MPLAB/MPSIM software simulation. Testing on hardware, I just build it & test the code on the hardware it's going to run on. Haven't seen any software yet that acts 100% the same as hardware..;o)
    Thanks Bruce,

    Actually, I've never used ICD. (been to lazy to figure it out I guess )
    I just "build the hardware and run it" and if I've got a extra few pins I'll connect a LCD display so that I can show the values of select variables.

    Just curious what the "experienced users" use. Thanks!


    steve

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


    Did you find this post helpful? Yes | No

    Default This one has declared variables but no ICD Variables Tab??

    Quote Originally Posted by Bruce View Post
    I think you might need to actually declare a few variables if you expect MCS ICD to show them...;o)
    OK, I could understand that no Variables Tab would show if no variables had been declared. However, here is another program in which many variables were declared. I have also attached an image of the MCS+ screen while the ICD was running that shows it stopped at a breakpoint....but notice that even though the variables are declared in the program no Variables Tab appears in the ICD Explorer window. So the problem is still there.
    Can anyone tell me how to make the Variables Tab appear in MCS+???
    Code:
    Pause 10     ' This statement is placed at beginning of code for ICD use
    ;--- if you un-comment these, you must comment the ones in the .inc file--
    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
    
    ' Set Registers
    TRISA = 0                 ' PortA output connections are used for LCD interface
    TRISB = %00000100         ' PORTB.2 is an input from switch grounding
    TRISC.0 = 0               ' PortC.0 is used for a Heartbeat LED output
    TRISC.2 = 0               ' PortC.2 is used for the LCD R/W connection
    
    DEFINE OSC 16
    DEFINE I2C_SLOW 1   ' Set i2c to the standard speed
    DEFINE I2C_HOLD 1   ' Enable recieving i2c device to pause communication
    Include "Modedefs.Bas"
    INCLUDE "ALLDIGITAL.pbp"  ' Sets all registers for digital ops.
    
    ' * NOTES for use with EasyPic6 development board:
        ' Make sure that SW6.8 on the EasyPic6 is set to ON position before powerup
        ' for LCD's requiring backlight.                                                 
        'For use with COG 2x16 LCD:
    '     - Turn on Port Expander switches SW6.1, SW6.2, SW6.3, SW6.4 and SW6.5.
    '     - Turn on COG LCD 2x16 switches SW10.1, SW10.2, SW10.3, SW10.4, SW10.5 and SW10.6.
    
    '---------------------- 18F4550 Port/PIN Connections ]--------------------
    'I/O pin connections to the 18F4550 MCU are as follows:
    'PORTA.0 (02) RA0 connected to LCD D4.
    'PORTA.1 (03) RA1 connected to LCD D5.
    'PORTA.2 (04) RA2 connected to LCD D6.
    'PORTA.3 (05) RA3 connected to LCD D7.
    'PORTA.4 (06) RA4 not connected
    'PORTA.5 (07) RA5 not connected
    'PORTB.0 (21) Connected as I2C SDA output to DS1337 
    'PORTB.1 (22) Connected as I2C SCL output to DS1337 
    'PORTB.2 (23) Connected as INT2 interrupt from pin-7 (_INTA) of DS1337 RTC. 
    'PORTB.3 (24) RB3 not connected 
    'PORTB.4 (25) RB4 not connected 
    'PORTB.5 (26) RB5 not connected 
    'PORTB.6 (27) Connected as PGC for ICSP connection
    'PORTB.7 (28) Connected as PGD for ICSP connection 
    'PORTC.0 (11) RC0 not connected. 
    'PORTC.1 (12) RC1 connected as an output to a Red LED for battery low.
    'PORTC.2 (13) RC2 connected to LCD R/W. 
    'PORTC.3 (14) RC3 not provided on 18F4550.
    'PORTC.4 (15) not connected.
    'PORTC.5 (16) not connected. 
    'PORTC.6 (17) RC6 normally connected to poll grounding of external switch.
    'PORTC.7 (18) normally not connected.
    
    '--------------[ Declare Variables, Aliases & Constants ]---------------  
    ' Variables & Aliases for Pins other than RTC use
    ' ===============================================
    Digit1   var byte      ' Used to parse 3-digit integer into LCD characters                                                          
    Digit2   var byte      ' NOTICE ALL OF THESE DECLARED VARIABLES!!   
    Digit3   var byte
    ext_pwr  VAR PORTC.6   ' Alias to control power to Ultrasonic sensor
    rng0     VAR w0.Byte0  ' LSB of range measurement when right justified
    rng1     VAR w0.byte1  ' MSB of range measurement when right justified 
    rngNum1  Var Byte      ' 1st numeral of rng0 for display on LCD as character
    rngNum2  VAR Byte      ' 2nd numeral of rng0 for display on LCD as character
    rngNum3  VAR BYTE      ' 34d numeral of rng0 for display on LCD as character
    SCL      VAR PORTB.1   ' I2C clock pin 
    SDA      VAR PORTB.0   ' I2C data pin
    Spare_1  VAR PORTB.7   ' PGD for ICSP & Spare I/O for normal ops
    Spare_2  VAR PORTB.6   ' PGC for ICSP & Spare I/O for normal ops
    w0       var word      ' W0 is the word value to store the range data 
                   
    ' Constants
    '==========
     srfdevice CON $E0  ' Device address for SRF02 ultrasonic range finder
     Vthr      CON 46   ' Threshold (3.3v) to trigger battery low voltage warning
                        ' ...this is dictated by the drop-out and output voltage    
                        ' of the voltage regulator used in the power circuit.                    
    
    ' Initialize the display
        Pause 500       ' Wait for LCD to startup after power on
        GOSUB InitializeDisplay
    
    mainloop: 
        Lcdout $fe, 1   ' Clear LCD screen
        PORTC.0 = 1     ' Blink Heartbeat LED during mainloop
        Pause 500       ' Wait 0.5 second
        PORTC.0 = 0
        If PORTB.2 = 0 Then
           Gosub Range
        Endif
        Goto mainloop   ' Do it forever
            
    ' ----------------------[ START LIST OF SUBROUTINES ]-------------------
    '*********************************************************************** 
    
    InitializeDisplay:      ' Commented out till LCD installed
    '=================
    '--SETUP FOR USING 2x16 LCD THAT IS INSTALLED IN EASYPIC6-----  
      ' LCD DEFINES FOR USING 2x16 LCD with PortA in EASYPIC6
      '======================================================
       DEFINE LCD_DREG PORTA      ' Use PORTA for LCD Data
       DEFINE LCD_DBIT 0          ' Use lower(4) 4 bits of PORTA
                                      ' PORTA.0 thru PORTA.3 connects to
                                      ' LCD DB4 thru LCD DB-7 respectively
       DEFINE LCD_RSREG PORTA     ' PORTA for RegisterSelect (RS) bit
       DEFINE LCD_RSBIT 4         ' PORTA.4 pin for LCD's RS line
       DEFINE LCD_RWREG PORTC     ' LCD read/write port
       DEFINE LCD_RWBIT 2         ' LCD read/write bit
       DEFINE LCD_EREG PORTA      ' PORTA for Enable (E) bit
       DEFINE LCD_EBIT 5          ' PORTA.5 pin for LCD's E line
       DEFINE LCD_BITS 4          ' Using 4-bit bus
       DEFINE LCD_LINES 2         ' Using 2 line Display
       DEFINE LCD_COMMANDUS 1500  ' Command Delay (uS)
       DEFINE LCD_DATAUS 44      ' Data Delay (uS)
           
        ' DEFINE LCD Control Constants  
            Line1   CON 128           ' Point to beginning of line 1 ($80) 
            Line2   CON 192           ' Point to beginning of line 2 ($C0)
        
        ' Test the LCD during initialization
            LCDOut $FE,1:FLAGS=0:Pause 250       ' Clear Display
            LCDOut $FE,Line1+3," LCD TEST "      ' Display "Power On" on 1st line
            Pause 500
            LCDOut $FE,Line2+2,"..Power On..!!" ' Display "LCD Test" on 2nd line
            PAUSE 1000
    Return
    
    Move_Delay:     ' Subroutine used during text moving on an LCD
    '==========
    ' Function used for text moving
      Pause 500                     ' You can change the moving speed here
    Return
    
    Range:
    '=====
    ENABLE DEBUG
        High PORTC.0     ' Turn on Test LED to indicate Ranging routine entered
        HIGH ext_pwr     ' Turn on power to the SRF02 in order to use the I2C bus
                         ' without distortion.
        PAUSE 3000       ' Delay to let I2C bus stabilize after SRF02 turn on
        'DEFINE WRITE_USED 1 'Required if only writing WORD variables in v2.6
            ' Make SRF02 Range Measurement           
                I2CWRITE SDA,SCL,$E0,0,[80]' Request start of ranging in inches
                pause 100                  ' Wait for ranging to finish
                I2CREAD SDA,SCL,$E0,2,[rng1,rng0] ' Get ranging results
                pause 10                         
                WRITE 253,rng1             ' Write range to EEPROM
                PAUSE 10
                Write 254,rng0
                PAUSE 10       
            'Convert measurement to LCD numerals in inches
                 Digit1 = rng0 DIG 0
                 Digit2 = rng0 DIG 1
                 Digit3 = rng0 DIG 2
            ' Display range measurement on LCD display in inches 
                LCDOut $FE,1               ' Clear display
                Pause 50
                LCDOut $FE,$80,"Range:"  ' Display  on 1st line
                PAUSE 10
                LCDOut $FE,$C0,Digit1,Digit2,Digit3," in."  ' Display on 2nd line
                PAUSE 1000                    ' Allow Time for user to view          
        LOW ext_pwr  ' Turn off power to the SRF02 at end of display
                     ' This statement will distort the I2C bus and ext_pwr
                     ' must be HIGH before any attempts are made to use the
                     ' I2C bus.
        PAUSE 1000    ' Delay to permit I2C bus to stabilize after SRF02 off
    DISABLE DEBUG     
        ' Resume Main Program 
    Return
    End     ' Safety measure to insure program stops if reaches here
    Attached Images Attached Images

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


    Did you find this post helpful? Yes | No

    Default

    I don't have a 4550 to test, but it works fine with an 18F4431. See attached.

    Does it work if you try something simple like this?
    Code:
    Pause 10     ' This statement is placed at beginning of code for ICD use
    ;--- if you un-comment these, you must comment the ones in the .inc file--
    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
     
     DEFINE OSC 16
     
     MyVar VAR BYTE
      
    Main:  
      FOR MyVar = 0 TO 50
       HIGH 0
       PAUSE 5
       LOW 0
       PAUSE 5
      NEXT
      GOTO Main
      
      END
    If the above works, then it may be something in your code causing the problem
    or maybe a bad ICD model file?

    Sorry I can't offer more help, but I haven't used MCS+ ICD in years.

    Have you tried contacting Mecanique for tech support?
    Attached Images Attached Images  
    Regards,

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

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


    Did you find this post helpful? Yes | No

    Default Samed code doesn't show Variables Tab in my MCS+??

    Quote Originally Posted by Bruce View Post
    I don't have a 4550 to test, but it works fine with an 18F4431. See attached.

    Does it work if you try something simple like this?
    Code:
    Pause 10     ' This statement is placed at beginning of code for ICD use
    ;--- if you un-comment these, you must comment the ones in the .inc file--
    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
     
     DEFINE OSC 16
     
     MyVar VAR BYTE
      
    Main:  
      FOR MyVar = 0 TO 50
       HIGH 0
       PAUSE 5
       LOW 0
       PAUSE 5
      NEXT
      GOTO Main
      
      END
    If the above works, then it may be something in your code causing the problem
    or maybe a bad ICD model file?

    Sorry I can't offer more help, but I haven't used MCS+ ICD in years.

    Have you tried contacting Mecanique for tech support?
    I pasted your code into my MCS+ and ran the ICD and it still doesn't show the Variables Tab (see attached image).
    I notice that the image of your ICD run shows a couple of additional items in the Tool Bar that mine doesn't show. It makes me wonder if there is a version difference between us that may be causing my problem. My version of MCS+ is 3.0.0.5. What is yours??

    I am also going to send your image and my image to Mechanique and ask them what is going on. I really appreciate your help on this
    Attached Images Attached Images

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


    Did you find this post helpful? Yes | No

    Default

    MCS+ 3.0.0.5 on Windows XP.
    Regards,

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

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


    Did you find this post helpful? Yes | No

    Default What are the 4 icons in your toolbar that I don't have?

    Quote Originally Posted by Bruce View Post
    MCS+ 3.0.0.5 on Windows XP.
    Bruce, if you would be so kind, would you please put your cursor on each of the four icons on the right end of the 1st Tool Bar line of your version of MCS+ and then tell me what their individual descriptions are? Once I know what these missing icons are for I want to ask mechanique why they don't appear on my version of 3.0.0.5 when running XP.
    Thanks!
    JE
    Last edited by jellis00; - 22nd March 2010 at 17:49.

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


    Did you find this post helpful? Yes | No

    Default

    Those are icons for the MCS+ boot-loader. Loader Read, Verify, Erase, Information.
    Regards,

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

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


    Did you find this post helpful? Yes | No

    Default Prn Ioblem solved!

    Thanks to Darrel Taylor's response at techsupport assitant at meLabs, I have solved this mysterious problem. Let me explain, because this may be encountered by other users of the Micro Code Studio Plus (MCS+) ICD.

    It turns out that the ICD model that came on my CD-ROM that delivered MCS+ to me was not correct for the 18F4550. Darrel had downloaded this .inc file from the Beta models and emailed it to me. When I replaced the ICD model I had for the 18F4550 with the one he sent I started seeing Variables Tab.
    The icons I thought I was missing in the tool bar only show when using a boot loader, as explained by Bruce Rentron in above post.
    Chasing down this problem took 3 days out of my time....no thanks to Mecanique's tech support who never responded to my emailed request for support.

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


    Did you find this post helpful? Yes | No

    Default

    That was one of my suspicions, but I'm glad you got it sorted.

    Post #15 above;
    or maybe a bad ICD model file?
    no thanks to Mecanique's tech support who never responded to my emailed request for support.
    Bummer, but that does reinforce my little ending blurb in post #10 above...;o)
    Last edited by Bruce; - 23rd March 2010 at 00:25. Reason: ZERO support
    Regards,

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

  22. #22
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,518


    Did you find this post helpful? Yes | No

    Default

    It seems to be an on-off kind of thing. Or it depends on if it involves any sort of time-investment for them/him, I don't know.

    When I had problems with MCS+ and Win7-64 I emailed them and got zero response but thanks to Darrel and Charles that problem too got sorted. A month or so later I emailed Mecanique again inquiring about a bootloader file I didn't have and got a response (and file) within hours.

    /Henrik.

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

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

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

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

  27. #27
    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, 05:26
  2. MCSP ICD does not work
    By ardhuru in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th May 2008, 22:15
  3. ICD Woes
    By spad13m in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 14th February 2008, 06: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, 03:50
  5. PBP "USART.BAS" Doesn't Work
    By Corey in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st October 2003, 13: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