Hi
I am trying to put a 38khx frequency on PD pin 3 of a Xmega128D3. I am using 32Mhz internal clock. The code is below. What I am doing wrong?
Thank You.
Charles
Here is the code that initialize it:
//================================================================================================== void init_IR_38khz(void) //================================================================================================== { PORTD.DIR = 0x01; //Freq configured as output TCD0.CTRLB = 0x81; //Enable channel D & set div/1 TCD0.CCDH = 0x01; //Count msb = 420 TCD0.CCDL = 0xA4; //Count lsb TCD0.CTRLA = 0x01; //Input clock select }
What