V
8  
Tags
There are no tags for this page.
Attachments
Dobrica Pavlinušić's random unstructured stuff
PCA9685
PCA9685.pdf

PCA9685.jpg

16-channel, 12-bit PWM Fm+ I 2 C-bus LED controller

dpavlin@cubieboard:~$ zgrep 9685 /proc/config.gz 
CONFIG_PWM_PCA9685=m

# on armbian this requires kernel recompile

root@cubieboard:~# i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: UU UU -- UU -- -- -- -- UU -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: 70 -- -- -- -- -- -- --                         

root@cubieboard:~# echo pca9685 0x70 > /sys/bus/i2c/devices/i2c-2/new_device 
[Tue Jun 25 19:59:58 2019] i2c i2c-2: new_device: Instantiated device pca9685 at 0x70

root@cubieboard:/sys/devices/platform/soc/1c2b000.i2c/i2c-2/2-0070/pwm/pwmchip0# echo 0 > export

# Default period_ns = 1/200 Hz
root@cubieboard:/sys/devices/platform/soc/1c2b000.i2c/i2c-2/2-0070/pwm/pwmchip0/pwm0# echo 5000000 > period 
root@cubieboard:/sys/devices/platform/soc/1c2b000.i2c/i2c-2/2-0070/pwm/pwmchip0/pwm0# cat period 
5000000
root@cubieboard:/sys/devices/platform/soc/1c2b000.i2c/i2c-2/2-0070/pwm/pwmchip0/pwm0# cat duty_cycle 
0

# move servo

root@cubieboard:/sys/devices/platform/soc/1c2b000.i2c/i2c-2/2-0070/pwm/pwmchip0/pwm0# echo 2000000 > duty_cycle 
root@cubieboard:/sys/devices/platform/soc/1c2b000.i2c/i2c-2/2-0070/pwm/pwmchip0/pwm0# echo 1000000 > duty_cycle 

sg90 servo motor

root@cubieboard:/sys/devices/platform/soc/1c2b000.i2c/i2c-2/2-0070/pwm/pwmchip0/pwm0# echo 20000000 > period # 50Hz

root@cubieboard:/sys/devices/platform/soc/1c2b000.i2c/i2c-2/2-0070/pwm/pwmchip0/pwm0# echo 1000000 > duty_cycle # min?

root@cubieboard:/sys/devices/platform/soc/1c2b000.i2c/i2c-2/2-0070/pwm/pwmchip0/pwm0# echo 3000000 > duty_cycle # max?




 

Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

 
 
 
File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

 
 
 
Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.

Tag: 

Suggestions: