This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

External Pins assignment for LED

Hi, i have no idea about how to assign external pins to show the blinking. I need 2 pins input to show the external LED. STM32f407 microprocessor . I am doing a Boolean program that has 4 inputs and 2 outputs. I have to show this using 2 external LED's. I do not know how to assign for external LED to blink. And do i need a code for this one or i can just connect external LED in to the Board to get the outputs? please help me..

  • You do appear to have come to this woefully unprepared.

    Yes, you'll have to configure the inputs and outputs. You'll either have to blink the outputs manually, or connect them to a timer output channel.

    Suggest you get some manuals for the chips and boards you plan to use, and read them, thoroughly. Get the firmware libraries for the ST chip, and review all the example code.

  • configure the port pin (to which led is connected) as output pin.

    To turn on led, make that port pin high (if led anode is connected to port pin via a series resistor _common cathode configuration_) or make port pin low (if led cathode is connected to port pin _common anode configuration_).

    Give some delay (in milli seconds)

    now to turn led off, do vice versa (if portpin = 1 -> turns led on, then portpin = 0 will turn led off).

    To configure port pins as output, turn it high & low, read the example codes that accompany your development board or search on web.