SLdt 221113 Disclaimer: None. Sue me. Assembler: avrasm2 uC-Forum: "AVR128DB28: TCB0 liefert kein Signal an PA2" https://www.mikrocontroller.net/topic/529706#new TCB im 'Periodic Interrupt Mode' liefert kein Ausgangssignal: erzeugen per CCL AVRŽ DB Family: AVR128DA28, AVR128DB28, AVR128DB48 megaAVRŽ 0-series: ATmega4809 ... ... ... ;****************************************************** ; Beispiel: Systemtakt/16000 auf A2: sbi VPORTA_DIR,2 putiw TCB0_CCMP,4000 -1 puti TCB0_CTRLB,0b0_0_0_0_0_000 ; Periodic Interrupt Mode puti TCB0_CTRLA,0b0_0_0_0_001_1 ; CLK_PER/2, enable puti EVSYS_CHANNEL1,$A0 ; TCB0.CAPT ;#define C_D_FF #ifdef C_D_FF puti CCL_SEQCTRL0,0b0000_0001 ; D flip-flop puti CCL_LUT0CTRLB,0b0000_0001 ; Masked input, Feedback puti CCL_LUT1CTRLB,0b0000_0011 ; Masked input, Event A puti CCL_TRUTH0,0b00000001 ; invert feedback puti CCL_TRUTH1,0b00000010 puti CCL_LUT0CTRLA,0b0_0_00_000_1 ; enable puti CCL_LUT1CTRLA,0b0_0_00_000_1 ; enable puti CCL_CTRLA,1 ; enable puti EVSYS_USERCCLLUT1A,1 +1 #else puti CCL_SEQCTRL0,0b0000_0010 ; JK flip-flop puti CCL_LUT0CTRLB,0b0000_0011 ; Masked input, Event A puti CCL_LUT1CTRLB,0b0000_0011 ; Masked input, Event A puti CCL_TRUTH0,0b00000010 puti CCL_TRUTH1,0b00000010 puti CCL_LUT0CTRLA,0b0_0_00_000_1 ; enable puti CCL_LUT1CTRLA,0b0_0_00_000_1 ; enable puti CCL_CTRLA,1 ; enable puti EVSYS_USERCCLLUT0A,1 +1 puti EVSYS_USERCCLLUT1A,1 +1 #endif puti EVSYS_CHANNEL0,$10 ; CCL.LUT0 #ifdef __AVR128Dx__ puti EVSYS_USEREVSYSEVOUTA,0 +1 #else puti EVSYS_USEREVOUTA,0 +1 #endif main_loop: rjmp main_loop ;*******************************************************