O
In order to understand this, we must first find out how the controller sets a high or low level at his conclusion. There are two ways: Push-pull and Open Drain.Push-Pull The rectangle shows the internal control device. The arrow is the power supply (plus) position, the horizontal line is the zero potential connecting point (minus, ground, GND). When you record a unit in this port register, the top key is locked when zero is the lower key. This will lead to high or low logic levels on the port.It is important to understand here that when a high-level port is placed directly into the power supply, and it is therefore important to calculate the current when the port is connected to the port of any device (e.g., light-bedding), as the port may be burnt. The maximum allowable flow is looking at your controller.Open Drain There's only one key in this mode that connects the port to the ground. The high level shall be fixed by means of an external retractor (or another device, as soon as we can see). When the key is locked, the port has a low logical level. When the key is open, a high level is set.Light connections The left drawing uses the Push-Pull mode. When you set up a logical unit. HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_SET);The light is on. When you set 0, it'll go away.Open Drain is used in the right drawing. When you set up the unit, the key will be unlocked, the flow through the lights is not flowing, the light is not burning. When you set zero, the key is locked, the current, the lights burn.The resistance of the reciprocator shall be calculated on the basis of the required current of the luminous flux and the internal resistance of the light. The doc shall not exceed the maximum port current, but if you have an excess, use another secular, or make connections with the external tranzistor.Connection with the external transcript There's plenty of connections through the transistor. Let's get a diagram here with one field transistor. The closure is connected to the micro controller ' s conclusion, and the port of the may be in any mode. Let's get a high level - the light is on fire, the low level is not on fire.