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

PIC16F1939

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



Joined: 18 Nov 2008
Posts: 281
Location: Athens, Greece.

View user's profile Send private message

PIC16F1939
PostPosted: Sat Sep 29, 2018 10:51 am     Reply with quote

Hello,

I am using a PIC16F1939 and command:

Code:

set_tris_a (0b00111001);


gives this in disassembly listing:
Code:

set_tris_a (0b00111001);
  0003    3039     MOVLW 0x39
  0004    0065     TRIS 0x5


Register TRISA is at address 0x08C and not 0x05.

Am I missing sometjing here?

Thanks!
_________________
George.
Ttelmah



Joined: 11 Mar 2010
Posts: 19499

View user's profile Send private message

PostPosted: Sat Sep 29, 2018 12:45 pm     Reply with quote

Look up the TRIS command in the data sheet. It is not the same as a standard move.

Quote:

When ‘f’ = 5, TRISA is loaded.
When ‘f’ = 6, TRISB is loaded.
When ‘f’ = 7, TRISC is loaded.


From the data sheet entry for this command.
georpo



Joined: 18 Nov 2008
Posts: 281
Location: Athens, Greece.

View user's profile Send private message

PostPosted: Sat Sep 29, 2018 12:51 pm     Reply with quote

Thanks for that!

Rolling Eyes
_________________
George.
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