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 17 matches
CCS Forum Index
Author Message
  Topic: Assigning port pins to variables
skybox63

Replies: 13
Views: 28269

PostForum: General CCS C Discussion   Posted: Fri Jul 27, 2018 10:56 am   Subject: Assigning port pins to variables
Ttelmah,

As always thank you for the detail you put into your answers. I was perplexed as to why the variable solution was timing out while the "define" statement didn't. I know now. L ...
  Topic: Assigning port pins to variables
skybox63

Replies: 13
Views: 28269

PostForum: General CCS C Discussion   Posted: Fri Jul 27, 2018 10:48 am   Subject: Assigning port pins to variables
Thanks Jay I'm 63 and most of my time was spent tooling around with "basic". Was a signal officer in the army for 33 years building networks in the latter part of my career. Not much progr ...
  Topic: Assigning port pins to variables
skybox63

Replies: 13
Views: 28269

PostForum: General CCS C Discussion   Posted: Fri Jul 27, 2018 7:46 am   Subject: Assigning port pins to variables
I agree it can be a bit confusing. The issue with first starting out with learning this language is the barrage of obstacles that come to light when attempting to write a program. As one contemplates ...
  Topic: Assigning port pins to variables
skybox63

Replies: 13
Views: 28269

PostForum: General CCS C Discussion   Posted: Thu Jul 26, 2018 8:10 pm   Subject: Assigning port pins to variables
I got it now. Did some research and figured it out. Thanks everyone for leading me in the right direction.

Roger
  Topic: Assigning port pins to variables
skybox63

Replies: 13
Views: 28269

PostForum: General CCS C Discussion   Posted: Thu Jul 26, 2018 7:24 pm   Subject: Assigning port pins to variables
Thanks Jay, the macro threw me and still does. I suppose because of its name: DRIVE_LOW(pin). Is this a valid name for a macro? I get the general idea but don't understand the code.

Roger
  Topic: Assigning port pins to variables
skybox63

Replies: 13
Views: 28269

PostForum: General CCS C Discussion   Posted: Thu Jul 26, 2018 4:42 pm   Subject: Assigning port pins to variables
Ttelmah,

I read your reply again a little more closely. If I understand correctly you're saying don't use the variable solution if timing is a concern ( which it is). You then state that output_dri ...
  Topic: Assigning port pins to variables
skybox63

Replies: 13
Views: 28269

PostForum: General CCS C Discussion   Posted: Thu Jul 26, 2018 3:45 pm   Subject: Assigning port pins to variables
Thanks I get the top part but confused about the define statement where you have (pin == 0) ?
  Topic: Assigning port pins to variables
skybox63

Replies: 13
Views: 28269

PostForum: General CCS C Discussion   Posted: Thu Jul 26, 2018 2:30 pm   Subject: Assigning port pins to variables
Hello all,

I'm confused and respectfully request some help. I need to use a variable of pin B0 and D0 in my program to avoid duplication, but running into difficulties. Here is a short abstract pro ...
  Topic: Difference between Define and Variable
skybox63

Replies: 3
Views: 13473

PostForum: General CCS C Discussion   Posted: Sat Jul 07, 2018 6:54 pm   Subject: Difference between Define and Variable
Hello,

I have another question:

What is the difference between these two statements:
int16 pin;

#define PinB0 PIN_B0

and
pin = PIN_B0
I thought that the define statement gives a name an ...
  Topic: Correct placeholder for two 8 bit binaries
skybox63

Replies: 11
Views: 21716

PostForum: General CCS C Discussion   Posted: Sat Jul 07, 2018 5:26 pm   Subject: Correct placeholder for two 8 bit binaries
Very good explanation Jay, thank you for your time & effort.

Roger
  Topic: Correct placeholder for two 8 bit binaries
skybox63

Replies: 11
Views: 21716

PostForum: General CCS C Discussion   Posted: Sat Jul 07, 2018 3:36 pm   Subject: Correct placeholder for two 8 bit binaries
But the result doesn't equal 557 ?
  Topic: Correct placeholder for two 8 bit binaries
skybox63

Replies: 11
Views: 21716

PostForum: General CCS C Discussion   Posted: Sat Jul 07, 2018 1:39 pm   Subject: Correct placeholder for two 8 bit binaries
PCM Programmer,

I was hoping you could expand on your explanation. I'm trying to understand how this works?

What exactly is happening when "first" gets shifted left by 8 bits and ulti ...
  Topic: Correct placeholder for two 8 bit binaries
skybox63

Replies: 11
Views: 21716

PostForum: General CCS C Discussion   Posted: Sat Jul 07, 2018 1:06 pm   Subject: Correct placeholder for two 8 bit binaries
Jay,

Noted and thank you.

PCM Programmer,

I now see what I did wrong. I appreciate the clarification.

Best,

Roger
  Topic: Correct placeholder for two 8 bit binaries
skybox63

Replies: 11
Views: 21716

PostForum: General CCS C Discussion   Posted: Sat Jul 07, 2018 11:20 am   Subject: Correct placeholder for two 8 bit binaries
Hello,

I respectfully ask for some assistance on connecting two 8 bit binaries into a 16 bit representation so that I get the correct placeholders for adding.

For example:

first = 00101101 = ...
  Topic: #Bit explanation
skybox63

Replies: 7
Views: 18608

PostForum: General CCS C Discussion   Posted: Sun Jul 01, 2018 5:12 pm   Subject: #Bit explanation
Appreciate the follow-up. All good points to consider.

Roger
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group