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

CCS Bug !?!?!?

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



Joined: 04 Jan 2005
Posts: 224

View user's profile Send private message

CCS Bug !?!?!?
PostPosted: Mon Jan 29, 2007 3:25 am     Reply with quote

Plz lets consider the following simple code:

Code:

#include <16F877A.h>
#device adc=8

#FUSES NOWDT                    
#FUSES XT                       
#FUSES PUT                      
#FUSES NOPROTECT                
#FUSES NODEBUG               
#FUSES BROWNOUT                 
#FUSES NOLVP                 
#FUSES NOCPD                    
#FUSES NOWRT                    

#use delay(clock=4000000)
#use rs232(baud=1200,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)

void main()
{
   setup_adc_ports(NO_ANALOGS);
   setup_adc(ADC_OFF);
   setup_psp(PSP_DISABLED);
   setup_spi(FALSE);
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
   setup_timer_1(T1_INTERNAL|T1_DIV_BY_1);
   setup_timer_2(T2_DIV_BY_4,249,1);
   setup_ccp1(CCP_CAPTURE_RE);
   set_pwm2_duty(124);
   setup_ccp2(CCP_PWM);
   setup_comparator(NC_NC_NC_NC);
   setup_vref(FALSE);

   while(1);
}


This code will generate a 1Khz PWM on CCP2.
When compiled using CCS v: 4.017 -> Nothing Exclamation Question
When compiled using CCS v: 4.013 -> PWM Shocked

Any thoughts?

CCS Technical Support does not monitor this forum on a regular basis. Please do not post bug reports to this form. All bug reports should be emailed to support@ccsinfo.com. Thank you.
Ttelmah
Guest







PostPosted: Mon Jan 29, 2007 3:36 am     Reply with quote

Yes. Use 3.249.... Smile
The 4.xxx compilers, seems now to just about be starting to work. I have compiled three test programs, that previously would not work properly with earlier V4 compiler versions, and with 4.023, and they are at last producing working code. There are still problems with a lot of the 'new' stuff, but the compiler looks to at last have just about reached a possible 'beta' status in my mind. The versions before this, are not useable compilers, unless you are very lucky (look at the posts about this). 3.249, is a reasonably stable working compiler, and unless you 'need' one of the new features, would be the preferred choice.

Best Wishes
PICoHolic



Joined: 04 Jan 2005
Posts: 224

View user's profile Send private message

PostPosted: Mon Jan 29, 2007 4:17 am     Reply with quote

Wow Shocked that's dangerous !!

I tried it in 4.023, it works!

10x
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