Jump to content
Sign in to follow this  

Get Input Information?

Recommended Posts


I'm new in programming PIC with c.

In one of my first project, I want get information if a spezifield bit is set on input porta e.g. bit 2.


The function input_pin_port_a() is obsolet? Is ther a new function? Ther is the function set_bit().

May problem is, I have definition trisa = 00001100b; Then i want call a function if porta is xxxx01xxb and xxxx10xxb (x is 0 or 1) How I can do that without to write:

if (porta == 00000100b or porta == 00000111b ...) ?




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.

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.

Sign in to follow this  

  • Create New...