View previous topic :: View next topic |
Author |
Message |
Jerry R
Joined: 25 Apr 2007 Posts: 23
|
PIC18F1220 "no response from ICD data in buffer" |
Posted: Thu Dec 31, 2009 4:57 pm |
|
|
Hello all
New project, new processor here. Getting "Could not single step: No response from ICD data in buffer 04 02 FF..." after a load complete while attempting to debug.
Microcontroller: PIC18F1220 using internal oscillator at 4MHz
CCS PCWH v 3.249
ICDU-40 firmware 2.23
simple code to start:
Code: |
#include "\\Jerry-e1e8dd780\patriot (f)\PROJECTS\Yale Safe Zone\C Code\SafeZone (Rev XA).h"
void main()
{
setup_adc_ports(sAN0|sAN1|sAN2|VSS_VDD);
setup_adc(ADC_CLOCK_INTERNAL|ADC_TAD_MUL_0);
setup_wdt(WDT_OFF);
setup_timer_0(RTCC_INTERNAL);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DIV_BY_4,255,1);
setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
setup_ccp1(CCP_PWM_FULL_BRIDGE|CCP_SHUTDOWN_AC_L|CCP_SHUTDOWN_BD_L);
setup_oscillator(OSC_4MHZ|OSC_INTRC);
while (True)
{
output_high (K1_DRIVE); //K1 On
delay_ms(250);
output_low (K1_DRIVE); //K1 On
delay_ms(250);
output_high (K2_DRIVE); //K1 On
delay_ms(250);
output_low (K2_DRIVE); //K1 On
delay_ms(250);
}
}
|
This ICD response is new to me. Any suggestions are most helpful and appreciated. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Dec 31, 2009 5:14 pm |
|
|
Post the .h file, or at least post the #fuses and the #use delay() statements. |
|
|
Jerry R
Joined: 25 Apr 2007 Posts: 23
|
|
Posted: Thu Dec 31, 2009 5:21 pm |
|
|
Sorry:
Here's the *.h file:
Code: |
#include <18F1220.h>
#device ICD=TRUE
#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
#FUSES INTRC //Internal RC Osc
#FUSES FCMEN //Fail-safe clock monitor enabled
#FUSES BROWNOUT //Reset when brownout detected
#FUSES BORV20 //Brownout reset at 2.0V
#FUSES NOPUT //No Power Up Timer
#FUSES NOCPD //No EE protection
#FUSES STVREN //Stack full/underflow will cause reset
#FUSES NODEBUG //No Debug mode for ICD
#FUSES LVP //Low Voltage Programming on B3(PIC16) or B5(PIC18)
#FUSES NOWRT //Program memory not write protected
#FUSES NOWRTD //Data EEPROM not write protected
#FUSES NOWRTC //configuration not registers write protected
#FUSES IESO //Internal External Switch Over mode enabled
#FUSES NOEBTR //Memory not protected from table reads
#FUSES NOEBTRB //Boot block not protected from table reads
#FUSES MCLR //Master Clear pin enabled
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOCPB //No Boot Block code protection
#FUSES NOWRTB //Boot block not write protected
#use delay(clock=4000000)
#define K1_DRIVE PIN_A7
#define PROX_IN PIN_B0
#define K2_DRIVE PIN_B2
#define LED_DIM PIN_B3
#define HOLD_IN PIN_B4
|
Thanks! |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Thu Dec 31, 2009 10:01 pm |
|
|
Ok, that's a nightmare include path.
Have you tried putting the include in the same directory as the source for simplicity?
All those spaces and backslashes give me the willies.
Just a thought.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
Jerry R
Joined: 25 Apr 2007 Posts: 23
|
|
Posted: Fri Jan 01, 2010 7:28 am |
|
|
I'll give it a try. Thanks |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Fri Jan 01, 2010 11:02 am |
|
|
BTW,
I think you can turn off IESO if you're only using one clock source.
Especially only using the internal one.
-ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
Jerry R
Joined: 25 Apr 2007 Posts: 23
|
|
Posted: Fri Jan 01, 2010 1:00 pm |
|
|
All tips performed. Still getting "Could not single step: No response from ICD data in buffer 04 02 FF..." after "Loading" and "Busy" responses from ICD-U40.
Using ICD utility, both ICD and Target return "Test Passed"
Double checked wiring around PIC18F1220 and ICD to board connections.
I can find no reference to the "Could not single step ... " error message. Anyone know what this is really saying? |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Fri Jan 01, 2010 1:06 pm |
|
|
I use an ICD2&3, so I can't check.
So, there's always testing on another PIC (different family number). If other PIC's work, perhaps something is wrong with your PIC. I know that part has a funny pinout for the ICSP pins.
I'd also double check my hardware connections (in case you haven't already).
I'm assuming your doing ICSP? If so, what is the hookup schematic like? Do you have any extra stuff hanging off the criticial Vpp/MCLR and PGC/PGD pins?
??
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
Jerry R
Joined: 25 Apr 2007 Posts: 23
|
|
Posted: Fri Jan 01, 2010 1:40 pm |
|
|
Hi Ben:
You'd think we'd have other things to do on New Year's day except play with widgets
Thanks for taking the time to help me debug this thing. All your suggestions are good. Thanks!
OKay! the plot thickens. I flashed code into the target using the ICD utility and the target plays as the code directs it to. Relays, as directed by the simple code, merrily chatter away. So I think the hardware is good. I'm betting that the ICD error has something to do with it thinking that the code is bad.
I've had the "pleasure" of using the CCS C and ICD-U40 to create a bunch of stuff, but, so far, I've never had a problem with debugging code once the ICD connects successfully to the target.
Keep your ideas coming if you have them. I might reinstall the CCS IDE to see if that fixes anything.
Again, thanks! |
|
|
Jerry R
Joined: 25 Apr 2007 Posts: 23
|
|
Posted: Sat Jan 02, 2010 9:17 am |
|
|
Solved!
Re-installed ICD software fixed the problem. Thanks all for your input! |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Sat Jan 02, 2010 1:03 pm |
|
|
You can change your original message subject --- I always edit to read "[SOLVED]"
so they are easy to spot for others...
Just a thought for you...
Glad things are back to working!
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
|