1
Tutorial (9): Creating arrays using indirect addressing in PIC microcontrollers
13:31
Tutorial (8): Creating arrays using lookup tables in PIC microcontrollers
17:33
3
Tutorial (7): Creating Software Delay and Hardware Delay in PIC Microcontrollers
51:46
4
Experiment (4): Interrupts in PIC microcontroller
18:26
5
Experiment (3): Creating software delay in PIC microcontroller
28:14
6
Tutorial (6): Branching and Conditional Instructions in PIC Microcontrollers
18:37
7
Tutorial (5): Logical Instructions in PIC microcontrollers
18:53
8
Tutorial (4): Arithmetic Instructions in PIC microcontrollers
27:16
9
Tutorial (3): PIC input/Output Ports with Addition
36:23
10
Tutorial (2) Using Output ports in PIC microcontrollers
15:14
11
Tutorial (1): How to download and install MPLAB of PIC microcontrollers
10:39

Tutorial (8): Creating arrays using lookup tables in PIC microcontrollers

8 months ago
127

A look-up table is a block of data that is held in the program memory and which can be accessed by the program and used within it.
The table is formed as a subroutine.
Every byte of data in the table is accompanied by a special instruction retlw.
As it implements the subroutine return, it picks up its operand and puts it into the W register.
We use something called ‘computed go to’ using the instruction addwf pcl.
The contents of the W register are added to pcl, which is the lower byte of the program counter.
Once a number has been added to the program counter, program execution jumps forward by whatever that number was

Loading comments...