Ensuring a TLC5947 device is disabled on power up.

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Guys,

 

I have a string of TLC5947's attached to an ATmega328p.  There is a pin(Blank Pin) on the TLC5947 that disables output if it is high.  Currently the first bit of code sets PD7 high in addition 10 a 10K resistor.  

 

I want to have the TLC5947 blank pin high as the 328p is starting as the current draw with outputs on could stall the 328P before it executes the code.

 

Obviously the solution would be to have the TLC5947 Blank pin feed 5v from the board power, but I'm unsure as to the best way of configuring the Pin on the 328P such I can then bring the TLC5947 blank pin low.  

 

I'm sure there's an obvious solution but it's escaping me at the moment.

 

Any help would be appreciated.

 

regards

 

This topic has a solution.

 

 

Last Edited: Sun. Sep 22, 2019 - 07:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Please provide:
Schematic
Link to what ever a TLC5947 is.
Or did you intend for us to look it all up?
Generally, if a pin needs to be high while an AVR is in reset, an external pull-up resister is used.
Jim
Ok, I pulled a DS, you need a 10k pull-up on that line so the AVR can init the device before the outputs
Are enabled by putting “blank” line low!

 

 

 

 

Last Edited: Tue. Sep 10, 2019 - 07:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sorry, my bad, data sheet is here 

 

Generally, if a pin needs to be high while an AVR is in reset, an external pull-up resister is used.

 

Thanks, but yes I understand that.  My question is, how do I pull it down on command?

 

regards

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nikm wrote:

sorry, my bad, data sheet is here 

 

Generally, if a pin needs to be high while an AVR is in reset, an external pull-up resister is used.

 

Thanks, but yes I understand that.  My question is, how do I pull it down on command?

 

regards

 


Connect it to a port pin, once the chip is initiated, make your port pin an output and set it low.

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ahh,

 

Just to get this straight that's all I need to do with the setup below?

 

regards

 

5v -> 10k resistor ----- > Blank pin on TLC
                             |
                             v
                           PB7 on 328P (as output)

 

So setting PB7 low will sink voltage?

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nikm wrote:

Ahh,

 

Just to get this straight that's all I need to do with the setup below?

 

regards

 

5v -> 10k resistor ----- > Blank pin on TLC
                             |
                             v
                           PB7 on 328P (as output)

 

So setting PB7 low will sink voltage?

 

Yes!

 

 

 

 

Last Edited: Tue. Sep 10, 2019 - 08:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sweet, thank you.  

 

That said I'm having a hard time understanding why setting an output pin to low would sink the line to 0v unless the effect is to ground it. 

 

regards

 

 

 

Last Edited: Tue. Sep 10, 2019 - 08:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nikm wrote:
I'm having a hard time understanding why setting an output pin to low would sink the line to 0v

Why is that hard to understand?

 

"Setting a pin low" means, literally, "pulling it to 0V".

 

"Set pin low" and "set pin to 0V" and "ground the pin" are pretty much synonymous.

 

to put it another way: "low" = 0V = ground (conventionally).

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Sep 10, 2019 - 08:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Now I understand.  Thanks for the explanation

 

regards

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The issue isn't so easy to resolve I fear.  As I understand from reading the data-sheet, on startup all ports are inputs.  

 

The problem I'm trying to solve is those ms from when power is connected before any code can change pin state.  The TLC5947 Blank connection needs to stay high so as to disable output as the uncontrolled output could be enough to drop the voltage to the atmega so as to cause a brown out. 

 

Why they didn't default to a low to disable output I don't know but that's the way it is.  I'm starting to think I need a transistor to manage this. one where the 'switch' is normally closed

 

regards

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Why are you making your life difficult?
Just put a pull up resistor on the BLANK pin and you are all set.

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What is the effect of the associated input pin during startup, won't it sink the voltage thereby bringing the blank pin low and therefore making the TLC active?

 

regards

 

 

 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No.

 

When powering up all of the micro's I/O pins are in INPUT mode.

That is a high impedance, input mode.

The micro will not make the pin High or Low until it is powered up, and the software sets the pin for output mode, and makes it high or low.

 

The pull-up resistor will hold the device's pin high while the micro is powering up, (and the micro's I/O pins are still in input mode).

 

Once the software makes the I/O pin an output, and low, then the pin will go low.

It will then draw current through the resistor as it holds the lower end at ground level.

The device's pin will be low when the micro pulls its I/O pin low.

 

JC

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Excellent,  many thanks

 

regards

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You may want to  pull it up using the high voltage supply (you using 12 or 24v??).  The reason is you want you blank pin to go high as soon as the led chip has power.  If your 5V supply is coming up later on or slower (say your 5V has a huuuge filter cap), tying it to 5V may be a few milliseconds of delay (so leds/chip has 12V power before 5v/blank pin). You could use an NPN transistor to pull the pin low via the micro (the NPN prevents back-driving the AVR body diodes while AVR supply is rising). In 95% of the the cases this is not a factor.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!