Blinking effect during shifting out to LEDs


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,601

    Default Blinking effect during shifting out to LEDs

    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
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,601


    Did you find this post helpful? Yes | No

    Default

    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
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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.
    Last edited by mister_e; - 15th February 2005 at 17:08.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,601


    Did you find this post helpful? Yes | No

    Default

    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:
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Talking

    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.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Post

    You could also use 74HCT595, it's basically a 74HCT164 with output latches.

Similar Threads

  1. Run a string of LEDs from the mains
    By The Master in forum Off Topic
    Replies: 30
    Last Post: - 1st October 2009, 18:55
  2. output port issues driving LEDs
    By p15218 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th August 2008, 21:42
  3. Use of a PIC
    By Edwardo in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 22nd March 2007, 14:11
  4. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 22:19
  5. controlling leds with the switches
    By ilteris in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th October 2005, 21:02

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts