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

Search found 31 matches
CCS Forum Index
Author Message
  Topic: The quirks and flaws of the CCS compiler
DireSpume

Replies: 27
Views: 70799

PostForum: General CCS C Discussion   Posted: Thu Apr 18, 2013 10:47 am   Subject: The quirks and flaws of the CCS compiler
You philosophical argument is a good one and there may be some insight there as to why I am so annoyed with certain aspects of this compiler. I did start out as a software engineer coding windows sof ...
  Topic: The quirks and flaws of the CCS compiler
DireSpume

Replies: 27
Views: 70799

PostForum: General CCS C Discussion   Posted: Tue Apr 16, 2013 6:47 pm   Subject: The quirks and flaws of the CCS compiler
The '\0' is there, believe me; you don't have to add '\0' explicitly in string literals; it happens automatically. Anyway, the printf() "quirk" is no problem at all. It is perfectly reason ...
  Topic: int1 in struct does not evaluate properly in conditional
DireSpume

Replies: 4
Views: 6760

PostForum: General CCS C Discussion   Posted: Tue Apr 16, 2013 6:23 pm   Subject: int1 in struct does not evaluate properly in conditional
Oops, I spoke too soon. Bit fields appear to have the same problem! I changed the bools in the struct to single bits as a bit-field, but left all the other code the same, and I get exact same output ...
  Topic: The quirks and flaws of the CCS compiler
DireSpume

Replies: 27
Views: 70799

PostForum: General CCS C Discussion   Posted: Tue Apr 16, 2013 5:24 pm   Subject: The quirks and flaws of the CCS compiler
Example code for #12:

char Str[20] = "%u apples.\r\n";
char apples = 3;
printf(Str, apples);

This will print "%u apples.\r\n", NOT "3 apples." wit ...
  Topic: The quirks and flaws of the CCS compiler
DireSpume

Replies: 27
Views: 70799

PostForum: General CCS C Discussion   Posted: Tue Apr 16, 2013 4:43 pm   Subject: The quirks and flaws of the CCS compiler
My primary purpose in posting that list was as a reference in the hope that a newcomer (such as myself two months ago) might be helped by not having to go through the pain of learning the quirks of th ...
  Topic: The quirks and flaws of the CCS compiler
DireSpume

Replies: 27
Views: 70799

PostForum: General CCS C Discussion   Posted: Tue Apr 16, 2013 1:32 pm   Subject: The quirks and flaws of the CCS compiler
The list or quirks and flaws for the CCS compiler is rather extensive. I was recently asked to write some code for a PIC18, and decided to adopt the CCS compiler to save some time manually setting up ...
  Topic: int1 in struct does not evaluate properly in conditional
DireSpume

Replies: 4
Views: 6760

PostForum: General CCS C Discussion   Posted: Tue Apr 16, 2013 11:00 am   Subject: int1 in struct does not evaluate properly in conditional
Thanks Ttelmah. I tried searching the forum first, but I guess I suck at searching. Casting to int8 didn't work for me. I'll do it as a bit field... good call.
  Topic: int1 in struct does not evaluate properly in conditional
DireSpume

Replies: 4
Views: 6760

PostForum: General CCS C Discussion   Posted: Mon Apr 15, 2013 6:32 pm   Subject: int1 in struct does not evaluate properly in conditional
It seems like I found a compiler bug (PCH 4.140 on PIC18F67K22). My understanding is that an int1 should get automatically converted to an int8 if it gets used with any non-boolean operator. However ...
  Topic: Cannot change speed of I2C
DireSpume

Replies: 8
Views: 10069

PostForum: General CCS C Discussion   Posted: Wed Apr 10, 2013 12:13 pm   Subject: Cannot change speed of I2C
Even though I was 99.9% sure my oscillator was working as expected, I did double check it as you suggested, Ttelmah. Using FAST_IO, I was able to get 1.25 MHz on an output pin. The assembly code con ...
  Topic: Cannot change speed of I2C
DireSpume

Replies: 8
Views: 10069

PostForum: General CCS C Discussion   Posted: Tue Apr 09, 2013 11:58 pm   Subject: Cannot change speed of I2C
I am using an oscilloscope to measure clock rate on SCL2.
  Topic: Cannot change speed of I2C
DireSpume

Replies: 8
Views: 10069

PostForum: General CCS C Discussion   Posted: Tue Apr 09, 2013 7:23 pm   Subject: Cannot change speed of I2C
Okay, so it looks like it's using the hardware. This is what i2c_write() calls:


!#use i2c(Master,Fast=400000,sda=PIN_D5,scl=PIN_D6,FORCE_HW,stream=I2C_POWER)
0x403C: BCF SSP2CON1, 7 ...
  Topic: Cannot change speed of I2C
DireSpume

Replies: 8
Views: 10069

PostForum: General CCS C Discussion   Posted: Tue Apr 09, 2013 3:38 pm   Subject: Cannot change speed of I2C
Hi all, I have a problem I hope I can get some advice on. I am using a PIC18F67K22 with compiler version 4.140. I am using I2C in master mode to communicate with a power supply. The communication i ...
  Topic: WDT doesn't work
DireSpume

Replies: 1
Views: 4386

PostForum: General CCS C Discussion   Posted: Wed Mar 13, 2013 5:52 pm   Subject: WDT doesn't work
Hello, I just wanted to post a problem that took me a while to figure out so that hopefully it will save the next person some time. I was trying to get the watchdog timer to work on a PIC18F67K22. I ...
  Topic: const pointer not working
DireSpume

Replies: 5
Views: 9549

PostForum: General CCS C Discussion   Posted: Fri Feb 08, 2013 11:53 am   Subject: const pointer not working
Okay, I figured it out. There is a bug in printf() when using %c with romstr
typedef unsigned int16 uint16;

rom uint16 data[] = { 10, 20, 30 };
char str1[] = "Spid ...
  Topic: const pointer not working
DireSpume

Replies: 5
Views: 9549

PostForum: General CCS C Discussion   Posted: Thu Feb 07, 2013 2:23 pm   Subject: const pointer not working
Thanks Ttelmah, I actually learned that the rom qualifier exists from reading one of your responses to another thread. I'm using #device CONST=READ_ONLY because it seems silly to have two keywords th ...
 
Page 1 of 3 Goto page 1, 2, 3  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group