Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to READ data from input into STM32

Status
Not open for further replies.

hannachifaten

Member level 2
Member level 2
Joined
May 1, 2013
Messages
44
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,769
Hello every body ,
i neeeed help :/
my aim is to read a bit data from input pins and after that i will get this data to output such led , i want to try my leds
i configure my GPIO INPUT logic and out put push pull for led , but the code is seem to be wrong i 'didt find what is the problemme
i just need to write code to interface logic pin ; this is my code *
Code:
	int main( void) {
		/* initialize the GPIO pins we need  */
  init_GPIO();
  	  
  while (1) {	  
  				 
	 
  	if ((GPIO_ReadInputDataBit(GPIOD, GPIO_Pin_0) == 1) )
 	{
          GPIOI->BSRRL = GPIO_Pin_10 ;
	}
    else 
 {
       GPIOI->BSRRH = GPIO_Pin_10 ;
    } 

	if ((GPIO_ReadInputDataBit(GPIOD, GPIO_Pin_1) == 0))
 	{
    GPIOI->BSRRL = GPIO_Pin_11;
	}
     else 
  	   {
    GPIOI->BSRRH = GPIO_Pin_11 ;
  	 }
	   
}
   }


pleaaaase i need your suggestions and thank you in advance
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top