It is all clearly explained in the device data sheet - with further clarification in the MCHP Family Reference Manual.
It is all clearly explained in the device data sheet - with further clarification in the MCHP Family Reference Manual.
Why pay for overpriced toys when you can have
professional grade tools for FREE!!!
PORTx and LATx are not commands, they are registers (basically RAM location in the PIC).
Because of the way the PIC works internally (using a read-modify-write cycle) and depending on what the output pins are driving you can get the problem you had. Writing to the port latch (LATx) instead of directly to the port (PORTx) avoids the problem because the read-operation of the read-modify-write cycle is then performed agains the port latch instead of against the actual output pins.
Bookmarks