Geetings all;

wordwrap off, long lines ahead.
Trying to get a handle on too much code for an r-pi, I expunged several 
modules and have attempted to incorporate their functions into a lut5.

Several places its worked well where all the data paths were forward.

But in trying to setup a oneshot, called 'time(axis letter)' I cannot 
make it work.  Its as the function string is wrong.

The code:
# first, an and2 to detect & make a 25% duty cycle signal from turning the dial
net     xAtoggle        <= hm2_[HOSTMOT2](BOARD).0.encoder.01.input-a => 
and2xtoggle.in0
net     xBtoggle        <= hm2_[HOSTMOT2](BOARD).0.encoder.01.input-b => 
and2xtoggle.in1
net     xtoggleout      <= and2xtoggle.out # want falling edge!
# now I have, at xtoggleout, a nominally 25% duty cycle high, pulse, we trigger 
on rising edge
# now collect button status and make initial trigger pulse out of it on rising 
edge.
net     buttonxdown     <= hm2_[HOSTMOT2](BOARD).0.gpio.066.in => edgextrig.in
setp    edgextrig.in-edge false
setp    edgextrig.out-width-ns 10000
net     xtrig0          <= edgextrig.out  => or2xretrig.in1 # true pulse when 
released
######################################
# set up the oneshot for dial timeout
######################################
setp    timex.rising    true #default
setp    timex.falling   false #default
setp    timex.width     3.0
# setup a lut5 to retrigger timex or timez
setp    lut5timex.function 0x80 # 5 input gate using 3, 0 inverted
net     xtoggleout      => lut5timex.in-0 # string of + pulses as dial turns
net     buttonxdown     => lut5timex.in-1 # true when released
net     xtimedout       <= timex.out => lut5timex.in-2 # true while oneshot 
running, kills retrig path when timed out
net     buttontimex     <= lut5timex.out # => or2xretrig.in0 # s/b train of + 
pulses, retriggers on rising edge
net     xretrigger      <= or2xretrig.out => timex.in # combined initial + 
pulse trigger to retrigger timex

lut5timex.out remains silent, timex is triggered once by the 
edge.out -> or2.in1, or2.out ->timex.in path, when the button is 
released.

The idea is to trigger the oneshot on release of the button near the 
dial, and keep it triggered until the dial has been motionless for
3 seconds. The oneshot times out, lut5timex.in-2 goes false and this
can only be restarted by pressing and releasing the button again.

What have I done wrong?

Thank you.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to