cancel
Showing results for 
Search instead for 
Did you mean: 

Hii I want to turn ON LED

MAnsa.1
Associate II

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);

 }

2 REPLIES 2
srikanth
Associate III

hi MAnsa,

First toggle the PD1 pin and then check the hardware connection

I hope it's helps to you

already checked n yeah it worked..