amc6821为什么没有波形产生?
环境:dm8168+dvrrdk4.0.0.2
下面是上电默认的寄存器配置,没有加载驱动
root@HDMTerm:~# i2cdump -f -y 2 0x4c
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: d4 3d 00 00 08 00 00 00 00 00 80 80 00 00 00 00 ?=..?.....??....
10: ff ff 00 00 3c 00 46 00 50 00 64 50 00 69 ff ff ....<.F.P.dP.i..
20: 1d 55 55 52 41 61 00 00 00 00 00 00 00 00 00 00 ?UURAa..........
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 21 49 83 .............!I?
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: d4 3d 00 00 08 00 00 00 00 00 80 80 00 00 00 00 ?=..?.....??....
90: ff ff 00 00 3c 00 46 00 50 00 64 50 00 69 ff ff ....<.F.P.dP.i..
a0: 1d 55 55 52 41 61 00 00 00 00 00 00 00 00 00 00 ?UURAa..........
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 21 49 83 .............!I?
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
------------------------------------------
1.设置Address 0x00的bit6(FDRC1)-bit5(FDRC0)=00 和bit3(PWMINV)=0
2.设置Address 0x01的bit0(PWM-EN)=1 开启使能
3.设置Address 0x22(DCY (Duty Cycle)=0x88(随便一个值)
i2cset -f -y 2 0x4c 0x00 0x94 //Software DCY control
i2cset -f -y 2 0x4c 0x22 0x88 //ducy cycle
修改后
root@HDMTerm:~# i2cdump -f -y 2 0x4c
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 94 3d 00 00 08 00 00 00 00 00 80 80 00 00 00 00 ?=..?.....??....
10: ff ff 00 00 3c 00 46 00 50 00 64 50 00 69 ff ff ....<.F.P.dP.i..
20: 1d 55 88 52 41 61 00 00 00 00 00 00 00 00 00 00 ?U?RAa..........
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 21 49 83 .............!I?
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 94 3d 00 00 08 00 00 00 00 00 80 80 00 00 00 00 ?=..?.....??....
90: ff ff 00 00 3c 00 46 00 50 00 64 50 00 69 ff ff ....<.F.P.dP.i..
a0: 1d 55 88 52 41 61 00 00 00 00 00 00 00 00 00 00 ?U?RAa..........
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 21 49 83 .............!I?
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
root@HDMTerm:~#
用示波器测量amc6821芯片PWM-OUT的脚,为什么一直还是低电平,现在设置成DCY模式应该是pwm输出才对,
为什么一直是低电平?
如果设置Address 0x00的bit3(PWMINV)=1
i2cset -f -y 2 0x4c 0x00 0x9C
amc6821芯片PWM-OUT的脚就变为高电平,证明芯片是可以正常工作的,哪里的寄存器是不是没有配置好,谢谢!
您好,我想知道最后,你是怎么解决这个问题的。我跟你遇到了一样的情况。谢谢。