I coped this code into setup, and kept the duty cycle at 0 for both.
I still am reading 1.9khz for both pins. Am i doing something wrong?
Im just trying to test out the freq at the moment so this is the code im using for reference:
void setup() {
DDRB |= 0x03; // PB0(pin5) and PB1(pin5) force OUTPUT
TCCR0A = 0xA1; // Use both OCR0A and OCR0B output, Phase correct PWM mode
TCCR0B = 0x01; // Prescaler not used
OCR0A = 0; // This register controls the OUTPUT of pin 5
OCR0B = 0; // This register controls the OUTPUT of pin 6
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
}
void loop() {
analogWrite(0, HIGH);
analogWrite(1, HIGH);
}