cancel
Showing results for 
Search instead for 
Did you mean: 

Write data to port pins C1- C9

pranathi1091
Associate II
Posted on November 09, 2012 at 09:44

Hello All,

I am programming an LCD display.

I want to write some data to pins  C1-C9, interfaced to LCD parallely.

COuld anyone suggest me how this could be done

Thanks

#portc-data
1 REPLY 1
Posted on November 10, 2012 at 03:01

*((__IO uint32_t *)&GPIOC->BSRRL) = ((x & 0xFF) << 1) | ((~x & 0xFF) << (1 + 16)); // Set the 1 bits, Clear the 0 bits, QED

or

GPIOC->ODR = (GPIOC->ODR & ~(0xFF << 1)) | ((x & 0xFF) << 1);

0690X0000060MluQAE.gif

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..