We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello everyone I am trying to connect several LEDs but the tension pins are locked in 1.86 volts. The output is enabled and the pins are configured as output , then write to connect the LEDs to audition without success , I am simulating with proteus . And using a LM3S328 . Can anyone help me please .
#include <stdio.h> #include "../device/lm3s_cmsis.h" #include "../inc/hw_sysctl.h" #include "../driverlib/gpio.h" int main(void) { SYSCTL->RCGC2 |= SYSCTL_SET2_GPIOC; GPIODirModeSet(GPIO_PORTC_BASE, GPIO_PIN_0, GPIO_DIR_MODE_OUT); GPIODirModeSet(GPIO_PORTC_BASE, GPIO_PIN_1, GPIO_DIR_MODE_OUT); GPIODirModeSet(GPIO_PORTC_BASE, GPIO_PIN_2, GPIO_DIR_MODE_OUT); GPIODirModeSet(GPIO_PORTC_BASE, GPIO_PIN_3, GPIO_DIR_MODE_OUT); GPIODirModeSet(GPIO_PORTC_BASE, GPIO_PIN_4, GPIO_DIR_MODE_OUT); GPIODirModeSet(GPIO_PORTC_BASE, GPIO_PIN_5, GPIO_DIR_MODE_OUT); GPIODirModeSet(GPIO_PORTC_BASE, GPIO_PIN_6, GPIO_DIR_MODE_OUT); GPIODirModeSet(GPIO_PORTC_BASE, GPIO_PIN_7, GPIO_DIR_MODE_OUT); while (1) { GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_0, GPIO_PIN_0); GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_1, GPIO_PIN_1); GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_2, GPIO_PIN_2); GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_3, GPIO_PIN_3); GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_4, GPIO_PIN_4); GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_5, GPIO_PIN_5); GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_6, GPIO_PIN_6); GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_7, GPIO_PIN_7); } } <\pre>