User manual

Table Of Contents
mikroC PRO for PIC32
MikroElektronika
171
The second line, LATB.B1 = 1; will be decoded like in this way:
READ LATB is read: STORE Since the voltage levels on MCU pins are no
longer relevant, we get the expected value:
Actual voltage levels on MCU pins are no longer relevant when using LATx for output
MODIFY Data is modied to set the bit:
WRITE LATB is written with the new data. The
output driver for RB1 turns on, and the output
driver for RB0 remains turned on:
When to use LATx instead of PORTx
Depending on your hardware, one may experience unpredictable behavior when using PORTx bits for driving output.
Displays (GLCD, LCD), chip select pins in SPI interfaces and other cases when you need fast and reliable output, LATx
should be used instead of PORTx.