This Forum is Dedicated For all The Object Oriented PIC Lovers .......... The concept behind OOPic is straight forward. Use preprogrammed multitasking Objects from a library of highly optimized Objects to do all the work of interacting with the hardware. Then write small scripts in Basic, C, or Java syntax styles to control the Objects. During operation, the Objects run continuously and simultaneously in the background while the scripts run in the foreground telling the objects what to do.

Wednesday, July 25, 2007

[oopic] Re: Simple OOpic logic(?)

--- In oopic@yahoogroups.com, "oldseeldog" <oldseeldog@...> wrote:
>
> This seems simple enough but I can't get it to work - maybe someone
> can help... I have 3 switch inputs (A,B,C) and one latched output. It
> seems an AND gate (oGate)and a Flip Flop (oFlipFlop) should do it. The
> logic is this:
>
> If A AND B are high, the Flip Flop latches to one state (output high).
> If input C is high, the Flip Flop output is latched to low.
>
> The inputs to the AND gate are momentary and the link to the Filp Flop
> sets its output as it should, but the second Flip Flop input (switch
> C, also momentary) won't reset the the Flip Flop to its low state.
>
> Individually the AND (made from a oGate object)works as it should, as
> does the oFlipFlop.
>
> As I said, it should be simple, but so far it isn't. Any help will be
> appreciated.
>

You should probably post your code. The example code for the
oFlipFlop object does what you want with the exception of ANDing the
two inputs.

Another thought: I don't know how you have arranged your inputs.
Normally, they are '1' and pulled to '0' by the button. Make sure
your AND gate really goes to '0' when the buttons aren't activated.
The flop evaluates Input1 first and if it is a '1', the flop is set
and Input2 is not evaluated. Input1 must be a '0' before Input2 is
considered.

Richard



Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

No comments: