[Ktechlab-devel] Howto implement a logic bidir pin?

Sébastien Dugué sebastien.dugue at bull.net
Mon Jan 16 13:56:47 UTC 2006


  Thanks David, it works great. I was not far from the solution
but was a bit off concerning the conductance for an output.

  Thanks again...

  Sébastien.


On Fri, 2006-01-13 at 18:35 +0000, David Saxton wrote:
> It sounds like what you're doing should work...
> 
> In the PIC component, the bidir pin is implemented as a LogicOut, with high 
> impedance when configured as input and low impedance when configured as an 
> input.
> 
> // Create the logic pin
> LogicOut * l = createLogicOut();
> 
> // Make it an input
> l->setOutputHighConductance( 0.0 );
> l->setOutputLowConductance( 0.0 );
> bool inputState = l->isHigh();
> 
> // Make it in output
> l->setOutputHighConductance( 0.01 );
> l->setOutputLowConductance( 0.01 );
> l->setHigh( outputState );
> 
> The above code should work, (but I haven't tested it..)
> 
> David Saxton
> 
> 
> On Friday 13 January 2006 16:59, Sébastien Dugué wrote:
> >   Hi all,
> >
> >   I'm currently trying to implement a component (logic) with
> > bidirectional pins. I made those pins with createLogicOut()
> > but I can't seem to be able to drive a level on those pins
> > when tied to a PIC.
> >
> >   I tried messing with setOutputHighConductance() and
> > setOutputLowConductance() to revert the pin direction but
> > to no avail.
> >
> >   What's the proper way to implement true bidir pins?
> >
> >   Thanks, and keep the good work, it's pretty impressive.
> >
> >   Sébastien.
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
> _______________________________________________
> Ktechlab-devel mailing list
> Ktechlab-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ktechlab-devel
-- 
------------------------------------------------------

  Sébastien Dugué                BULL/FREC:B1-247
  phone: (+33) 476 29 77 70      Bullcom: 229-7770

  mailto:sebastien.dugue at bull.net

  Linux POSIX AIO: http://www.bullopensource.org/posix
                   http://sourceforge.net/projects/paiol
 
------------------------------------------------------





More information about the Ktechlab-devel mailing list