lut5 multiple functions on same inputs

More
8 years 4 weeks ago #118431 by smalla
Thanks. I never used select8 and weighted_sum, so need to understand them first to understand what You wrote :)

Please Log in or Create an account to join the conversation.

More
8 years 4 weeks ago #118440 by Todd Zuercher
The weighted_sum is used to input an array of bits and convert that to an s32 number.
linuxcnc.org/docs/devel/html/man/man9/weighted_sum.9.html
The select 8 takes an s32 value from 0-7 and sets one of 8 bits true.
linuxcnc.org/docs/devel/html/man/man9/select8.9.html

Please Log in or Create an account to join the conversation.

More
8 years 4 weeks ago #118441 by andypugh
How many gray-code bits are there? do you need bit-mode outputs or something more interesting?

For 4 bits of gray-code and a button you could put the button onto one of the bits.
For more bits of gray-code it is more difficult.

The various mux components are another option.
linuxcnc.org/docs/2.7/html/man/man9/mux_generic.9.html
You can set one of those up with as many input bits as you want, though you then need a "setp" for every possibly input combination. But the output value can be int or float, rather than just bit.

Please Log in or Create an account to join the conversation.

Time to create page: 0.281 seconds
Powered by Kunena Forum