View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Feb 13, 2007 7:52 pm |
|
|
I'm going to wait until I get my new board later this week. I will then
test it and post the results. I'm not going to post anything before that. |
|
|
mindstorm88
Joined: 06 Dec 2006 Posts: 102 Location: Montreal , Canada
|
|
Posted: Sun Feb 18, 2007 9:12 am |
|
|
Hello PCM , on friday i received my lcd replacement or should i say a complete picdem2 replacement from Microchip, so before i send back the suspected defective one , i would like to confirm that it is bad!! , is it possible for you to send me by email the recommendation you got from ocular ?? so this way they won't be posted before your own testing !!
Thanks |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Feb 18, 2007 9:25 am |
|
|
There are two problems.
I ordered one of the new PicDem2-Plus boards from Digikey and it
arrived last Thursday. But when I opened the package I discovered
they had sent me the old-style board (the non "Rohs update" type).
I already have two of those. So I sent the new one back on an RMA
the same day. I 've emailed Digikey to ask if they're going to send
me the Rohs version. No reply yet.
After that happened, I decided to spend some time studying the sample
driver that Ocular tech support gave me. But I found a bug.
Their status routine doesn't return the proper value of the status byte
due to a bug in the way they combine the upper and lower nybbles.
Their routine always returns 0 or 1. So when they test the top bit
for status, it's always "not busy". The execution time of the code
in the status routines probably adds up to about 40 usec with a 4 MHz
crystal, so effectively their driver is doing a fixed delay for "busy".
That's probably why it works. I emailed Ocular about this on Friday
morning but I haven't received a response yet. |
|
|
mindstorm88
Joined: 06 Dec 2006 Posts: 102 Location: Montreal , Canada
|
|
Posted: Tue Feb 20, 2007 11:37 am |
|
|
Ok , some results !!! new replacement board has exactely same behavior as the other one !!! so the problem is in the lcd design i guess , timing seem to be very sensitive , i tried another program and on power up diplay is missing few first characters , does the same just with a mclr !!!
i hope PCM you'll get yours soon !!! |
|
|
mindstorm88
Joined: 06 Dec 2006 Posts: 102 Location: Montreal , Canada
|
|
Posted: Wed Feb 21, 2007 11:19 am |
|
|
HI PCM , i did add a 5ms delay at the end of the lcd_init() , result no more missing character at power up , this display seems to be slower than standard !!! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Feb 27, 2007 5:51 pm |
|
|
I tried to order the new "Rohs Update" version of the PicDem2-Plus
board from Microchip. They sent the board, but it was the OLD style
board. I already have two of those. I had to RMA it back.
So that's twice now. Neither Digikey or Microchip can supply the
new Rohs board.
Furthermore, I emailed the tech support guy at Ocular LCD and
reminded him to test his LCD driver software in 4-bit mode, with
the revisions that I recommended. He said he would try to do it,
but it's been several days now and no reply.
I am giving up. I can't get the new board, and I can't get an
answer from Ocular. I've done about all I can do. |
|
|
mindstorm88
Joined: 06 Dec 2006 Posts: 102 Location: Montreal , Canada
|
|
Posted: Wed Feb 28, 2007 8:26 am |
|
|
Funny , i got it from Digikey on my first try , then microchip send an exact replacement few weeks after for testing, up to now , not using the busy bit and adding 5ms at the enf of the init solved all problems !!!!
i guess that Microchip bought(without knowing) a defective batch !!! at least for the busy bit part !!!!
So i'm using it with dedicated driver for prototyping !!!! |
|
|
medi_pic Guest
|
wrong LCD Initialisation |
Posted: Wed Feb 28, 2007 10:48 am |
|
|
Hello mindstorm88 and PCM programmer!
This problem with the initialisation of the LCD-Controller is detected.
Your LCD-moduls to work correctly. The problem is the Function "while()"
in the Compilerversion 4.xxx .
Why ? I have tested the LCD-Routine with the Compilerversion V3.0xx
and the routine functioned normal, with out problems with the LCD. In the
last week i have changed my system to V4.025 and the same LCD-Routine with the same LCD-Display no longer work correctly.
As cause of failure i was able to identify the "while()"-Function.
V3.xxx:
A FALS statment is in the input of the function -> the function is wait for change to TRUE and step out of the loop. That is correct.
A TRUE statment is in the input of the function -> the function is step over.
That is also correct.
V4.xxx:
A FALS statment is in the input of the function -> the function is wait for change to TRUE and step out of the loop. That is correct.
A TRUE statment is in the input of the function -> the function is also wait for a change from FALS to TRUE insite the function. That is not possible, because the input is already TRUE. The "while()"-function works as endless loop.
That is a bug in the new compiler version V4.0xx and not compatible with ANSII C. |
|
|
mindstorm88
Joined: 06 Dec 2006 Posts: 102 Location: Montreal , Canada
|
|
Posted: Wed Feb 28, 2007 11:42 am |
|
|
medi_pic, which while() in the driver are you talking about ???
I never had any problem with while() loop up to now !!! |
|
|
medi_pic Guest
|
|
Posted: Thu Mar 01, 2007 2:18 am |
|
|
mindstorm88 wrote: | Hi mindstorm88
void lcd_send_byte(BYTE n){
output_low(PIN_A3);
while(bit_test(lcd_read_byte(),7));
output_high(PIN_A3);
delay_cycles(1);
output_low(PIN_A4);
delay_cycles(1);
output_low(PIN_A5);
lcd_send_nibble(n >> 4);
lcd_send_nibble(n & 0xF);
}; |
|
|
|
|