1. Register f with carry bit (C) content left shift loop instruction

Format: RLF f. d where d=1, the result →f;d→0, the result →w, the function is shown below.

Program design based on PIC MCU pattern lantern controller

2. Register f with carry bit (C) contents right shift loop instruction

Format: RRFf. The value of dd is the same as above, and the function is as shown in the figure below.

Program design based on PIC MCU pattern lantern controller

It is the easiest and simplest case to design a PIC microcontroller's pattern lantern controller using loop instructions and multiple feed and delay loop programs.

In view of the simple software design of the pattern lantern, the source program of the pattern lantern controller exemplified here, the custom file name is PIC07.ASM, and the source program list is as follows:

Program design based on PIC MCU pattern lantern controller

Program design based on PIC MCU pattern lantern controller

Program design based on PIC MCU pattern lantern controller

Program design based on PIC MCU pattern lantern controller

Program design based on PIC MCU pattern lantern controller

Description:

(1) There are more than 80 source programs of the above pattern lanterns, and the LEDs on the B port of the PIC16F84A single-chip microcomputer are used for analog display, and five kinds of LEDs of different patterns are produced.

(2) If the pattern lantern is to be made into a product, the B port can be used as a driver to drive the solid relay (introduced next time) to drive the display of the practical lantern. If necessary, the port B should be expanded.

(3) The pattern lantern is characterized by a fast speed, so the clock of the PIC16F84A is 4M.

Streamer RGB Lamp Earphones

Guangzhou Lufeng Electronic Technology Co. , Ltd. , https://www.lufengelectronics.com