
Originally Posted by
Bruce
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
Bookmarks