LCDInfo.com

http://www.lcdinfo.com
It is currently Fri Nov 22, 2024 1:30

All times are UTC + 2 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Feb 24, 2005 13:47 
Offline

Joined: Thu Feb 24, 2005 13:34
Posts: 5
I have a self-built development and test board for the 8052 and connected the display with normal wires

The problem is that it fails to initalize. All I get is a black line at the very top

Here is the important code (the delay is 0.5ms now):



clr P2.5

DSP_INIT: call DLY
clr P2.0 ;Reset
call DLY
setb P2.0
call DLY

call CHECK1 ;Controller Status
;next is supposed to be CHECK2 + Display 1/2 ON

TEST: jmp TEST

ENABLE: setb P2.5
call DLY
clr P2.5
call DLY
call DLY
ret

CHECK1: mov P0, #0FFh
mov P2, #0FFh
clr P2.3 ;D/-I = 0 + R/-W = 1 --> Read Data
clr P2.2 ;Chip Select 1
CHK1_L: call ENABLE
jb P0.7, CHK1_L ;Busy Flag
jb P0.4, CHK1_L ;Reset Flag
ret


When I probe the Enable Strobe and Busy with 2-channel osciloscope I get continious Enable strobes. So I think it hangs in the Check 1 loop.

Now the weird thing is that the Busy signal is the Enable one excactly inverted. When I pull enable high, busy goes low, and returns to high at the falling edge (this is when the status output is supposed to appear).

This leads me to believe that the microcontroller always detects busy and is thus in an endless loop. In my opinion it doesn't make much sense that the two signals are just inverted. There should be some delay
Is this a timing issue? What are the recommended timings here?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 25, 2005 11:37 
Offline

Joined: Thu Feb 24, 2005 13:34
Posts: 5
Well, I found out why the waveforms are inverted. I didn't really consider that the enable falling edge latches the busy bit. Internally it can of course be something else

I also saw that the display and the controller manufacturer technical details are somewhat conflicting.
Once it says that data can be read after the falling edge of enable, and once that it can be read in the high state.

Still doesn't work :(


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 25, 2005 14:28 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
Is it necessary for you to do the busy reading ? Maybe you could just try putting a first delay first and when you have the display otherwise working you could try with the busy functionality again if needed.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 25, 2005 16:20 
Offline

Joined: Thu Feb 24, 2005 13:34
Posts: 5
Yeah I suppose I could do a delay of a few milliseconds. The manual of the display just recommend the busy routine before any sort of writing and reading from the display

Since the controller datasheet said that the busy bit can be read during a highphase, I gave a pulse to latch the bit, and then pulled enable high again to read it
Thus I managed get the processor to do a loop of write data cycles and it still only displays that one line at the top.

This leads me to believe that the controller wasn't initialized correctly. But I'm pretty much out of ideas


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 3 guests


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

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group