Recently I try to code display LCD on mikroC. However when I run proteus simulation and it said like the thread above.
Can you show me what problem I am encountering.
Thanks in advance and here is the code
***
You expected a problem with the software.
But you posted only a part of your software.
We don´t know how all the LCD functions look like, nor whether (and which) LCD library you use.
So if there was a problem in these functions .. we could not find them.
Next time please post your complete software... so we can better help you.
****
Btw: an infinite loop without delay to write to the display may probably result in display artefacts. But I understand here it is for testing purpose only.
From my experience: updating a display more than 3 times per second usually results in bad redability.
Did you read the PIC datasheet section how to use the watchdog?
I´m not familiar with PIC, but as FvM states you usually have to clear the watchdog counter regurarily in your software.
I miss this.
****
From my experience:
In my programs I often use continously running - important - interrupts.
In this case I don´t only rely that the main loop is running properly, but the interrupt(s) as well.
Thus I set a global flag in the ISR. I check this flag in main loop and {clear the wtachdog counter and clear the flag) in main loop.
This way ... I can be sure that the main loop is running properly as well as the interrupt(s) is running properly.
***
You expected a problem with the software.
But you posted only a part of your software.
We don´t know how all the LCD functions look like, nor whether (and which) LCD library you use.
So if there was a problem in these functions .. we could not find them.
Next time please post your complete software... so we can better help you.
****
Btw: an infinite loop without delay to write to the display may probably result in display artefacts. But I understand here it is for testing purpose only.
From my experience: updating a display more than 3 times per second usually results in bad redability.
Klaus
--- Updated ---
Added:
Did you read the PIC datasheet section how to use the watchdog?
I´m not familiar with PIC, but as FvM states you usually have to clear the watchdog counter regurarily in your software.
I miss this.
****
From my experience:
In my programs I often use continously running - important - interrupts.
In this case I don´t only rely that the main loop is running properly, but the interrupt(s) as well.
Thus I set a global flag in the ISR. I check this flag in main loop and {clear the wtachdog counter and clear the flag) in main loop.
This way ... I can be sure that the main loop is running properly as well as the interrupt(s) is running properly.
Sorry I don't really understand you, however about the watchdog timer it was my mistake instead of f887 I chose f877 that's why I encountered that problem. After I changed the MCU name it's not the problem anymore. I follow this tutorial however the LCD doesn't show anything. Here is the link of the tutorial https://microcontrollerslab.com/lcd-interfacing-pic16f877a-microcontroller/
And this is their code. I'm really appreciate your supports
You can change basic project settings in the Project Settings window. You canchange chip, and oscillator frequency. Any change in the Project Setting Windowaffects currently active project only, so in case more than one project is open, youhave to ensure that exactly the desired project is set as active one in the ProjectManager. Also, you can change configuration bits of the selected chip in the EditProject window.