Announcement

Collapse
No announcement yet.

Bizarre 20x4 character LCD problem

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bizarre 20x4 character LCD problem

    I bought a crystalfontz 20x4 character LCD and wired it up to a parallel port cable. On my laptop it works fine, no problems, however on the mp3car computer it displays garbage if I try to initialize it using 8-bit mode, but it works in 4-bit mode. Both computers are configured to use ECP mode (I tried all modes on the carputer) and I still can't get it to work. In 8-bit init mode is just displays random garbage all over the screen. I know that the cable works because it works flawlessly on my laptop, so why would it go all wierd like that on the carputer? Additionally I have an ISA multi-IO card (one of those superold ones back when IDE and floppy wasn't on the motherboard... heheheh never thought I'd use it again but it gives me 2 com ports and another parallel) and it works fine in 8-bit mode on there (most of the time... but I wasn't resetting the LCD between trying it on the onboard lpt port so maybe it just needed to power cycle to work).

    Anyone have any idea? I couldn't find any information to help me on this, it seems like most people think that if you get garbage it's the cable, but I know that the cable is fine because it works on the laptop (and I meticulously tested it, all pins go though fine and none cross).

    I'm a little frustrated to say the least.

    Oh, this is on the end of a 25-foot parallel cable too.

    (The program that I used to test it is the one that is linked to off the crystalfontz software page)
    IN DEVELOPMENT -- '96 Mustang, lilliput with PII/450 laptop, custom DC-DC power supply, 60GB; Garmin GPS; 802.11g; compact keyboard, small graphical LCDs, OBDII.

  • #2
    It might have something to do with the amount of power thats driving the parallel port on your carPC. A 25' cable is pretty long for parallel, and since it works on one but not the other, id think its something with the power output of the carPC.
    Project AutoBoxen: Coming along, almost ready to hook up in the car.
    Celeron 500, 192mb ram, 8gb hdd, other stuff.
    '91 Mazda 626: Its free, so ill use it.

    Comment


    • #3
      sounds like we need a cheap "repeater"/line driver to deal with this not uncommon issue
      hmm, 8 data, r/w,e, .......

      Comment


      • #4
        Why is it that people have a hard time reading more than the first sentance of any given post? (sigh)

        I posted the same note to the Crystalfontz forum... and an admin posted back saying that there is no reason why I should need to use 4-bit mode so I should rewire it to work with 8-bit mode.

        Even though I explicitly stated that it works fine in 8-bit mode on 2 of the 3 ports tried on, and that I double checked the wiring to make sure that the connections are fine...

        The only thing that I can think of is maybe one of the wires in the upper 4 bits has a higher resistance than the rest of the wires (for some strange reason), thus screwing up 8-bit mode if the output power is slightly lower than normal?

        Is there any way that I can boost this at the base? Because basically there is no place that I could place a repeater even if I tried to make one because of how the wire will be routed through the car.

        Maybe I'll try to check the resistance on all the wires, but I superglued the end (I love that stuff!) which makes it difficult to take apart.
        IN DEVELOPMENT -- '96 Mustang, lilliput with PII/450 laptop, custom DC-DC power supply, 60GB; Garmin GPS; 802.11g; compact keyboard, small graphical LCDs, OBDII.

        Comment


        • #5
          It could be that the parallel port has so much power, and that gets divided among the lines, so there could be more current driving the 4bit mode then the 8bit mode.

          Its only a suggestion, im not exactly sure.
          Project AutoBoxen: Coming along, almost ready to hook up in the car.
          Celeron 500, 192mb ram, 8gb hdd, other stuff.
          '91 Mazda 626: Its free, so ill use it.

          Comment


          • #6
            my bad -missed the second sentence of line 2(embarrased grin)
            re Charliey's latest post
            theorizing:
            I was also thinking about limited pwr capacity of the periph chip
            but -the parallel port doesn't know you are using less pins-
            question for the software guys:-in what state does the software(s) put the unused "nibble"

            if this was the problem you could test by sending string of "less current consuming" commands in 8 bit mode (ie:more ones or zeros, whichever draws less pwr)

            or I just could be full of it

            Comment


            • #7
              what unused nibble are you referring to? Oh you mean what does the receiving end do about the missing 4 bits? Well, they're not really missing... It's just the software doesn't see any input above 16. It has to be able to handle this, in this case the LCD is initialized to recieve in 4-bit mode only (which it has to support) and then it will take every 2 transmissions and combine them to make one 8-bit byte (I'm assuming, since it does have to re-init and the transmit rate is roughly 1/2 the speed of 8-bit mode). This might have been done to allow the use of 4 less wires which would bring you down to 9 pins in total allowing you to use a 9-wire cable. This is just speculation however.

              When a bit is set is it becomes logic high (1), meaning that if you tap between it and ground you will get power (very low, usually at +12V as well), when a bit is unset (0) that is logic low, or unconnected.

              With the parallel port what happens is once you have all 8 data bits set you set the strobe bit (logic high) and the other end reads the state of all 8 bits. Once the strobe is dropped (logic low) the sender resets all of the 8 bits, the receiver dumps the 8 bits into it's buffer and the cycle continues.

              This is different when it comes to serial transmissions where both sides agree on a bitrate and the sender sets the 1 bit high or low on schedule (i.e. 2400 times per second, or 19200 times per second) and the receiver reads this, there is no strobe bit. The receiver then takes every 8 successive 1-bit transmissions and combines them to a byte and stores it in the FIFO buffer. This type of communication is used for any serial transmission, but serial can also be multi-bit.

              So this is a long winded way of saying that the 0 bit doesn't take any power

              However you raise an interesting point which might actually be the answer. If there is a fixed amount of power available then you might not be able to set all 8 bits high and have it traverse the cable whereas if you only have 6 bits set high there is enough power to hit the end of the cable. So 4-bit mode will work simply because the maximum number of "high" bits is 4.
              IN DEVELOPMENT -- '96 Mustang, lilliput with PII/450 laptop, custom DC-DC power supply, 60GB; Garmin GPS; 802.11g; compact keyboard, small graphical LCDs, OBDII.

              Comment


              • #8
                eloquently said!

                I was trying to identify that some output buffers, depending on design are better at sinking while some are better at sourcing current

                quote:"Oh you mean what does the receiving end do about the missing 4 bits?"
                I was referring to the PC software. We agree the LCD once in 4bit mode cares not what you do with the extra bits/"nibble".

                I guess you are saying that the PC LCD driver software will in 4 bit mode only send ascii codes less than decimal 16 and hold the most significant 4 bits low (post LCD initialization)

                IIRC-control codes may be an exception-8'th bit(MSB) high to let the LCD know its a command?

                Comment


                • #9
                  The crystalfontz init program shows you all of the bits and what gets set, and during 4-bit initialization the MSNibble is always 0, never touched. The bits to indicate what is going on are used for both 4 and 8 bit mode.

                  The PC software has to be able to know to send only in 4-bit mode, so when sending 1 byte it will send the lower and then the upper nibble in 2 successive sends, and the top 4 bits are actually irrelevant... The LCD is not expecting them to be used, so it doesn't really matter what they are set to.

                  Well I think that I found a different way of routing the wires in my car that won't require such a roundabout route, so hopefully I can cut down the length of the wires from 25' to about 15', which hopefully will solve my problem. I will have to resolder it (d'oh!) but I was stupid in the first place and soldered the LCD right to the end of the 25' cable (I should have used a connector and then used the 25' cable as an extension instead... Oh well, live and learn I guess! I still have the 128x64 to wire up, but I was dumb there too and accidentally ordered the one with the EL backlight (requiring an inverter) instead of the ones with the LED backlights.
                  IN DEVELOPMENT -- '96 Mustang, lilliput with PII/450 laptop, custom DC-DC power supply, 60GB; Garmin GPS; 802.11g; compact keyboard, small graphical LCDs, OBDII.

                  Comment

                  Working...
                  X