Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Many Output toghete


  • Please log in to reply
1 reply to this topic

#1 Alex3com

Alex3com

    New Member

  • Members
  • Pip
  • 7 posts

Posted 05 April 2014 - 07:59 AM

Dear Community,

 

I'm a new member and this is my first time that I write a question...just because many questions are resolve yet...just search :)

 

I hope we can resolve this question.....

 

How can I pilot together more pin in the same time? 

My problem is this:

 

If i write:

 

pin1_object.white(true);

pin2_object.white(true);

 

the micro controller open pin1 and than pin2

 

How Can I open pin1 and pin2 together in one instruction?

 

Thank to all for helping and for help gave me yet "free" :)



#2 gismo

gismo

    Advanced Member

  • Members
  • PipPipPip
  • 110 posts

Posted 06 April 2014 - 04:19 PM

Hey Alex, 

 

I'm not sure you can do that at the same time with the standard firmware and netmf sdk...You would need to directly program the the chip register(s) with low-level instructions with native code and bypass the CLR to accomplish that.

 

BUT, you could accomplish the same "code" and simply write a method like this to simplify your code:

public void Pin1AndPin2(Cpu.Pin pin1, Cpu.Pin pin2, bool onOrOff)
{
pin1.Write(onOrOff);
pin2.Write(onOrOff);
}

and in your program code you would call:

Pin1andPin2(pin1_object, pin2_object,true);





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.