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

Back to Subject List

Thread Closed: Thread will re-open when original poster replies

???
03/25/06 20:07
Read: times


 
#113084 - I'm curious, of course,
Responding to: ???'s previous message
What has the 74C922 to do with the LCD, or with whether it is memory mapped?

I haven't looked at the 74C922 in 20+ years, but I don't recall that it was a bus-oriented device. (now you've forced me to dig out my databook, and it does show that there's an output enable, but the 74C-series devices didn't really drive a bus well.

Perhaps a bit more information about how you intend to use this device would be helpful.

If you're using a 4x4 matrix keypad, the '922 will help you endcode it. It will require you provide at least five input bits so you can read the four output bits, and read the "data-available" strobe as well. it doesn't seem that it registers the data for you so you have to catch it when the strobe becomes active, since it only persists so long as the key is pressed. It does debounce the switches for you, in that it uses a scanning strategy timed with external capacitors.

You could, of course, avoid having to use the rather costly '922, by providing an external latch and a strobe to it, then driving four bits into it and from there to the column terminals on the keypad, then reading from the other four bits on the same port, the row levels, which, then, would be inputs.
The '922 is convenient, though, in that you don't have to debounce the key switches or write the simple code with which to scan the matrix. If you're doing this just once, it's not a bad idea using the encoder chip.

I suspect that if you search this forum for KEYPAD and for LCD, you'll find more than enough code to help you. If you want to run your MCU slowly enough to accomodate the LCD's access time, 400 ns, IIRC, and if you've memory-mapped it as an 8-bit peripheral, you can probably just connect the nWR line to pin 5 on the connector (R/W) and drive pin 4 (RS) with A0, which you'll have to latch, and then drive pin 6 (E) with [(ADDRESS-DETECT-NOT) NOR (nWR NAND nRD)]. The result will be that you can treat the LCD as two separate registers, the lower of which is the command/status register, and the upper of which is the data. You'll have to poll the status before issuing a command, though you'll have to run open-loop timeouts in order to effect the setup. After the setup, you need no more open-loop timing. You can then write to the data locations as ordinary external memory, and read likewise. You can also directly address the cursor location. All this is amply explained in the HD44780 datasheet.

If I'm not mistaken, the examples on this forum are written in assembly language.

RE




List of 26 messages in thread
TopicAuthorDate
74C922            01/01/70 00:00      
   You don't need to know much            01/01/70 00:00      
      LCD            01/01/70 00:00      
   74C922            01/01/70 00:00      
      I'm curious, of course,            01/01/70 00:00      
   RE: 74C922            01/01/70 00:00      
      comments            01/01/70 00:00      
         RE: comments            01/01/70 00:00      
      whatever you find for the Basic Stamp is            01/01/70 00:00      
         Let's not go there ...            01/01/70 00:00      
            Let's not go there ... as well            01/01/70 00:00      
               Isn't the reason obvious?            01/01/70 00:00      
                  Where do you get that information from?            01/01/70 00:00      
                     It's speculation            01/01/70 00:00      
                        yes it is SEMA PLEASE REPLY            01/01/70 00:00      
                           Donner und Blitzen            01/01/70 00:00      
                              That's EXACTLY what it is, I'll bet            01/01/70 00:00      
                                 timing is everything            01/01/70 00:00      
                                    Difficult to answer            01/01/70 00:00      
                                       second rate            01/01/70 00:00      
   One-off doesn't mean second-rate            01/01/70 00:00      
      nice to see you almost agree            01/01/70 00:00      
         Almost might be an overstatement            01/01/70 00:00      
      74C922            01/01/70 00:00      
   We should close this thread,...            01/01/70 00:00      
      The noise probably scared him off            01/01/70 00:00      

Back to Subject List