6.70.1 Description

Loads one byte from the data space to a register. The data space usually consists of the Register File, I/O memory, and SRAM, refer to the device data sheet for a detailed definition of the data space.

A 16-bit address must be supplied. Memory access is limited to the current data segment of 64 KB. The LDS instruction uses the RAMPD Register to access memory above 64 KB. To access another data segment in devices with more than 64 KB data space, the RAMPD in the register in the I/O area has to be changed.

This instruction is not available on all devices. Refer to Appendix A.

Operation:

(i)

Rd ← DS(k)

Syntax:

Operands:

Program Counter:

(i)

LDS Rd,k

0 ≤ d ≤ 31, 0 ≤ k ≤ 65535

PC ← PC + 2

32-bit Opcode:

1001000ddddd0000
kkkkkkkkkkkkkkkk