• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Bit Mask Shifting Code Help

Suraj143

Active Member
I have connected 12 LEDs to my PIC ports.Lower 8 LEDs on PORTB & upper 4 LEDs on PORTA.I want to do a pattern like this...!!

First all the LEDS are lights up.After only the MSB LED shift left until it dissapered.After the next MSB LED will shift left until it dissapered like wise until last LED shifts and dissapered.For easy understand I have attached a picture of my pattern.

Did a code but it looks like too long.I need a compact code with lesser program lines.I use a baseline PIC16F54 (which has few programing space).
 

Attachments

Last edited:

Latest threads

EE World Online Articles

Loading

 
Top