Not applicable
Oct 20, 2015
08:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 20, 2015
08:04 AM
After P1_5_reset() why LED is ON and after P1_5_set() why LED is off? On my eval board (xmc1100) in the debugger
#include
#include "XMC1100.h"
#include "GPIO.h"
int main(void)
{
P1_5_set_mode(OUTPUT_PP_GP);
P1_5_reset();
P1_5_set();
while(1);
}
- Tags:
- IFX
3 Replies
Oct 20, 2015
09:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 20, 2015
09:39 AM
Hi jsmith65,
The GPIO pin is a low side switch, so when it is reset (0) then current flows through the LED so it is on. When the GPIO is set (1), then no current flows through the LED, so it is off. The LED schematic is shown in the XMC100 Boot Kit User' Guide.
Best,
Rick Nardone
The GPIO pin is a low side switch, so when it is reset (0) then current flows through the LED so it is on. When the GPIO is set (1), then no current flows through the LED, so it is off. The LED schematic is shown in the XMC100 Boot Kit User' Guide.
Best,
Rick Nardone
Not applicable
Oct 20, 2015
09:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 20, 2015
09:15 PM
What is the purpose of the internal pullups? (pad on the port)
Oct 21, 2015
09:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 21, 2015
09:01 AM
Hi jsmith65,
Internal pull-up resistors can be used on GPIO pins that are set as inputs. If configured, the GPIO input would be internally connected (pulled-up) to VDD through a 20KOhm - 50KOhm resistor.
The XMC MCUs also offer the option of internal pull-down resistors that can be used on GPIO pns that are configured as inputs. The pull-down resistor would internally connect the GPIO input to VSS (GND) through a 20KOhm - 50KOhm resistor.
The internal pull-up an pull-down resistors can be used to make sure a GPIO input is not floating.
You can find additional details about the XMC General Purpose I/O (GPIO) in the Reference Manual for the specific XMC Microcontroller you are working with.
Best,
Rick
Internal pull-up resistors can be used on GPIO pins that are set as inputs. If configured, the GPIO input would be internally connected (pulled-up) to VDD through a 20KOhm - 50KOhm resistor.
The XMC MCUs also offer the option of internal pull-down resistors that can be used on GPIO pns that are configured as inputs. The pull-down resistor would internally connect the GPIO input to VSS (GND) through a 20KOhm - 50KOhm resistor.
The internal pull-up an pull-down resistors can be used to make sure a GPIO input is not floating.
You can find additional details about the XMC General Purpose I/O (GPIO) in the Reference Manual for the specific XMC Microcontroller you are working with.
Best,
Rick