When my program is running the D4 bit (C4 of the pic) is being held high.
So when i ask to print a "C" i get an "S" ect. The lcd is intilizing properly (or seems to be) and the other bits look fine. When the program does a read from the lcd the C4 bit follows as a input but when it configures as an out put (tris c) it goes high and stays high.
I am using the LCD driver configured for port C. The pic is running at 31KHz (int osc) and my compiler is version 3.228.
I have run the code on Mtlabs sim and it looks like it should work.
Any help would be greatly appr.
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Fri Nov 11, 2005 6:06 pm
In your version of the compiler, CCS has some incorrect initialization
code which turns on comparator #2 by mistake. To fix this problem,
you need to add the line of code shown below in bold:
Quote:
void main()
{
setup_comparator(NC_NC_NC_NC); // Turn off comparators
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum