迪文科技论坛

 找回密码
 立即注册
搜索
楼主: cuijia

【开源】COF屏开发PWM实例

[复制链接]

15

主题

115

回帖

1910

积分

金牌会员

Rank: 6Rank: 6

积分
1910
 楼主| 发表于 2024-5-6 21:32:45 | 显示全部楼层
fyk 发表于 2024-4-30 15:11
大神 我想在while(1)中 改变PWM的精度就是频率嘛 我只要修改void pwm_init()这个函数的PWM_ACCURACY这个 ...

Write_Dgus(0x87,PWM_ACCURACY);//100khz=825.7536MHz/PWM_ACCURACY, 改这个值PWM_ACCURACY就可以改频率了。这个pwm没法中断,不能计数。
回复

使用道具 举报

1

主题

11

回帖

134

积分

注册会员

Rank: 2

积分
134
发表于 2025-7-7 17:54:33 | 显示全部楼层
Hello, how can I check if the PWM0 fill (duty cycle) change command has been executed? Which register can I check?
回复

使用道具 举报

0

主题

313

回帖

2271

积分

金牌会员

Rank: 6Rank: 6

积分
2271
发表于 2025-7-7 18:47:49 | 显示全部楼层
The address 0x92 is the address set for the duty cycle。
回复

使用道具 举报

1

主题

11

回帖

134

积分

注册会员

Rank: 2

积分
134
发表于 2025-7-7 21:14:45 | 显示全部楼层
紫狐 发表于 2025-7-7 18:47
The address 0x92 is the address set for the duty cycle。

Thank you, however, when I read from register 0x92 (Read_Dgus(0x92);), I always get a value of 0, even though the signal on the pin has a frequency of 2.5 kHz and a duty cycle of 50%. Does this register need to be read in a special way?
回复

使用道具 举报

0

主题

313

回帖

2271

积分

金牌会员

Rank: 6Rank: 6

积分
2271
发表于 2025-7-8 09:07:13 | 显示全部楼层
Sorry for the mistake, this COF screen does not have a register for reading duty cycle.
回复

使用道具 举报

1

主题

11

回帖

134

积分

注册会员

Rank: 2

积分
134
发表于 2025-7-8 13:36:22 | 显示全部楼层
紫狐 发表于 2025-7-8 09:07
Sorry for the mistake, this COF screen does not have a register for reading duty cycle.

Do you have any idea how to check whether the pulse width actually changed? I'm having an issue where it doesn't always happen, even though the change was made twice.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|迪文科技论坛 ( 京ICP备05033781号-1 )

GMT+8, 2025-8-1 01:11 , Processed in 0.134441 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表