PDA

View Full Version : Blinking effect during shifting out to LEDs



Demon
- 15th February 2005, 14:51
Hi,

I have connected two 74HC164 shift out registers on a PIC 16F628.

I am able to control which bit I want active within the MCU, depending on a bank of input buttons.

When the shifting out process occurs, the proper LED turns on, but all the other LEDs lower than that active LED blink at a very weak intensity as I push the button.

They do not remain on, only blink faintly along with the press of the button. My solution was to add a circuit which I turn OFF the LEDs, perform the shift out process, and then turn the LEDs back ON.

It will remove the blink, but my solution is not very efficient. Does anyone have any idea what causes this 'blink' during shifting out and hopefully how to stop it?

Steve, my idea of adding a 22K resistor at the end of the LEDs worked on the breadboard, but does not work once I migrated to perf-board...? I'm still checking why, but that does not explain why I have that blink in the 1st place.

Robert
:)

Demon
- 15th February 2005, 15:00
Steve,

I just remembered a difference between the breadboard and the perf-board circuits.

The LEDs on the breadboard were turned on by MCT6 opto-couplers which were connected to the shift out registers. The 22K resistor was after the MCT6.

The LEDs on the perf-board circuit are connected directly to the shift out registers, no opto-couplers.

The breadboard was used to learn how to shift out bits. This circuit will be used for one part of the application and requires the opto-couplers to isolate 2 circuits from each other.

The circuit on the perf-board is used for another circuit which just turns ON the proper LEDs depending on certain conditions, I'd like to avoid adding MCT6 chips there if possible. Finding the cause of that 'blinking' during shifting out might help me avoid a lot of chips and circuitry.

Robert
:)

mister_e
- 15th February 2005, 16:47
the reason is simple... bits are shifted one after the other.

Lets say we want to send this pattern to 8 outputs

1000 1000

shiftout shift one bit a the time... of course, it's serial stuff

Shiftregister out during process

start
0000 0001
0000 0010
0000 0100
0000 1000
0001 0001
0010 0010
0100 0100
1000 1000
end

this is why you see some blink. The only way to avoid this, is to use Latchs that will refresh outputs state only at the end of shiftout.. something like 74HC373...

OR change those shit register to something better like PCF8574 or MCP23016 (do you remind when i talk about those chip the first time??? ;) ). I prefer the last option... take less pins, easier, faster, cheaper, better.

Demon
- 15th February 2005, 20:53
Ah, see now I understood what you meant. You darn Frenchmen from Quebec, can never speak properly... Tien toé!

I was doing some intense brainstorming with my eyes shut today and I realized I might have a way to use a 16F877 to drive my application. I wouldn't need any shift registers and have increased program space. Cost is a little higher, but circuitry could be extremely more simple.

So, anyone want to buy my Jameco order of shift in and out registers I just received?

Robert
:lol:

mister_e
- 15th February 2005, 21:06
Ah, see now I understood what you meant. You darn Frenchmen from Quebec, can never speak properly... Tien toé!


mange d'la marde ;)

Must i also spread butter on your toast tomorrow morning? send you to school by holding your hand ?



Cost is a little higher, but circuitry could be extremely more simple.


you must calculate the time you'll save. AND BTW by using F877, F871 or else PIC with 33 i/o and enough code space, you'll save pcb space, drilling time and such.



So, anyone want to buy my Jameco order of shift in and out registers I just received?


use them on your pinboard.

Ingvar
- 16th February 2005, 11:57
You could also use 74HCT595, it's basically a 74HCT164 with output latches.