Hallo, Ich habe kleine Probleme mit der Aduc7020 Minikit. Ich möchte einenen 1:8 Multiplexer steueren. Ich habe die P1.1 , 1.2 und 1.3 GPIOs als MuX Digtal-Input verwendet. Ich kriege kein sauberes Takt-signal(alle sind gepulst), und die eingestellte Frequenz stimmt nicht mit den Port1-Ausgängen. Hier ist der Progamm(Crosswork): #include<targets/aduc7020.h> int main(void) { GP1CON = 0x00 ; // Port 1 configured as an GPIO. GP4DAT = 0x04000000; // P4.2 configured as an output.Led ON GP1DAT = 0x0E000000; // P1.1, P1.2 und P1.3 configured as an output. PLLKEY1 = 0xAA; PLLCON = 0x21; //PLL Default configuration, internal 32 kHz oscillator PLLKEY2 = 0x55; POWKEY1 = 0x01; POWCON = 0x00; //41.78MHz //CPU clock divider bits 5.22 MHz. POWKEY2 = 0xF4; IRQEN=0x04; //Enable Timer0 IRQ (normal interrupt request) while(1){ GP4DAT ^= 0x00040000; int a =0; for(a; a<=14; a+=2){ T0LD = 0x6600; //6600 --> 0,625ms 41,78MHz T0CON = 0xC0 ; // enable Timer0 ; periodic mode; prescale 1 while(T0VAL!=0){ GP1CLR = 0xE0000 ; GP1DAT ^= a << 16 ; } T0CON = 0x40 ; } } }
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.