CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PCA9685
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Sterngleiter



Joined: 07 Jan 2013
Posts: 90

View user's profile Send private message

PostPosted: Sun Oct 13, 2019 5:32 am     Reply with quote

pca9685_out-led0------[RV]----led------gnd
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Oct 13, 2019 8:22 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Oct 13, 2019 8:53 am     Reply with quote

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: 19195

View user's profile Send private message

PostPosted: Sun Oct 13, 2019 9:40 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Oct 13, 2019 9:51 am     Reply with quote

here the link to image
https://www.dropbox.com/s/8az8mo0732wjjas/Unbenannt.PNG?dl=0
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Oct 13, 2019 10:24 am     Reply with quote

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: 19195

View user's profile Send private message

PostPosted: Sun Oct 13, 2019 12:32 pm     Reply with quote

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: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Oct 13, 2019 5:55 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Oct 15, 2019 7:58 am     Reply with quote

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: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Oct 15, 2019 8:35 am     Reply with quote

Please post your program that shows the problem, it'll be a lot easier to debug !
Jay
Sterngleiter



Joined: 07 Jan 2013
Posts: 90

View user's profile Send private message

PostPosted: Tue Oct 15, 2019 8:38 am     Reply with quote

I use the library link is indicated at the beginning of the discussion
http://www.ccsinfo.com/forum/viewtopic.php?p=226028#226028
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Tue Oct 15, 2019 9:42 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Oct 15, 2019 11:26 am     Reply with quote

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: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Oct 15, 2019 12:59 pm     Reply with quote

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: 19195

View user's profile Send private message

PostPosted: Wed Oct 16, 2019 12:43 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group