This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Led Control with c6748

Hi,

I installed starterware and did some modifications on gpio example. I want to GPIO8[10] pin as high and GPIO8[12] as low. If i understand correctly from the shematics, these pins are in J15 pin, J15.20 and J15.16.

I could not find what is wrong with my code.

I want to connect a led between these pins.
Here is my code:
Thank you very much.


#include "gpio.h"
#include "psc.h"

#include "soc_C6748.h"
#include "lcdkC6748.h"

#define PINMUX0_VALUE 0x00000000
#define PINMUX1_VALUE 0x00000000
#define PINMUX2_VALUE 0x00000000
#define PINMUX3_VALUE 0x00000000
#define PINMUX4_VALUE 0x00000000
#define PINMUX5_VALUE 0x00000000
#define PINMUX6_VALUE 0x00000000
#define PINMUX7_VALUE 0x00000000
#define PINMUX8_VALUE 0x00000000
#define PINMUX9_VALUE 0x00000000
#define PINMUX10_VALUE 0x00000000
#define PINMUX11_VALUE 0x00000000
#define PINMUX12_VALUE 0x00000000
#define PINMUX13_VALUE 0x00000000
#define PINMUX14_VALUE 0x00000000
#define PINMUX15_VALUE 0x00000000
#define PINMUX16_VALUE 0x00000000
#define PINMUX17_VALUE 0x00000000
#define PINMUX18_VALUE 0x80800000
#define PINMUX19_VALUE 0x00000000

/****************************************************************************/
/* LOCAL FUNCTION PROTOTYPES */
/****************************************************************************/
//static void Delay(volatile unsigned int delay);

/****************************************************************************/
/* GLOBAL VARIABLES */
/****************************************************************************/

/****************************************************************************/
/* LOCAL FUNCTION DEFINITIONS */
/****************************************************************************/

int main(void)
{


/* The Local PSC number for GPIO is 3. GPIO belongs to PSC1 module.*/
PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_GPIO, PSC_POWERDOMAIN_ALWAYS_ON,
PSC_MDCTL_NEXT_ENABLE);

/* Pin Multiplexing of pin 12 of GPIO Bank 6.*/
//GPIOBank6Pin12PinMuxSetup();

GPIODirModeSet(SOC_GPIO_0_REGS, 139, GPIO_DIR_OUTPUT);
GPIODirModeSet(SOC_GPIO_0_REGS, 141, GPIO_DIR_OUTPUT);

//while(1)
//{
//GPIOPinWrite(SOC_GPIO_0_REGS, 109, GPIO_PIN_LOW);

//Delay(1000000);

GPIOPinWrite(SOC_GPIO_0_REGS, 139, GPIO_PIN_HIGH);
GPIOPinWrite(SOC_GPIO_0_REGS, 141, GPIO_PIN_LOW);

//Delay(1000000);
//}


}