Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino mega 2650 no spwm #13

Open
andrejmz opened this issue Apr 23, 2021 · 3 comments
Open

Arduino mega 2650 no spwm #13

andrejmz opened this issue Apr 23, 2021 · 3 comments

Comments

@andrejmz
Copy link

Hi

I've tested sPWM_variable_freqv5.ino on an arduino mega 2650 and i am just getting a regular square wave instead of a spwm
Can you help ?

Best regards

@Irev-Dev
Copy link
Owner

What pins are you using, because the trigger will be a square way, but the output-compare pins should be the spwm.

@andrejmz
Copy link
Author

Hi

I've checked every pin from 2 to 13. I just have the trigger, no spwm.
I am now testing with sPWM_Basic.ino with no modification.

Best regarsd.

@ShaoHao-Chen
Copy link

Hi

I've checked every pin from 2 to 13. I just have the trigger, no spwm. I am now testing with sPWM_Basic.ino with no modification.

Best regarsd.

change some code

DDRB = 0b01100110; // Set PB1 and PB2 as outputs.

The chip between uno and mega is different.
You should read the each datasheet to compare them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants