PCA9685 Why not work?
-
- Posts: 85
- http://meble-kuchenne.info.pl
- Joined: Thu Jan 07, 2021 11:28 am
- Has thanked: 3 times
- Been thanked: 4 times
-
- Matrix Staff
- Posts: 1756
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 446 times
- Been thanked: 606 times
Re: PCA9685 Why not work?
Hello,
Please can you try this program instead.
If you're still getting nothing then I suggest doing the 1 second flasher test using a LED as documented here to ensure your microcontroller is programmed and running correctly.
https://www.flowcode.co.uk/wiki/index.p ... ED_flasher
Please can you try this program instead.
If you're still getting nothing then I suggest doing the 1 second flasher test using a LED as documented here to ensure your microcontroller is programmed and running correctly.
https://www.flowcode.co.uk/wiki/index.p ... ED_flasher
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Valued Contributor
- Posts: 1178
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 287 times
- Been thanked: 417 times
Re: PCA9685 Why not work?
Hi
You appear to have posted the same question in the v8 forum (which I answered) before posting in v9.
Have you done as Ben suggested and tried a one-second flasher? You cannot overestimate the importance of this test to ensure settings etc are correct.
Assuming the flash test works then
Check connections from microcontroller to the module. You only need four connections, Ground (0v), SDA, SCL and +5v.
Check module address. You are using default of 0x40 so make sure there are no solder splashes across any address pads.
Check power to the module. You need to provide Ground (0v) and +5v from a supply to the terminal block on the module.
If controlling an LED then your Output will be PWM and GND of whatever channel you selected. Your code has channel 3 as output so that will be the fourth output from left (channels 0 - 15)
Check polarity of your output LED and remember that the maximum output draw per pin is 25mA.
Regards
You appear to have posted the same question in the v8 forum (which I answered) before posting in v9.
Have you done as Ben suggested and tried a one-second flasher? You cannot overestimate the importance of this test to ensure settings etc are correct.
Assuming the flash test works then
Check connections from microcontroller to the module. You only need four connections, Ground (0v), SDA, SCL and +5v.
Check module address. You are using default of 0x40 so make sure there are no solder splashes across any address pads.
Check power to the module. You need to provide Ground (0v) and +5v from a supply to the terminal block on the module.
If controlling an LED then your Output will be PWM and GND of whatever channel you selected. Your code has channel 3 as output so that will be the fourth output from left (channels 0 - 15)
Check polarity of your output LED and remember that the maximum output draw per pin is 25mA.
Regards
-
- Valued Contributor
- Posts: 1178
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 287 times
- Been thanked: 417 times
Re: PCA9685 Why not work?
Hi
I have just verified that the code I provided in another post, and that of Ben's work just fine. If you still cannot get your code to work you will need to provide more specific details, especially with regards to the results of the "flash test" and connections.
Regards
I have just verified that the code I provided in another post, and that of Ben's work just fine. If you still cannot get your code to work you will need to provide more specific details, especially with regards to the results of the "flash test" and connections.
Regards
-
- Valued Contributor
- Posts: 1178
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 287 times
- Been thanked: 417 times
Re: PCA9685 Why not work?
Hi
I do not use Proteus so cannot help with your simulation.
However the code I provided in your original post (v8 forum) has been verified to work in hardware.
Regards
I do not use Proteus so cannot help with your simulation.
However the code I provided in your original post (v8 forum) has been verified to work in hardware.
Regards