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

Back to Subject List

Thread Closed: Issue successfully resolved

???
04/17/07 04:46
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#137352 - It shows that you "experiment" instead of reading
Responding to: ???'s previous message
Mike Stegmaier said:
on many 8051 microprocessors (and even microcontrollers), Port 0 is normally float.

Mike, it's time to get some facts straight. There are no 805x microprocessors. Since day 1, the 805x has been labelled a single-chip microcomputer, which, over time, has become popularly known as a microcontroller. In order to (1) support a means for using microprocessor-style system design as was popular in the late '70's, Intel provided a relatively simple way of expanding the system beyond what was on-chip, expanding on what they'd done with the 8051's precursor, the 8048. Keep in mind, if it has ports and on-chip memory, RAM or ROM or both (not counting registers or cache, though the 805x' registers are just on-board RAM), it's not just a microprocessor, it's a single-chip microcomputer.

It is fine to use them as general purpose data pins, but they really should be tied to a pull-up (or a pull down) resistor as well. 100K for a cmos chip will work well.

The reason for the pullups is to ensure that voltage levels will go high enough, as the original 805x didn't have to drive the pins to CMOS levels (~3.6 volts), but, rather, needed only to drive TTL levels (~2.4 volts).

If you fail to do this, then there is a good chance that port 0 will float when the program is not running and chances are that there may be a problem using your LCD.

This doesn't make sense. Perhaps you should rephrase it. There's no need to be concerned with the P0 levels if there's no program running, since the power must be off at that time, or the MCU is being held in reset.

If he wants to memory map his LCD, i.e. if he wants to read and write it as though it were memory, he can't do that except on P0. Now he didn't say he's doing that, but he probably could on a <12 MHz 12-clocker.

Why not try ports 1 and 3 instead?



You must not yet have thoroughly read the datasheet for any 805x of any sort. The P0 is not NORMALLY "floated" when an active BUS write cycle is in progress, i.e. when nWR is active. The datasheet shows when, before the rising edge of nWR, and for how long after the rising edge of nWR, data is held valid. If you try to sample data when there is no valid data, you will get what you deserve. Likewise, if you try to sample addresses when there are no valid addresses, as indicated on the datasheet, you will, again, get what you deserve. The P0 is never floating when a data bus write is supposed to occur.

Here's what "the bible" says,
"Port 0 differs in that its internal pullups are not active during normal port operation. The pullup FET in the P0 output driver (see Figure 4)is used only when the port is emitting 1s during external memory accesses. Otherwise the pullup FET is off. Consequently P0 lines that are being used as output port lines are open drain. Writing a 1 to the bit latch leaves both output FETs off, so the pin floats. In that condition it can be used as a high-impedance input."

Normal port operation differs from normal BUS operation. If you use P0 as a port, you absolutely must provide pullups.

Pullups are also advisable when driving a memory BUS-interfaced CMOS device such as an LCD, since there's some doubt as to which 805x variant one might use. Some of them can drive CMOS, while others may not. I certainly wouldn't expect an HMOS MCU to drive 5-volt CMOS devices without the aid of pullups.

RE



List of 78 messages in thread
TopicAuthorDate
LCD Problem            01/01/70 00:00      
   stop shouting - also            01/01/70 00:00      
      Sorry Erik            01/01/70 00:00      
         no need to be 'sorry'            01/01/70 00:00      
            timing            01/01/70 00:00      
               delays aren't necessary if you monitor busy            01/01/70 00:00      
   Pullup resistors on P0            01/01/70 00:00      
      already answered            01/01/70 00:00      
   make sure            01/01/70 00:00      
      Is there any test procedure to test LCD Module?            01/01/70 00:00      
         from the shop            01/01/70 00:00      
   did you try...            01/01/70 00:00      
      tthat is SOME wait            01/01/70 00:00      
         ...            01/01/70 00:00      
            well, maybe is is a good thing            01/01/70 00:00      
               i need a lcd testing procedure            01/01/70 00:00      
                  like this            01/01/70 00:00      
                     lcd testing            01/01/70 00:00      
                        Couple of links            01/01/70 00:00      
                           no datasheet            01/01/70 00:00      
                              Should work the same...            01/01/70 00:00      
                                 +1 for this answer            01/01/70 00:00      
                                    LJMP limits            01/01/70 00:00      
      delays aren't necessary if you monitor busy            01/01/70 00:00      
      May be LCD is damaged!!            01/01/70 00:00      
         Pin 3 may require a negative voltage            01/01/70 00:00      
            PLEASE!!!!            01/01/70 00:00      
               There is a "convention"            01/01/70 00:00      
            to clarify?            01/01/70 00:00      
         two problems with the 'advice' you followed            01/01/70 00:00      
            Only lower line of LCD is showing!            01/01/70 00:00      
               looks like pretty normal behavior to me ...            01/01/70 00:00      
                  'cheap' -5 for a LCD            01/01/70 00:00      
   where is that standard?            01/01/70 00:00      
      It's not an EIA or a DIN standard ...            01/01/70 00:00      
         you said exactly that            01/01/70 00:00      
            We've all told him to read his LCD datasheet            01/01/70 00:00      
               this is getting ridiculous.            01/01/70 00:00      
                  ok, I deserve -1 from before            01/01/70 00:00      
                     why not spell it correctly            01/01/70 00:00      
                  That's why there are datasheets            01/01/70 00:00      
   LCD is workingggg!!!!!!            01/01/70 00:00      
      Now get to work            01/01/70 00:00      
         MISTAKES made            01/01/70 00:00      
   Datasheet, which created a problem.            01/01/70 00:00      
   Can LCD datasheet be uploaded for others referen.?            01/01/70 00:00      
      You have to get the correct datasheet            01/01/70 00:00      
         need lcd testing procedure            01/01/70 00:00      
            You need more data!            01/01/70 00:00      
               addendum to Richards post            01/01/70 00:00      
                  There is a de-facto standard            01/01/70 00:00      
                     lcd problem            01/01/70 00:00      
                        Disconnect d1            01/01/70 00:00      
                        problem with second line of lcd            01/01/70 00:00      
                           program            01/01/70 00:00      
                              your code has a problem?            01/01/70 00:00      
                                 looks like experimenting again ...            01/01/70 00:00      
                                 from hitachi data sheet on HD44780            01/01/70 00:00      
                                    I'm starting to hate these datasheets            01/01/70 00:00      
                                       BULL            01/01/70 00:00      
                                          get it RIGHT before you deviate from spec's            01/01/70 00:00      
                                       OK... I give up...            01/01/70 00:00      
                                    8 bit Initialization            01/01/70 00:00      
                                       lcd problem            01/01/70 00:00      
                                          program i used            01/01/70 00:00      
                                             driving voltage            01/01/70 00:00      
                                                its not the contrast problem            01/01/70 00:00      
                                                   why?            01/01/70 00:00      
                                                   Contrast and Initialization            01/01/70 00:00      
                                             you are, I hope, aware            01/01/70 00:00      
                                       That's the one...thanks            01/01/70 00:00      
   about P0            01/01/70 00:00      
      It shows that you "experiment" instead of reading            01/01/70 00:00      
      gibberish            01/01/70 00:00      
   small correction            01/01/70 00:00      
      thanks a lot            01/01/70 00:00      
         Thanks for informing us.            01/01/70 00:00      
            so, next time            01/01/70 00:00      

Back to Subject List