View previous topic :: View next topic |
Author |
Message |
Sterngleiter
Joined: 07 Jan 2013 Posts: 90
|
|
Posted: Sun Oct 13, 2019 5:32 am |
|
|
pca9685_out-led0------[RV]----led------gnd |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9217 Location: Greensville,Ontario
|
|
Posted: Sun Oct 13, 2019 8:22 am |
|
|
Please confirm that you CAN turn on any LED a certain brightness and that the ONLY problem is the 'ALL LEDS ON' function.
Thanks
Jay |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Oct 13, 2019 8:53 am |
|
|
That is why I wanted a schematic. But his line art doesn't show what I
need. It doesn't show the polarity of the led. (which side is the cathode ?)
It doesn't show the series resistor value. His line art was a very poor
reply and is discouraging. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19481
|
|
Posted: Sun Oct 13, 2019 9:40 am |
|
|
Sterngleiter wrote: | how do i add a picture here? |
You put am image on a file sharing site, and post the link to it.
One of the free sites is easy.
I'm worried about the circuit, since it shows the LED going to ground.
This requires the outputs to be in their totem pole mode. This is the
default in the driver posted, but I wonder if this or the logic polarity
has been changed.
Other obvious 'hardware' thing is that /OE needs to be low for the
outputs to work. |
|
|
Sterngleiter
Joined: 07 Jan 2013 Posts: 90
|
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9217 Location: Greensville,Ontario
|
|
Posted: Sun Oct 13, 2019 10:24 am |
|
|
well obvious problem is no series resistors with most of the LEDs....
Please tell us you RE using hardware and NOT trying this in Proteus.
Easy test is to cut code to turn on ONE LED at a time, say 50% brightness, for 1/2 second then the next one, then the next one,.....
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19481
|
|
Posted: Sun Oct 13, 2019 12:32 pm |
|
|
Bit puzzled why you have a series resistor to the OE pin. Not wanted.
How fast are you running the I2C bus?. 10K pullups are only adequate
for 100KHz, and then only if the wires are short. 4K7 is a more sensible
value, especially if you want to go to higher speed. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9217 Location: Greensville,Ontario
|
|
Posted: Sun Oct 13, 2019 5:55 pm |
|
|
Something not known is VDD. I usually work at 5 volts when I can but most peripherals today are 3 volt devices. VDD has to be factored in when calculating the I2C pullups. My 'rule of thumb' is 4k7 for 5V, 3k3 for 3 volt. 10K is too high for either though it might, just work, sometimes, depending on board layout and other factors.
However why the LED chip works for some or most operations and not one is puzzling. Perhaps replace the chip with a new one ?
I've been thinking about this overnight and I'd probably cut code to write/read back data to all the registers of the chip to confirm where the problem might be. It makes no sense that one register/function of the device doesn't work. I'd also check the mfr (NXP ?) for any errata or problems with it.
Jay |
|
|
Sterngleiter
Joined: 07 Jan 2013 Posts: 90
|
|
Posted: Tue Oct 15, 2019 7:58 am |
|
|
Sorry my problem is Not the resistor. My problem is why can i Not turn all led on, After all off. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9217 Location: Greensville,Ontario
|
|
Posted: Tue Oct 15, 2019 8:35 am |
|
|
Please post your program that shows the problem, it'll be a lot easier to debug !
Jay |
|
|
Sterngleiter
Joined: 07 Jan 2013 Posts: 90
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19481
|
|
Posted: Tue Oct 15, 2019 9:42 am |
|
|
Yes, you are using this library, but show us _your_ code that gives
the chip setup, and calls the library functions. This is where the problems
almost certainly lie.... |
|
|
Sterngleiter
Joined: 07 Jan 2013 Posts: 90
|
|
Posted: Tue Oct 15, 2019 11:26 am |
|
|
I do not understand what you want. The library is running. I just add new function as well as described above. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9217 Location: Greensville,Ontario
|
|
Posted: Tue Oct 15, 2019 12:59 pm |
|
|
The 'library' is NOT your real program. It's just a collection of 'functions' that allow the PIC to control and access the peripheral device.
The 'program' we NEED to see is whatever code you wrote inside of
main()..
....
...
..
. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19481
|
|
Posted: Wed Oct 16, 2019 12:43 am |
|
|
A 'library', is like a set of wheels for your car. You can't 'drive' these, without
the car itself. It is this 'car' we need to see.
What is posted, won't run without processor setup at least. |
|
|
|