Norasmadi's Homepage

~Weakness of Attitude Becomes Weakness of Character~

I/O: SET/CLEAR/INV

PIC32MX have three special function registers (SFR) for IO. This registers that allow for atomic updating (which takes fewer clock cycles).

SET:

The selected bits are set or equal to 1. Example TRISBSET = 0x00F0 will set bits 4, 5, 6 and 7.

CLR:

The selected bits are cleared or equal to 0. Example TRISBCLR = 0x00F0 will clear bits 4, 5, 6 and 7.

INV:

The selected bits are inverted/toggled (1 to 0 or 0 to 1). Example TRISBINV = 0x00F0 will invert/toggle bits 4, 5, 6 and 7.

 

References:

Reference Manual (Section 2)

NU32: Digital Input and Output

Bits, Bytes and Word

What are Bits, Bytes and Word?

Bits = 0 or 1

Bytes = 8-bits (10101010)

Words = 2 Bytes -> 16-bits (1010101010101010)

Dword = 4 Bytes-> 32-bits (10101010101010101010101010101010)

Qword = 8 Bytes-> 64-bits (1010101010101010101010101010101010101010101010101010101010101010)

Freemind

FreeMind is a premier free mind-mapping software written in Java. The recent development has hopefully turned it into high productivity tool. We are proud that the operation and navigation of FreeMind is faster than that of MindManager because of one-click “fold / unfold” and “follow link” operations.

Continue reading