AnsweredAssumed Answered

GPIO Eval-ADuC7061MK Kit.

Question asked by Dongtaurus on Jan 7, 2018
Latest reply on Mar 2, 2018 by OliverSedlacek

Help me!

I have Eval-ADuC7061MK Kit.

I try to make simple blinking LED at P1.1, but the Kit does not work.

Could any body help me this?

Thank you so much!!!!!

Code:

Eval-ADuC7061MK

// Bit Definitions
#define BIT0 0x01
#define BIT1 0x02
#define BIT2 0x04
#define BIT3 0x08
#define BIT4 0x10
#define BIT5 0x20
#define BIT6 0x40
#define BIT7 0x80
#define BIT8 0x100
#define BIT9 0x200
#define BIT10 0x400
#define BIT11 0x800
#define BIT12 0x1000
#define BIT13 0x2000
#define BIT14 0x4000
#define BIT15 0x8000
#define BIT16 0x10000
#define BIT17 0x20000
#define BIT21 0x200000
#define BIT22 0x400000
#define BIT24 0x1000000
#define BIT25 0x2000000
#define BIT26 0x4000000
#define BIT30 0x40000000

 

#include<aduc7061.h>

void DELAY()
{
unsigned long int i;
for(i=0;i<25000000;i++);

}


int main(void)
{
POWKEY1 = 0x1;
POWCON0 = 0x78; // Set core to max CPU speed of 10.24Mhz
POWKEY2 = 0xF4;

GP1CON = 0x00000000;
GP1PAR = 0x00000000;
GP1DAT = 0xFFFF0000;

while(1)
{
GP1SET = BIT17; // Configure P1.1 as an output
DELAY();
GP1CLR = BIT17; // Configure P1.1 as an output
DELAY();
}
}

Outcomes