1

I'm playing with a nice new PIC16F15356, and investigating the Configurable Logic Cell (CLC) capabilities - basically a 4-cell mini-PLD on the chip that can take inputs from any of a list of 40 modules, including certain configurations of I/O pins.

But there seems to be no simple programmatic digital input capability. I was hoping to be able to set a "motor direction" bit from the code, which would be worked into the logic to generate my outputs. I could probably hack it by setting something like a PWM to "100%" or "0%" and feeding that in, but I was expecting there to be 4 bits of a register I could write to, and there isn't!

One way might be to dynamically reconfigure the CLC logic, on the fly, but my mind fills with the horrors of glitches, weird intermediate states, etc. Another is to write to a I/O pin, and then assign that as an input into the logic - that might be the best way.

Am I missing something, please?

SusanW
  • 987
  • 7
  • 26
  • You could feed in data from the serial drivers (EUSART or SPI). That would give you a one byte write (to the serial module) with a configurable clock for speed. Those modules also have interrupts to let you know when more data can be sent. – David Mar 22 '20 at 22:05
  • @David Fair enough - there's no more official way that my eyes have overlooked, then? Feel free to write "Nope you have to hack it!" (or similar) as an answer, if you like (otherwise I'll do so myself in a few days, if nobody else does) :-) – SusanW Mar 24 '20 at 20:03
  • I am considering the same issue, I will try changing the configuation setting registers to force a change of state e.g. change the invert/non-invert setting of a gate. – user1582568 Oct 08 '20 at 03:44

0 Answers0