CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug Reports on this forum. Send them to support@ccsinfo.com

ICD-U64 Bugs

 
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go
View previous topic :: View next topic  
Author Message
zhiyongwoo



Joined: 18 Jul 2010
Posts: 9

View user's profile Send private message

ICD-U64 Bugs
PostPosted: Sat Jan 22, 2011 3:44 pm     Reply with quote

Hi,

I would need some expert here to help me out from my problem.
I am using PIC 16LF1936 and lately I bought the ICD-U64 debugger. My application need to use internal oscillator with less than 500KHz to give a 500mSec flashing.

Now, my code run with no problem in normal run time mode but when I compile it to debugging mode, I notice that the debugger go into no response after execute my code that to change the internal frequency down from the default 500KHz to 125KHz.

The debugger window show PC=1FFFF, W=FF. Can anyone tell me why this happen?

After that, I try to set my internal oscillator frequency to 500KHz and 1MHz to check the same problem. But suprisingly, it has no problem at all.

Another problem, if I set my main peripheral clock source to Timer1, T1OSO and T1OSI, same problem occur but this time, the compiler even pop up an error messages to me by saying
"Could not start target: No response from the ICD Check the target oscillator and MCLR. Make sure the target clock match the clock fuse and the target is oscillating. Use View| Valid fuses to find the correct clock fuse."

Does anyone has this sort of problems?
Here is my code:

Code:
"This is <CCS Debugging Test.h> "
#include <16LF1936.h>
#device adc=10

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES INTRC_IO                 //Internal RC Osc, no CLKOUT
#FUSES PUT                      //Power Up Timer
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOMCLR                   //Master Clear pin used for I/O
#FUSES NOCPD                    //No EE protection
#FUSES BROWNOUT                 //Reset when brownout detected
#FUSES NOIESO                   //Internal External Switch Over mode disabled
#FUSES FCMEN                    //Fail-safe clock monitor enabled
#FUSES WDT_SW               
#FUSES NOCLKOUT                   //Output clock on OSC2
#FUSES NOWRT                    //Program memory not write protected
#FUSES PLL                   
#FUSES STVREN                   //Stack full/underflow will cause reset
#FUSES BORV19               
#FUSES NOLVP                    //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES DEBUG                    //Debug mode for use with ICD
#device ICD=TRUE

#use delay(int=500000,RESTART_WDT)   //The debugger ok
//#use delay(int=125000,RESTART_WDT)   //The debugger no response
//#use delay(int=1000000,RESTART_WDT)  //The debugger ok
//#use delay(int=250000,RESTART_WDT)     //The debugger no response


Code:
#include <CCS Debugging Test.h>

#define LED PIN_C3
#define LED2 PIN_C2

#INT_TIMER1 NOCLEAR
void  TIMER1_isr(void)
{
   clear_interrupt(INT_TIMER1);
   //Reset Timer1 to minimum base value
   //output_high(LED2);
   output_toggle(LED2);
   sleep();
}


void main()
{
   //setup_oscillator(OSC_125KHZ|OSC_INTRC|OSC_PLL_OFF);    //Debugger become no response after this code of line
   setup_oscillator(OSC_500KHZ|OSC_INTRC|OSC_PLL_OFF);   //Debugger will runs with no problem!!!
   //setup_oscillator(OSC_1MHZ|OSC_INTRC|OSC_PLL_OFF);    //Debugger will runs with no problem!!!
   //setup_oscillator(OSC_250KHZ|OSC_INTRC|OSC_PLL_OFF);    //Debugger become no response after this code of line
   
   setup_adc_ports(NO_ANALOGS| VSS_VDD);
   setup_adc(ADC_CLOCK_DIV_2);
   setup_spi(SPI_SS_DISABLED);
   setup_lcd(LCD_DISABLED);
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
   //setup_timer_1(T1_DISABLED);
   setup_timer_2(T2_DISABLED,0,1);
//   /*
   setup_ccp1(CCP_OFF);
   setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard

   //Enable ALL Interrupt
   setup_timer_1(T1_EXTERNAL|T1_ENABLE_SOSC|T1_DIV_BY_1);   //Use T1 oscillator
   set_timer1(0);
   enable_interrupts(INT_TIMER1);
   enable_interrupts(GLOBAL);
//*/
    //Example blinking LED program
    while(true){
      output_low(LED);
      //output_low(LED2);
      delay_ms(500);
      output_high(LED);
      //output_high(LED2);
      delay_ms(500);
    }

}
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group