Loading...
Pages: [1]   Go Down
Author Topic: Does changing PWM Frequency affect Serial?  (Read 355 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey. Two main questions.

If I increase the PWM frequency, noise on nearby wires should reduce? I'm running a twisted pair carrying composite video next to my power cable running PWM, and at around 40% duty cycle, the picture gets so corrupted that it's unviewable. Would increasing PWM frequency help?

I've read the following thing.
http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM

As far as I know, Serial is also dependent upon Timer0. I'm only changing the prescaler bit, so Serial shouldn't be affected whatever I do to the prescaler?

Cheers.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 299
Posts: 26031
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Would increasing PWM frequency help?
No.

Quote
I'm only changing the prescaler bit, so Serial shouldn't be affected whatever I do to the prescaler?
Why not, it is a prescaler if affects everything that follows it.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, to be honest, I thought Serial drew it's clock directly from the main 16MHz crystal. There's also this post by RuggedCircuits

http://arduino.cc/forum/index.php?topic=96479.0 (2nd Post)

I was under the impression that changing timer0 only changed the delay() and millis() functions.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey. Two main questions.

If I increase the PWM frequency, noise on nearby wires should reduce? I'm running a twisted pair carrying composite video next to my power cable running PWM, and at around 40% duty cycle, the picture gets so corrupted that it's unviewable. Would increasing PWM frequency help?

I guess you are assuming that there is a "coupling" of sorts between the pair carrying the PWM signal, and the pair carrying the video...what Category cable are you using?

If you are using good quality CAT-5 or even CAT-6, I think this should not be the case....but if it is, then I think you should use the twisted cable to carry say the digital signal, and maybe break out your video signal to a good quality shielded cable....

this might resolve your issue... varying the frequency will have an effect on the coupling, but if you really have this much interference, I do not think it will help much...

Logged

0
Offline Offline
Tesla Member
***
Karma: 76
Posts: 6852
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Lets be clear, do we mean the hardware serial or some software serial library?  Hardware serial is self-contained circuitry, it doesn't share with anything else and has its own baud-rate prescaler register.
Logged

Pages: [1]   Go Up
Print
 
Jump to: