These are pushbuttons, not rotary encoders with wonky shafts that can jitter whenever the cat farts.
These are pushbuttons, not rotary encoders with wonky shafts that can jitter whenever the cat farts.
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
I'm certain it has something to do with voltage levels as the PIC loses power.
IOC flags are randomly triggered when VDD is cut with a switch, but not on MCLR.
Values are READ from DATA at PIC start-up. IOC flags on pushbuttons are used to swap values left to right, then WRITE back to memory.* By the end of the video, all values have swapped places without pushing any buttons.
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Ceramic bypass/decoupling capacitors are often better .
a particularly bad practice, you should always check that it was an actual keypress [ in that was held for a definitive time] before actioning itIOC flags on pushbuttons are used to swap values left to right, then WRITE back to memory
key activity should be ignored until power is stable
Warning I'm not a teacher
I have 0.1uF on VDD/VSS pins, 0.1uF on the switch input pins and 0.01uF on the encoder input pins; all ceramic caps.
That's what the IOC flag was used for; to check if a button was activated. If I'm going to have to check if a key has been pressed, IOC is of no advantage to me. I didn't understand why you guys were not in favour of using IOC for this, but now I'm understanding a lot better why it wasn't good idea.
I've already gutted the IOC code and I'm checking the pins for change in value. Those 4 SWAP buttons were the last ones, and then I noticed things were going wacky with my stored data.
I always have at least PAUSEUS 200 at program startup. I have no idea how to check if power is stable on shut-down.
I've given up on the 16F18877; I had switched to these for IOC, internal pull-ups and Schmitt Trigger features. But they're much more finicky than a 16F1937 with external pull-ups, 74HC14 ICs and just polling the pins in MainLoop.
The 16F1937 is like a tank; less fancy but it keeps on trucking.
Last edited by Demon; - 22nd September 2024 at 03:32.
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Bookmarks