cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO QUESTION2

xtian
Associate II
Posted on January 21, 2013 at 09:27

Hi guyz,

Thank you for your continous support,

heres my problem now

 while (1)

  {

    USART_SendData(USART1, 65);

    if (GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_6)==1)

    {

      //GPIOB->IDR >> 8;

      USART_SendData(USART1, GPIOB->IDR>>0 & 0x00FF);

    }

  }

 }

I am trying to get data from port 0-7 only, from the serial out I am expecting it to

be ''B'' the one appearing from the portb is  ''R''

be ''C'' the one appearing from the portb is  ''S''

be ''A'' the one appearing from the portb is ''Q''

my mode is internal pulldown.. but il check Ill manually ground unused pins
3 REPLIES 3
xtian
Associate II
Posted on January 21, 2013 at 09:33

there eventhough setuped us internal puldown it still needs proper pulldown resistors... solved. sorry for disturbance

Posted on January 21, 2013 at 14:06

You need to wait until the USART signals TXE (Transmit Empty) before shoveling more data out. The holding register can take a single byte, and transmission will be slow relative to a CPU running in the high MHz.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
xtian
Associate II
Posted on January 23, 2013 at 07:00

hmmm does it automatically holds data? so it buffere automatically? as you have said up to one byte?