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 52 matches
CCS Forum Index
Author Message
  Topic: Int -> float incorrect cast
skoberlink

Replies: 10
Views: 15099

PostForum: General CCS C Discussion   Posted: Fri Jan 14, 2011 2:33 pm   Subject: Int -> float incorrect cast
The y != float is the only error or warning and it isn't a function so I don't know what's causing the problem.

I am using math.h if that could cause any issues. I mention this because it's full of ...
  Topic: Int -> float incorrect cast
skoberlink

Replies: 10
Views: 15099

PostForum: General CCS C Discussion   Posted: Fri Jan 14, 2011 1:59 pm   Subject: Int -> float incorrect cast
Ok well I really appreciate your help. I'm trying to switch it over to a single compilation unit. This isn't the first time I've run into problems with extern. I've just always figured it out before. ...
  Topic: Int -> float incorrect cast
skoberlink

Replies: 10
Views: 15099

PostForum: General CCS C Discussion   Posted: Fri Jan 14, 2011 1:32 pm   Subject: Int -> float incorrect cast
So I tried something else.

I made two unsigned int32's max and num that are not external and assigned max_steps and curr_step to those respectively. Max and num ended up with incorrect values even ...
  Topic: Int -> float incorrect cast
skoberlink

Replies: 10
Views: 15099

PostForum: General CCS C Discussion   Posted: Fri Jan 14, 2011 1:14 pm   Subject: Int -> float incorrect cast
I can't get it to go negative now for some reason.

I also noticed I forgot to initialize the float so I did that and now I can get numbers below 1 but they're still significantly different from the ...
  Topic: Int -> float incorrect cast
skoberlink

Replies: 10
Views: 15099

PostForum: General CCS C Discussion   Posted: Fri Jan 14, 2011 12:41 pm   Subject: Int -> float incorrect cast
Alright so I have no idea what's happening here so hopefully someone can tell me what's going on.

I am using MPLab IDE 8.63 with CCS 4.114 on a PIC18F2620.

I am using two int32 type variables to ...
  Topic: odd A/D conversion behavior
skoberlink

Replies: 13
Views: 13251

PostForum: General CCS C Discussion   Posted: Thu Jan 13, 2011 1:56 pm   Subject: odd A/D conversion behavior
Well I am told the impedance is acceptable. Also I discovered something new that points to that not being the problem. I put in a delay of around 20 seconds and it still did it. The cap should have be ...
  Topic: odd A/D conversion behavior
skoberlink

Replies: 13
Views: 13251

PostForum: General CCS C Discussion   Posted: Wed Jan 12, 2011 3:58 pm   Subject: odd A/D conversion behavior
Interesting. I had not considered saving to EEPROM only on power down. I will look into this as that would be much better.

I also misunderstood what extern meant then. I will change my code to refl ...
  Topic: odd A/D conversion behavior
skoberlink

Replies: 13
Views: 13251

PostForum: General CCS C Discussion   Posted: Wed Jan 12, 2011 3:00 pm   Subject: odd A/D conversion behavior
Ok I added PUT (and clarified my understanding and I get why it should be used now). The percent it tried to move to changed. This is the same thing that I always see when I change the delay. To me th ...
  Topic: odd A/D conversion behavior
skoberlink

Replies: 13
Views: 13251

PostForum: General CCS C Discussion   Posted: Wed Jan 12, 2011 12:04 pm   Subject: odd A/D conversion behavior
I'd....
enable PUT as it allows the PIC to 'get going right'.

trash the TRIS statements, let the compiler handle it...

same holds true for the ADCON=....,again use the compiler commands...

...
  Topic: odd A/D conversion behavior
skoberlink

Replies: 13
Views: 13251

PostForum: General CCS C Discussion   Posted: Wed Jan 12, 2011 10:51 am   Subject: odd A/D conversion behavior
I have the #fuse NOPUT which I understood to mean that the power up timer is disabled. I thought of that as well and checked it but I may be incorrect. I have trouble with the fuses since there doesn' ...
  Topic: odd A/D conversion behavior
skoberlink

Replies: 13
Views: 13251

PostForum: General CCS C Discussion   Posted: Wed Jan 12, 2011 10:13 am   Subject: odd A/D conversion behavior

So long as you have #device ADC=10,, this will return the value you require.

I have done this. The result seems to be getting returned correctly as the motor corrects itself. What appears to be h ...
  Topic: odd A/D conversion behavior
skoberlink

Replies: 13
Views: 13251

PostForum: General CCS C Discussion   Posted: Wed Jan 12, 2011 8:48 am   Subject: odd A/D conversion behavior
I am seeing some bizarre A/D conversion behavior. My current project is moving a stepper to a position specified as a percentage. The motor turns one way until it hits a limit, then turns the other. I ...
  Topic: undefined identifier byte
skoberlink

Replies: 3
Views: 8138

PostForum: General CCS C Discussion   Posted: Mon Jan 10, 2011 11:15 am   Subject: undefined identifier byte
I'm using the ccs built-in sqrt to calculate the square root of a float. It gives me a linker error that there is an undefined identifier BYTE. Since it's a builtin I wouldn't expect this to be an iss ...
  Topic: Local Variables shown as out of scope while debugging
skoberlink

Replies: 3
Views: 10783

PostForum: General CCS C Discussion   Posted: Fri Jan 07, 2011 4:32 pm   Subject: Local Variables shown as out of scope while debugging
Yeah I'm in the right scope when I'm having this problem. Also I can still view the locals in other projects (from their respective Watch windows of course). I did notice that some of them were visibl ...
  Topic: Local Variables shown as out of scope while debugging
skoberlink

Replies: 3
Views: 10783

PostForum: General CCS C Discussion   Posted: Fri Jan 07, 2011 10:24 am   Subject: Local Variables shown as out of scope while debugging
Hi everybody, I'm not sure if this is a CCS problem or an MPLab problem but I'm trying first here as I've had much better responses here.

I am using the PIC18F2620
CCS version 4.114
MPLab 8.60
M ...
 
Page 1 of 4 Goto page 1, 2, 3, 4  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group