1/14/2025 5:03 PM | |
Joined: 12/18/2014 Last visit: 9/4/2025 Posts: 35918 Rating:
|
What exactly do you want to do with bit 2? Set? Reset? Or both? |
1/15/2025 8:58 PM | |
Joined: 11/19/2021 Last visit: 5/26/2025 Posts: 45 Rating:
|
This is my attempt, but needs lots of blocks to get down to bit 2. Zip of complete code attached, this shows the top two bits. There has to be a simpler way of doing it, but I cannot think of it at the moment. AttachmentDecompose to bits.zip (203 Downloads) |
1/16/2025 9:08 AM | |
Joined: 11/19/2021 Last visit: 5/26/2025 Posts: 45 Rating:
|
For if/then I am using an comparator, and selecting the required value using a multiplexer. If the value is zero, then it will only set the bit if a button is pressed at that time. Like this, picture here, code at the bottom of the page in the zip file If you know a simpler way of splitting an analogue value into binary as in the rest of the code, I would really appreciate knowing how it works. Stephen AttachmentDecompose to bits (2).zip (143 Downloads) |
Last edited by: sjt01 at: 01/16/2025 09:25:34 |
|
1/16/2025 11:04 AM | |
Joined: 12/18/2014 Last visit: 9/4/2025 Posts: 35918 Rating:
|
You don't comment on my last post, you don't make a statement about it. Didn't you read it? |
Follow us on