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

GET_TRIS_A() command

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







GET_TRIS_A() command
PostPosted: Thu Jan 24, 2008 10:43 am     Reply with quote

Hi

Is the command

Code:
variable = GET_TRIS_B();


valid for PIC12F509?

I get this error when I compile

Undefined identifier -- get_tris_b
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jan 24, 2008 11:07 am     Reply with quote

Look in the I/O Port section of the 12F509 data sheet. There's a
schematic of a circuit for an i/o pin. Compare it to the 16F877
data sheet. You'll notice that the 12F509 doesn't have a tri-state
buffer going from the TRIS latch to the internal data bus. But the
16F877 does have it. Therefore you can't read the TRIS latch on
a 12F509. That's how you find the answer to this question.

Actually, also on that page in the 12F509 data sheet, it says this:
Quote:
The TRIS registers are “write-only”
stewc
Guest







PostPosted: Thu Jan 24, 2008 12:43 pm     Reply with quote

I got confused because the user manual says

Availability: All devices

Thanks you
Heath



Joined: 21 Dec 2007
Posts: 41

View user's profile Send private message

PostPosted: Thu Jan 24, 2008 1:14 pm     Reply with quote

Datasheet always beats the ccs user's manual. Smile
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