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

preview_player
Показать описание
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
Рекомендации по теме
Комментарии
Автор

Nice video. Here are some sugestions to make it even better:

- Present your slides in fullscreen (or use some video-editor to present them for you), so you don't waste time zooming in/out and searching for the right slide
- Prepare your code before your presentaiton, so you can speed it up
- Edit your video removing empty/silent spaces
- Talk louder

Thank you!

psychechip
Автор

Excellent tutorial! I do think you might need to add a "goto $" after your "goto Loop" instruction. Otherwise, once the "btfss c1, 3" becomes TRUE, the processor will then try to execute code that is not meant to be executed without a call to it. "goto $" will loop to itself indefinitely after the set number of loops to "Loop".

ericjumpelfeaturingjohnnyj
Автор

you need to read how to format assembler code properly

seanolsen
Автор

Try not playing the piano while making the video, or maybe sing along? Otherwise, not a bad video.

HerGuitarTutor
join shbcf.ru