jamesjl
Joined: 22 Sep 2003 Posts: 52 Location: UK
|
ICD-U40 Debug errors |
Posted: Wed Jan 14, 2004 7:18 am |
|
|
Hi All,
I have just taken receipt of my new ICD-40U kit and I am having some problems debuggin with it. The ICD will happily program the target board under non-debug mode using PCW 3.183. I can even use the Start and Stop program button to control the target board.
However, if I include the command #devide ICD=TRUE in my header file and then enable the debugger I eventually get a message that reads
<I><B>Could not start target: The target was not halted after reset. Check the target oscillator and MCLR.</I></B>
Does anyone have any ideas as to what might be causing this. My version of PCWH is 3.41 and all compilers are 3.183. My ICD firmware is 1.20. I have included my <I>short</I> source code as well.
I there a user manual for the ICD anywhere or are CCS thinking of writing one?
Many thanks,
Jason.
<B>Header File</B>
Code: |
#include <16F874.h>
#device ICD=TRUE
#device adc=8
#use delay(clock=4000000)
#fuses NOWDT,XT, PUT, NOPROTECT, NOLVP
|
<B>Source Code</B>
Code: |
#include "demoboard.h"
void main()
{
setup_adc_ports(NO_ANALOGS);
setup_adc(ADC_OFF);
setup_psp(PSP_DISABLED);
setup_spi(FALSE);
setup_counters(RTCC_INTERNAL,RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
for(;;)
{
output_high(PIN_D0);
output_low(PIN_D1);
delay_ms(250);
output_low(PIN_D0);
output_high(PIN_D1);
delay_ms(250);
}
}
|
|
|