Difference between PORT and LATCH on PIC 18F

前端 未结 8 813
南旧
南旧 2020-12-04 22:02

I already read the datasheet and google but I still don\'t understand something.

In my case, I set PIN RC6 of a PIC18F26K20 in INPUT mode:

TRI

8条回答
  •  执念已碎
    2020-12-04 22:34

    I recently experienced that writing on PORTx Ri (e.g. PORTC RC1) of PIC18F14K50 is ineffective when another PORTx Rj (e.g. PORTC RC0) was already set. I observed a peek in the oscilloscope on PORTx Ri but I was unable to sustain the output. This issue has vanished as soon as I was writing on LATx.

    LATx writing looks mandatory on PIC18 and PORTx writing prohibited.

提交回复
热议问题