PIC18 cheatsheet

MOVLW

Detailed reference for the MOVLW instruction in PIC18 ISA.

Description

Move a literal 8‑bit value into the working register WREG.

  • The operand k is an 8‑bit constant (0x00–0xFF).
  • The instruction has no additional options.

Examples

; Load 0x00 into WREG
MOVLW 0x00 ; W = 0x00
; Load 0xFF into WREG
MOVLW 0xFF ; W = 0xFF
; Load 0x12 into WREG
MOVLW 0x12 ; W = 0x12