[gnea/grbl-Mega Issue#66] PWM Speeds

未分类 bolang 3个月前 (10-15) 24次浏览

Issue #66 | 状态: 已关闭 | 作者: readymotion | 创建时间: 2018-05-31


On the uno we can pick the kHz we want for our PWM timers
62.5
7.8
1.96
.98

How can i set the mega to run at 62.5 kHz PWM?
Thanks,
Ryan


评论 (2)

#1 – chamnit 于 2018-05-31

I think all you have to do is change the prescalars, like the 328p version does. I’m unsure what the macros are for it. They are available in the data sheet though.


#2 – readymotion 于 2018-05-31

So this the UNO’s
#define SPINDLETCCRAINIT_MASK ((1<TCCRBINIT_MASK (1< 62.5kHz

Mega’s
// 1/8 Prescaler, 16-bit Fast PWM mode
#define SPINDLETCCRAINIT_MASK ((1<TCCRBINIT_MASK ((1<


原始Issue: https://github.com/gnea/grbl-Mega/issues/66

喜欢 (0)