Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/01/03 16:04
Read: times


 
#44631 - RE: anothe problem with HD44780U LCD
Responding to: ???'s previous message
The primary reason that your code is probably not working is the fact that you propagate the settings for RW, CD, and E from routine to routine. First off that is so unmodular as to be totally confusing. Secondly, any new future use of the routines will require a whole bunch is analysis to see why it does not work each time you approach it anew. You would be far better to setup four independant routines as follows:

Write Control
-- Set RW to WRITE
-- Set CD to CONTROL
-- Output DATA byte
-- Raise E pulse
-- Delay a E pulse width (couple of NOPs maybe)
-- Lower E pulse
-- Return from routine

Write Data
-- Set RW to WRITE
-- Set CD to DATA
-- Output DATA byte
-- Raise E pulse
-- Delay a E pulse width (couple of NOPs maybe)
-- Lower E pulse
-- Return from routine

Read Status
-- Set RW to READ
-- Set CD to CONTROL
-- Set data port as input
-- Raise E pulse
-- Delay for read access time (a NOP maybe)
-- Read in status from DATA port
-- Lower E pulse
-- Return from routine with status in A

Wait for BUSY Done
-- Call Read Status
-- Test if still busy
-- If busy loop to top of routine
-- Return now that busy finished


I would urge you to even follow the order of the steps I show here for each routine.

Hope this helps some small amount
Michael Karas


List of 15 messages in thread
TopicAuthorDate
anothe problem with HD44780U LCD            01/01/70 00:00      
   RE: anothe problem with HD44780U LCD            01/01/70 00:00      
      RE: anothe problem with HD44780U LCD            01/01/70 00:00      
   RE: anothe problem with HD44780U LCD            01/01/70 00:00      
      RE: anothe problem with HD44780U LCD            01/01/70 00:00      
         RE: anothe problem with HD44780U LCD            01/01/70 00:00      
            RE: anothe problem with HD44780U LCD            01/01/70 00:00      
               RE: anothe problem with HD44780U LCD            01/01/70 00:00      
            RE: anothe problem with HD44780U LCD            01/01/70 00:00      
               RE: anothe problem with HD44780U LCD            01/01/70 00:00      
                  RE: anothe problem with HD44780U LCD            01/01/70 00:00      
                     RE: anothe problem with HD44780U LCD            01/01/70 00:00      
                        RE: Michael Karas            01/01/70 00:00      
               RE: rami            01/01/70 00:00      
            RE: anothe problem with HD44780U LCD            01/01/70 00:00      

Back to Subject List