SEQUENTIAL LIGHTS

by ProjecTronic in Circuits > Microcontrollers

142 Views, 1 Favorites, 0 Comments

SEQUENTIAL LIGHTS

WhatsApp Image 2023-05-30 at 6.09.54 PM.jpeg

This project is based on the PIC 16F84A microcontroller which performs many effects using LEDs.

Supplies


FUNCTIONING

WhatsApp Image 2023-05-30 at 6.09.54 PM (1).jpeg

First of all, be careful in feeding the electronic circuit, we must do it only with 5VDC so that it works correctly and we will see the sequences of all the led diodes.

the code was made with the binary code that allows us to use 8 bits for each port

HERE WE WILL SEE THE CODE THAT WAS USED FOR THE PHOTO WE USE THE A AND B PORTS AS DIGITAL OUTPUTS AND GENERATE SEQUENCES FOR THE LIGHTING OF EACH LED WITH A TIME OF 300 MILLI SECONDS SO THAT THIS GAME EFFECT CAN BE PRODUCED UNDER THE MIKROC SOFTWARE CODE

HEX CODE

void main() {
TRISB = 0; // sets the address for the output
PORTB = 0;
TRISA = 0; // sets the address for the output
PORTAL = 0;
while (1) {
portb = 0b0000000;
portal = 0b0000;
delay_ms(300);
portb = 0b1111111;
portal = 0b1111;
delay_ms(300);
portb = 0b0000000;
portal = 0b0000;
delay_ms(300);
portb = 0b1010101;
portal = 0b0101;
delay_ms(300);
portb = 0b0101010;
portal = 0b1010;
delay_ms(300);
portb = 0b0000000;
portal = 0b0000;
delay_ms(300);
portb = 0b1000000;
portal = 0b0001;
delay_ms(300);
portb = 0b1100000;
portal = 0b0011;
delay_ms(300);
portb = 0b1110000;
portal = 0b0111;
delay_ms(300);
portb = 0b1111000;
portal = 0b1111;
delay_ms(300);
portb = 0b1111101;
portal = 0b1111;
delay_ms(300);
portb = 0b1111111;
portal = 0b1111;
delay_ms(500);
portb = 0b1111101;
portal = 0b1111;
delay_ms(300);
portb = 0b1111000;
portal = 0b1111;
delay_ms(300);
portb = 0b1110000;
portal = 0b0111;
delay_ms(300);
portb = 0b1100000;
portal = 0b0011;
delay_ms(300);
portb = 0b1000000;
portal = 0b0001;
delay_ms(300);
portb = 0b0000000;
portal = 0b0000;
delay_ms(500);
portb = 0b0000000;
portal = 0b0001;
delay_ms(300);
portb = 0b0000000;
portal = 0b0100;
delay_ms(300);
portb = 0b0000001;
portal = 0b0000;
delay_ms(300);
portb = 0b0000100;
portal = 0b0000;
delay_ms(300);
portb = 0b0010000;
portal = 0b0000;
delay_ms(300);
portb = 0b1000000;
portal = 0b0000;
delay_ms(300);
portb = 0b0100000;
portal = 0b0000;
delay_ms(300);
portb = 0b0001000;
portal = 0b0000;
delay_ms(300);
portb = 0b0000010;
portal = 0b0000;
delay_ms(300);
portb = 0b0000000;
portal = 0b1000;
delay_ms(300);
portb = 0b0000000;
portal = 0b0010;
delay_ms(300);
portb = 0b1000010;
portal = 0b0001;
delay_ms(300);
portb = 0b0000000;
portal = 0b0000;
delay_ms(300);
portb = 0b1000010;
portal = 0b0001;
delay_ms(300);
portb = 0b0000000;
portal = 0b0000;
delay_ms(300);
portb = 0b1000010;
portal = 0b0001;
delay_ms(300);
portb = 0b0000000;
portal = 0b0000;
delay_ms(300);
portb = 0b1000010;
portal = 0b0001;
delay_ms(300);
}}

ELECTRONIC COMPONENTS

  • 1 PIC 16F84A
  • 11 RESISTORS 1/4W 220ohm
  • 1 RESISTORS 1/4W 1K
  • 1 JACK DC
  • 1 CRYSTAL OSCILATOR 4MHZ
  • 5 DIODES LEDS 5MM GREEN
  • 6 DIODES LEDS 5MM RED
  • 1 PCB

FEATURE

  • VIN 5VDC
  • I MAX 100mA
  • ALTERNATED SEQUENCES
  • DECORATIVE CIRCUIT

PCBWay

PCBWAY2.jpg
pcbway logo.png
pcbwayordenar.png

PCBWAY has 10 years in the electronics industry manufacturing professional PCBs, assembling PCBs managing to satisfy the demands of all parts of the world, in addition to meeting the highest quality and delivery time standards. PCBWAY allows the manufacture of your PCBs from 5 units.

This project was carried out thanks to PCBWAY, a company dedicated to the manufacture of prototypes and professional PCBs, in addition to offering you a ready assembly service with all the components in your PCBS, complying with the established quality and delivery time standards.

We thank PCBWAY, a leading company for manufacturing and assembling professional PCBs with the highest quality, PCBWAY has fair reasonable prices, punctual shipping time and 24-hour customer service, it also offers you the option of quoting all its services in his web page. Do not think twice and start manufacturing your professional PCBs from 5 units safely.

10pcbs at $5 order them here www.pcbway.com

We thank PCBWAY for the professional pcb they provide us for this project.