Visualizza messaggio singolo
Vecchio 31 ottobre 12, 21:48   #23 (permalink)  Top
romoloman
Adv Moderator
 
L'avatar di romoloman
 
Data registr.: 15-08-2007
Residenza: sto a Massa ma sono molto Positivo
Messaggi: 12.071
Citazione:
Originalmente inviato da cecca95 Visualizza messaggio
Di default Arduino imposta i pin 9, 10, 11 e 3 per lavorare a 488Hz, e i pin 6 e 5 a 976Hz.

per regolare la frequenza devi agire sui timer.

ciao
Attenzione a cambiare i divisori dei PWM:
Dalla documentazione di Arduino:

*
* The resulting frequency is equal to the base frequency divided by
* the given divisor:
* - Base frequencies:
* o The base frequency for pins 3, 9, 10, and 11 is 31250 Hz.
* o The base frequency for pins 5 and 6 is 62500 Hz.
* - Divisors:
* o The divisors available on pins 5, 6, 9 and 10 are: 1, 8, 64,
* 256, and 1024.
* o The divisors available on pins 3 and 11 are: 1, 8, 32, 64,
* 128, 256, and 1024.
*
* PWM frequencies are tied together in pairs of pins. If one in a
* pair is changed, the other is also changed to match:
* - Pins 5 and 6 are paired on timer0
* - Pins 9 and 10 are paired on timer1
* - Pins 3 and 11 are paired on timer2
*
* Note that this function will have side effects on anything else
* that uses timers:
* - Changes on pins 3, 5, 6, or 11 may cause the delay() and
* millis() functions to stop working. Other timing-related
* functions may also be affected.
* - Changes on pins 9 or 10 will cause the Servo library to function
* incorrectly.
__________________
Vivere in qeusto mondo e molto belo belo e vale la pena starci ma a volte in questa UNICA vita che ci apartiene posono succedere cose brute brute alora mi chiedo perche siete incazziati domani pole esere anche lultimo
Grazie "TRANQUILLO"
FAI 15766
romoloman non รจ collegato   Rispondi citando