2023-09-28 01:41 AM
I am trying to communicate 2 STM32F103C6. My task is to display UART receiving data on LCD(LM016L).
Also, my other task is to display interrupt data on LCD. Both should be worked on at the same time. ie, Whenever an interrupt happens it should be printed on LCD.
In both tasks, my LCD is not displaying data.
2023-09-28 01:47 AM
Can anybody help me?
2023-09-28 03:11 AM - edited 2023-09-28 03:12 AM
You need to upload your codes for help. And it would be good if you share your pin connection diagram as well.
2023-09-30 07:07 AM
2023-10-01 09:20 AM
Hello jissa, depending on your level expertise, this can be simple or hard.
Please find below a resource that shows you how to interface your LCD.
https://deepbluembedded.com/stm32-lcd-16x2-tutorial-library-alphanumeric-lcd-16x2-interfacing
2023-10-01 11:35 PM
@Johi, Yes, I'm a beginner in doing this task. I don't think the problem is in the LCD interfacing. I have been facing issues while interfacing "UART and LCD" and "interrupt and LCD". Can anybody suggest any more ideas?
2023-10-02 01:32 AM
Hi Jissa,
I suggest you break your project into 2 stages that you can try and work independently before bringing them together.
Task 1) Can you get a defined text string or character displaying on the LCD e.g. "Hello World", and can you then update one or all of the characters after a HAL delay (for example).
Task 2) Can you transmit from one STM32 using HAL_UART_Transmit() function and receive it using HAL_UART_Receive(). Both of these functions are blocking which means that the code will sit and wait until the process has finished or timed out.
Once you can do both of these steps then I suggest trying it all together.
I wouldn't move onto the _IT variants until you have proved you can do this. For HAL_UART_Transmit_IT() this is essentially the same as HAL_UART_Transmit() except an interrupt will trigger after the transmit has occured and it is non blocking. I don't think you require this function.
Finally looking at your code for LCD update on receive, you seem to have the LCD update command outside of the flag check, I might suggest you move it to within flag, to only update when you get new data.
Hope this helps.
2023-10-05 05:14 AM
Thank you for your response. I got the output. It was a fundamental mistake. I declared an array for receiving value but didn't put it in the loop to read and display on the screen.
Thank you all.