Jump to content
Sign in to follow this  
ajcrm125

Tris Question From Noob

Recommended Posts

Okay.. just downloaded SourceBoost IDE etc and started a new project using C2CPlus and a PIC12C508A as my target device. Only thing missing is I don't know how to access the TRIS register so I can configure the GPIO port functions.

Any help?

Thanks...

Share this post


Link to post
Share on other sites
Okay.. just downloaded SourceBoost IDE etc and started a new project using C2CPlus and a PIC12C508A as my target device.  Only thing missing is I don't know how to access the TRIS register so I can configure the GPIO port functions.

Any help?

Thanks...

 

 

Looks like you will have to use the inline assembler to issue a tris instruction.

Share this post


Link to post
Share on other sites
Okay.. just downloaded SourceBoost IDE etc and started a new project using C2CPlus and a PIC12C508A as my target device.  Only thing missing is I don't know how to access the TRIS register so I can configure the GPIO port functions.

Any help?

Thanks...

 

 

You please see the help first, its on the ide HELP button

 

 

you can use the assembly routines as well

 

trisc = 0x00; will make all the pins of port C as output

trisc = 0xff; will make all the pins of port C as input

 

 

you can also configure indvidual pins as output/ input pins:

 

trisc = (00000000b) here each binary digit represent each pin of port c

you please follow the help. Its all given in there

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...