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 CCS Technical Support

help me about 18F63j11

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
sindyme



Joined: 05 Aug 2009
Posts: 37

View user's profile Send private message MSN Messenger

help me about 18F63j11
PostPosted: Wed Aug 05, 2009 10:28 pm     Reply with quote

My PIC of 18F63J11 can't work !
I use external crystal at 8Mhz.

I look "CCS Project wizard" that it have

1. High speed Osc (> 4mhz for PCM/PCH) (>10mhz for PCD)
2. High speed osc with SW enabled 4x PLL
3. External clock
4. External Clock with SW enabled 4x PLL

I select kind of 1 same 18F452 , but I use "HS" on PIC18F63J11 can't work.

Please help me Orz !!

My 18F63j11 .H file past it

Code:
#FUSES NOWDT       
#FUSES WDT128                   
#FUSES HS               
#FUSES NODEBUG                 
#FUSES NOXINST               
#FUSES STVREN                 
#FUSES NOPROTECT           
#FUSES FCMEN               
#FUSES IESO             
#FUSES PRIMARY                 
#FUSES RESERVED


and main
Code:

setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_OFF|ADC_TAD_MUL_0);
setup_psp(PSP_DISABLED);
setup_spi(SPI_SS_DISABLED);
setup_wdt(WDT_OFF);
setup_timer_0(RTCC_INTERNAL);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);
enable_interrupts(INT_RDA);
enable_interrupts(INT_RDA2);
enable_interrupts(GLOBAL);
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Wed Aug 05, 2009 11:27 pm     Reply with quote

Is your main really like that or more like:

Code:

void main ( void ) {

   setup_adc_ports(NO_ANALOGS|VSS_VDD);
   setup_adc(ADC_OFF|ADC_TAD_MUL_0);
   setup_psp(PSP_DISABLED);
   setup_spi(SPI_SS_DISABLED);
   setup_wdt(WDT_OFF);
   setup_timer_0(RTCC_INTERNAL);
   setup_timer_1(T1_DISABLED);
   setup_timer_2(T2_DISABLED,0,1);
   setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
   setup_comparator(NC_NC_NC_NC);
   setup_vref(FALSE);
   enable_interrupts(INT_RDA);
   enable_interrupts(INT_RDA2);
   enable_interrupts(GLOBAL);

   while (1) {

   }
}


please list more about compiler version, your FULL file... there's items missing from your post that need to be answered...

THanks,

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
sindyme



Joined: 05 Aug 2009
Posts: 37

View user's profile Send private message MSN Messenger

PostPosted: Wed Aug 05, 2009 11:47 pm     Reply with quote

My CCS version is 4.084

and my main
Code:

void main()
{
   setup_adc_ports(NO_ANALOGS|VSS_VDD);
   setup_adc(ADC_OFF|ADC_TAD_MUL_0);
   setup_psp(PSP_DISABLED);
   setup_spi(SPI_SS_DISABLED);
   setup_wdt(WDT_OFF);
   //setup_timer_0(RTCC_INTERNAL);
   setup_timer_1(T1_DISABLED);
   setup_timer_2(T2_DISABLED,0,1);
   setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
   setup_comparator(NC_NC_NC_NC);
   setup_vref(FALSE);
   enable_interrupts(INT_RDA);
   enable_interrupts(INT_RDA2);
   enable_interrupts(GLOBAL);
     
   //delay_ms(500);
   printf("Testing.....");
   
   output_high(pin_B0); // Link a LED. if PIC work will ON
   
   for(;;)
   {
      printf("Test Test");
           
   }

}
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Thu Aug 06, 2009 9:42 am     Reply with quote

unless you have service routines for your interrupts, I wouldn't enable them if I were you until you define something to handle them.

Ok, and now for the code prior to the main() ??

Do you have a #device <18F63j11.h>

You're using printf, so you'll need some #use rs232 statement.

Also, consider doing something that repeats..

like

Code:

 while (1) {

    printf("Hello World\r\n");
    output_high (LED);
    delay_ms(500);
    output_low(LED);
    delay_ms(500);
  }

_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion 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