This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to read port pins in port(P0,1,2)?

I would like to call function like port(P0,1,2).i want to assign the values of 0 and 1 to P0.1 and P0.2 using that function prototype only...how can i assign the values to port pins.what are the steps i need to follow...

Thanks in advance

chinnaye

Parents
  • "what are the steps to do that?"

    It is your project; you are the programmer - so it is really your job to think about that!

    Think about what standard facilities the 'C' programming language provides to do such things;

    Read the Keil C51 Compiler Manual to see if there are any proprietary language extensions to help you.

    "i want to use function is"

    ping( port, pin_number1, pin_number2 )
    


    So how will the function know what values to write to the two pins...?

Reply
  • "what are the steps to do that?"

    It is your project; you are the programmer - so it is really your job to think about that!

    Think about what standard facilities the 'C' programming language provides to do such things;

    Read the Keil C51 Compiler Manual to see if there are any proprietary language extensions to help you.

    "i want to use function is"

    ping( port, pin_number1, pin_number2 )
    


    So how will the function know what values to write to the two pins...?

Children
No data