Project: PIC LED Sequencer

tracecom

Joined Apr 16, 2010
3,944
hi tracecom,

Thank you for trying the project and my apologies for saying that it was an "absolute" mode project.

Have fun... Cheerful regards, Mike
I didn't know you said that, but it turned out that I did choose the absolute mode to compile - at least I think so. As you probably read, I am like Sargeant Shulz: "I know nothing."

I am wondering if the number of LEDs can be expanded to 15? There seem to be 7 unused ports on the PIC.

When the battery on my camcorder has time to charge, I am going to post a video.
 

Thread Starter

MMcLaren

Joined Feb 14, 2010
861
Hi tracecom,

You could expand the total number of LEDs a bunch of different ways. You could connect LEDs to seven of the remaining eight pins (one of those is an input only pin), as you mentioned, and then modify the program. You could also multiplex the LEDs in a 2x8, 3x8, 4x8, or larger matrix, but that would reduce the duty cycle and you would want to reduce the value of the LED current limiting resistors to increase "peak" current per LED in order to maintain the same "average" current and brightness per LED.

Another interesting 'enhancement' would be PWM brightness control which allows for some interesting effects (example youtube video). The circuit in that video uses a form of multiplexing called Charlieplexing where five pins are driving twenty LEDs with PWM brightness control for each individual LED.

More later. Cheerful regards...
 
Last edited:

zs1apb

Joined Aug 23, 2008
1
Hi.

I'm wanting to construct this as a test bed for some LED beacons for my neighbourhood watch and have one query. The code indicates a 16F628A PIC yet the schematic has a 16F1827? I would guess that the asm source would need to be compiled for the approriate chip?

Please advise as what I know about PIC programming could be considered dangerous ;-)

Thanks in advance!

Regards.
Tony
 

jpanhalt

Joined Jan 18, 2008
11,087
The code is definitely written for the 16F628A. There are some differences between that chip and the 16F1827. The pinouts appear to be the same. The 16F1827 is enhanced midrange and uses a different instruction for bank switching(movlb x). It is also preferred to write to port latches (e.g., LATA) rather than to ports themselves; although, writing to the port will probably work. The 16F1827 uses a different instruction to turn off analog inputs (e.g., to comparators). The configurations may also need to be changed. The defaults may be OK. I didn't look at them carefully. I am sure the TS (Mike LcLaren) will also respond.

One example of a difference:
16F628A switch to Bank1
Code:
bsf STATUS,RP0 ; bank 1 |B1
16F1827 switch to Bank1
Code:
movlb   1     ;bank1|B1
I suspect you could use the 16F628A with that code and schematic. To use the 161827, you would need to make some minor changes in the code.
 
Top