that's exactly what a good forum needsif I may...Mike, K8LH
your solution is excellent
that's exactly what a good forum needsif I may...Mike, K8LH
your solution is excellent
Warning I'm not a teacher
I like pedja089's solution which is probably about as simple, efficient, and elegant as you can get with pure PBP code. He might test clearing the four LATB bits and then setting them based on if control.0 = 1 then latb.4 = 1 (or something similar).
I have to say the code PBP generated for the "Control << 4" instruction was pretty dismal. I'm curious to see what XC8 will generate for that...
Last edited by Mike, K8LH; - 25th July 2018 at 05:13.
it is simple but I wonder if it may cause some analog channel crosstalk effects when control inputs are changed sequentially like that esp at low clock speeds , just a thought.I like pedja089's solution which is probably about as simple, efficient, and elegant as you can get with pure PBP code
Warning I'm not a teacher
Bookmarks