Skip to main content
VP_it
Associate
October 9, 2019
Question

stm8s001j3 pin 6 not set output mode

  • October 9, 2019
  • 2 replies
  • 1349 views

Hi

I am using STM8S001J3 controller

on my project and I'm have some problem about it,

6 pin GPIOB 4 It doesn't work.

I don't know how to solve it.

Please help me..

//example code

GPIO_DeInit(GPIOB);

GPIO_Init(GOIOB,GPIO_PIN_ALL,GPIO_MODE_OUT_OD_HIZ_LOW);

while(1)

{

    GPIO_Write_High(PORTB,PINB4 );

     Delay(10000)// 1 sec delay

   GPIO_Write_Low(PORTB,PINB4 );

     Delay(10000)// 1 sec delay

}

I am using IAR for program development. Thanks in advance.

    This topic has been closed for replies.

    2 replies

    Associate III
    October 9, 2019

    Maybe you forgot about the external pull up resistor.

    VP_it
    VP_itAuthor
    Associate
    October 9, 2019

    Thanks