2020-12-10 12:31 AM
i have positive and negative voltage in the range of 1000v.i connected one LED to indicate minus voltage.
led is connected to PD1 of stm8s003f3 controller
i put this condition....
#define SevenSegmentDisplays_GPIOD_ODR_ResetValue 0x7E
#define SevenSegmentDisplays_GPIOD_DDR_ResetValue 0x7E
#define SevenSegmentDisplays_GPIOD_CR1_ResetValue 0x7E
#define SevenSegmentDisplays_GPIOC_CR2_ResetValue 0x00
(ChannelVoltage >= 0)
{
GPIO_WriteLow(GPIOD,GPIO_PIN_1);
}
else
{
GPIO_WriteHigh(GPIOD,GPIO_PIN_1);
}
2020-12-10 08:00 PM
hi MAnsa,
First toggle the PD1 pin and then check the hardware connection
I hope it's helps to you
2020-12-10 08:20 PM
already checked n yeah it worked..