Hantronix LCDs - Specifically HDM20416L-1 and similar with KS0066U controller chip

westaust55

Moderator
I was recently given a few 20x4 character type LCD modules by our IT group from some Equitrac systems that had been decommissioned. These 2002 vintage modules have a Hantronix HDM20416L-1-Y1ES display using a KS0066U controller chip.
See: http://www.hantronix.com/page/index/products/character

After changing out the centered header pins (that were protruding 50-50 each side of the PCB) for some that were in effect protruding fully to one side of the PCB, I soon had the displays up and running.

Having recalled that there has been some past posts about problems with the KS0066 controller chips I can advise that:

1. They use the same command set and initialization as the Hitachi HD44780 controller chips
2. The Hantronix specs (as downloaded March 2013) if followed at page 44 for Character Module Initialization will not initialise the KS0066 chips into a useable position. The reason is that the Display Clear data specifies a value of 8 whereas to turn on the display the “D” bit (bit 2) must be set so a value of $0C (decimal 12) must be sent.
3. The Samsung KS0066U datasheet (as downloaded March 2013) if followed at the page for Initialization by instruction does not include the sending of $30 and $30, $30 for 8-bit interface of $03, $03, $03, $02 for 4-bit mode. Failure to include these first bytes of data, at least for earlier (ie ~2002 manufactured) KS0066U chips will result ion failure to initialize.

There are some timing parameters that are specified for these displays which differ between the various datasheets, however with a PICAXE chip as the "driver" I found that they would initialize okay without some the specified timing delays. The timing delays are as follow:
1. 30ms (Samsung) or 20 ms /15 ms (Hantronix for 8 or 4-bit interface respectively) – I used 50 mS for good measure
2. Hantronix (but not Samsung) specify >= 4.1 ms delay after the first data Function Set byte/nibble – I removed this without incurring problems
3. Samsung (but not Hantronix) specify a >= 1.53 ms delay between display clear data and Entry Mode set data. - I removed this without incurring problems.

Omission of the Entry Mode Set data did not seem to effect the initialization/operation of the HDM20416L-1 type display (with KS0066U controller) however I have retained this in my initialsiation code.

Hopefully others who may latter purchase an LCD display using the Samsung KS0066U controller chip may find this useful.

Some demo code for the 4-bit interface mode is as follows:

Code:
'         COMMAND SUMMARY 4 BIT MODE

'( 1) Clear Display
'( 2) Cursor Home
'( 8) Display Off
'(12) Display On/Restore Cursor Off
'(128-147) Line 1 Cursor Position 
'(192-211) Line 2 Cursor Position 
'(148-167) Line 3 Cursor Position ~ continuation of line 1
'(212-231) Line 4 Cursor Position ~ continuation of line 2
'(13) Blinking Cursor
'(14) Underline Cursor 
'(16) Move Cursor Left
'(20) Move Cursor Right
'(24) Shift Display Left
'(28) Shift Display Right

	#PICAXE 18m2							
	#TERMINAL OFF	

'  PICAXE IO Allocation
'            DB7  = C.3	
'            DB6  = C.2	
'            DB5  = C.1	
'            DB4  = C.0	
	SYMBOL E    = B.6			                  
	SYMBOL RS   = B.7			                  

' Variable Usage
	SYMBOL senddata    = b0			
	SYMBOL index       = b1

	

 ; Initialisation from Hantronix datasheet
 '  --> (4Bit)(Function 4bit/2line/5x7)(Display = On)(Clear Display)(Entry Mode = Increment/No Disp Shift)
	EEPROM  0,($33,$32,$28,$0C,$01,$06)  
	EEPROM 20, ("PICAXE 18M2+ with a ")
	EEPROM 40, ("Hantronix series LCD")
	EEPROM 60, ("HDM20416L-1-Y1ES    ")	
	
      SETFREQ M8
 	dirsB = %11101101			
 	dirsC = %00001111								
 	
Intialise: 
	PAUSE 100   ; = 50 ms at 8 MHz - delay >= 30 ms by Samsung datasheet	
	FOR  index = 0 to 5                                              
                  READ index, senddata : GOSUB send ' Initialise LCD						NEXT index : PAUSE 10

Main:
      LOW RS  :senddata = 128 : GOSUB Send : HIGH RS '(128-147) Line 1 Cursor Position
       
  	FOR index = 20 TO 39                 
 	  READ index, senddata : GOSUB Send ' sending characters to line two      
 	NEXT index


      LOW RS  :senddata = 192 : GOSUB Send : HIGH RS '(192-211) Line 2 Cursor Position 	
 	FOR index = 40 TO 59                 
 	  READ index, senddata : GOSUB Send ' sending characters to line one      
 	NEXT index    

      LOW RS  :senddata = 148 : GOSUB Send : HIGH RS '(128-147) Line 1 Cursor Position
       
  	FOR index = 60 TO 79                 
 	  READ index, senddata : GOSUB Send ' sending characters to line two      
 	NEXT index

     DO : LOOP ; loop forever

Send:  
	pinsC = senddata / 16 : PULSOUT E,1 :  pinsC = senddata : PULSOUT E,1
      RETURN
 
Last edited:

John West

Senior Member
Thanks, Westy. I have some of those displays that I could never get to work properly. This should help a lot.
 

franklynb

New Member
newbie: trying to 8-bit parallel a Hantronix HDM20416L-M

I was recently given a few 20x4 character type LCD modules by our IT group from some Equitrac systems that had been decommissioned. These 2002 vintage modules have a Hantronix HDM20416L-1-Y1ES display using a KS0066U controller chip.
See: http://www.hantronix.com/page/index/products/character[/QUOTE] westaust55, Using your example code, and the snippet from the Evin Genius manual, I've been able to get contrast set, and "40 blank digits" to display on a HDM20146 LCD. I'm using an 18M2; and ports B.0 -> B.7 to transfer data. I've played with the timing, but am confused by the "every fourth enable" graph of data on the KS0066U data sheet. Perhaps this is why I cannot get even junk characters to display? I've tried sending the first line of data: $33,$32,$28,$0C,$01,$06 with no observable change. Also tried just sending a $30,$30,$30 triplet of commands. No effect. Can you {or anyone reading this very old thread I've revived} give me a hint where I might be going wrong? I see no reason to rip out all the wiring just to make it a 4 bit setup. [code] ' ********************** LCDparallel.bas *********************** ' Program runs on a PICAXE-18M2 at 8MHz & sends 8-bit data ' to an HD44780 16x2 LCD display. ' *** Constants *** symbol enable = C.7 ' LCD enable pin 6 connected to C.7 symbol RegSel = C.6 ' LCD RegSel pin 4 connected to C.6 symbol RW = C.5 'LCD R/W pin 5 -- NOT CONNECTED ' *** Variables *** symbol char = b0 ' character to be sent to LCD symbol index = b1 ' used as counter in For-Next loops ' *** Directives *** #com /dev/ttyUSB0 ' specify download port #picaxe 18M2 ' specify processor #no_data ' save time downloading #terminal off ' disable terminal window ' Port Allocations ' D0: B.0 ' D1: B.1 ' D2: B.2 ' D3: B.3 ' D4: B.4 ' D5: B.5 ' D6: B.6 ' D7: B.7 ' *** Table ******************** Table 0, ("a b c d e 1 2 3 4 5 ") Table 20, ("PICAXE 18M2 LCD ") ; include a trailing space 'EEPROM 0,($33,$32,$28,$0C,$01,$06) 'EEPROM 20, ("PICAXE 18M2+ with a ") 'EEPROM 40, ("Hantronix series LCD") 'EEPROM 60, ("HDM20416L-1-Y1ES ") ' ********************* Begin Main Program ********************* dirsB = 111111 ' set all portB pins as outputs dirsC = 11111 ' set C.6 as inputs pullup 00000 ' enable C.6 internal pullup resistor symbol LED=C.0 ' *** Initialize the LCD *** pause 200 ' pause 200 mS for LCD initialization ;pulsout C.0, 100 high LED ;char = 56 ' setup for 8-bits, 2 lines & 5X7 dots char = 12 ' display on, cursor off gosub OutCmd char= 000100 'entry mode set gosub OutCmd 'enable display controller char=001000 'display OFF = 1000; ON = 1100/cursor OFF blink OFF gosub OutCmd char = 111000 '8-bit, 2 line, 5 line, 5x11 character gosub OutCmd ' *** Main Program Loop - Send data to the LCD *** do ;char = 1 ' clear display & go home gosub OutCmd ' send instruction to LCD wait 1 low LED for index = 0 to 19 readtable index, char ' send line one to LCD gosub OutTxt next index wait 1 ;char = 192 ' move cursor to start of line two ??? gosub OutCmd ' send instruction to LCD for index = 20 to 39 ' send line two to LCD readtable index, char gosub OutTxt next index 'Temp = 294 ; = 29.4 multiplied by 10 for 1 decimal place 'gosub OutValue wait 4 high LED loop ' ************ End Main Program - Subroutines Follow *********** ' *** OutCmd & OutTxt Subroutine *** OutCmd: low RegSel ' set up for command byte goto Doit ' do it OutTxt: high RegSel ' set up for text byte Doit: outpinsB = char ' load byte onto outpinsB pulsout enable,1 ' send data pause 4 return [/code] --frankb
 

Goeytex

Senior Member
Hi Frank

Here's my Assessment and some test code to try.

1. Nowhere in the code was the Freq set t0 8Mhz ... Added Setfreq M3

2. DirsB and Pullups were missing a byte so C.6 was not set as input and enable was not set as output

3. Code says LCD R/W not connected, but this pin on the LCD MUST be tied to GND - Correct if needed

4. Put directives at start of Code and added indenting for readability

5. Made Init LCD a complete Sub with added delays for reliable initalization

6. Added a small test section to see if data is displayed
Should display "ABCDEFGHIJKLMNOP" On Line 1


Load the code below and see what happens ? Does the display show "ABCDEFGHIJKLMNOP"

Code:
' ********************** LCDparallel.bas ***********************

' Program runs on a PICAXE-18M2 at 8MHz & sends 8-bit data
' to an HD44780 16x2 LCD display.

	
' *** Directives ***
#com /dev/ttyUSB0	' specify download port
#picaxe 18M2	' specify processor
#no_data	      ' save time downloading
#terminal off	' disable terminal window

SetFreq M8        '*** Set the MCU to 8 MHz *** 

' *** Constants ***
symbol enable = C.7	' LCD enable pin 6 connected to C.7
symbol RegSel = C.6	' LCD RegSel pin 4 connected to C.6
symbol RW     = C.5      'LCD R/W pin 5 -- NOT CONNECTED
symbol LED    = C.0

 '// ** NOTE **   LCD/RW must be tied to ground !  :


' *** Variables ***
symbol char = b0	' character to be sent to LCD
symbol index = b1	' used as counter in For-Next loops


' Port Allocations
' D0: B.0
' D1: B.1
' D2: B.2
' D3: B.3
' D4: B.4
' D5: B.5
' D6: B.6
' D7: B.7

' *** Table ********************
Table 0, ("a b c d e 1 2 3 4 5 ")
Table 20, ("PICAXE 18M2 LCD     ") ; include a trailing space

'EEPROM  0,($33,$32,$28,$0C,$01,$06)  
'EEPROM 20, ("PICAXE 18M2+ with a ")
'EEPROM 40, ("Hantronix series LCD")
'EEPROM 60, ("HDM20416L-1-Y1ES    ")
	

'****** Set Pin directions and Pull up on C.6 
dirsB = %11111111	' set all portB pins as outputs
dirsC = %10111111	' set C.6 as inputs  '//** Corrected **
pullup  %01000000	' enable C.6 internal pullup resistor ** Corrected	


Gosub LCD_INIT   ' *** Initialize the LCD ***	

High RegSel  'Make sure in char mode

'***************TEST *********************************

   Low RegSel
   OutPinsB = 1           '//clear and cursor home  
   pulsout enable, 1
   pause 20                '//10ms   (Clear needs extra time)

   High RegSel              '// Character Mode

    For char = 33  to  48   '// "A" through "P"
       OutPinsB = char
       pulsout enable ,1
       pauseus 120            '// Only for Test 
    Next

pause 10000   '//wait 5 sec @ 8MHz

'************* END TEST *****************************



' *** Main Program Loop - Send data to the LCD ***	

do
    char = 1	             '//clear display & go home	
    gosub OutCmd	     '// send instruction to LCD
    wait 10
    low LED

    for index = 0 to 19
        readtable index, char	' send line one to LCD
        gosub OutTxt
    next index
    wait 1

    char =  192	' move cursor to start of line two	???
    gosub OutCmd	' send instruction to LCD 
        for index =  20 to 39	' send line two to LCD
            readtable index, char
            gosub OutTxt
        next index

   'Temp = 294	; = 29.4 multiplied by 10 for 1 decimal place
    'gosub OutValue

    wait 4
    high LED
loop

' ************ End Main Program - Subroutines Follow ***********


LCD_INIT:
      Pause 100   'Wait 50 ms after power is applied 
      Low RegSel  ' command Mode
	OutPinsB = 0x30
	pulsout enable, 1              
	Pause 10
         
        '// Three More times  '// WAKE UP ! 
	for index = 1 to 3	
		pulsout enable, 1                
		pauseus 20
      next        

      OutPinsB = 0x38     '2/4 line mode
      pause 10 
      pulsout enable, 1
      pauseus 20          'Due to overhead this will be closer to 100us
        
      OutPinsB = 0x06     'Cursor movement
      pause 5
      pulsout enable, 1
      pauseus 20         

      OutPinsB = 0x0C     'Entry mode
      pause 10
      pulsout enable, 1   
      Pause 10  
   
      OutpinsB = 0X01      'clear again
      pause 10
      pulsout enable, 1
      pause 20 
      high regSel       
   
return     


' *** OutCmd & OutTxt Subroutine ***

OutCmd:
	low RegSel	' set up for command byte
	goto Doit	' do it	

OutTxt:
	high RegSel	' set up for text byte

Doit:
	outpinsB = char	' load byte onto outpinsB
	pulsout enable,1	' send data
	pause 4
return
 

franklynb

New Member
Code changes

Hi Frank

Here's my Assessment and some test code to try.

1. ... Added Setfreq M3
2. DirsB and Pullups were missing a byte so C.6 was not set as input and enable was not set as output
3. Code says LCD R/W not connected, but this pin on the LCD MUST be tied to GND - Correct if needed
4. Put directives at start of Code and added indenting for readability
5. Made Init LCD a complete Sub with added delays for reliable initalization
6. Added a small test section to see if data is displayed
Should display "ABCDEFGHIJKLMNOP" On Line 1 [/QUOTE}

Goeytex,

Thanks for the suggested changes. I think I understand them all. But they seem to make no difference in the display.

First I added a ground signal to pin 5 from the hobby board.

I placed a "do ... loop" cons around the TEST section and executed it for a few minutes, perhaps 200 loops.

I saw no changes in the behavior of the display; still row 2 and 4 with a solid 5x7 "block" in each position. No characters were displayed.
Its a yellow display, so contrast is hard to record.

SN156323.JPG

--frankb
 

Rick100

Senior Member
I agree with marks. It looks like it's not initialized and is coming up in 1 line mode. You may have a wiring problem. You can try this simple program to toggle the lines while you measure the voltage at the lcd pin. That will confirm that you actually have the picaxe pin connected to the lcd pin. Just set the symbol for the pin you want to test. The enable and RS pins are the pins I would check first. Also check the R/W pin on the lcd with a meter to confirm it is at ground. I always pull out the meter or a logic probe when I can't get one of these displays to work.

Code:
[color=Navy]#picaxe [/color][color=Black]18M2      [/color][color=Green]' specify processor[/color]
[color=Navy]#no_data          [/color][color=Green]' save time downloading



' *** Constants ***[/color]
[color=Blue]symbol testPin [/color][color=DarkCyan]= [/color][color=Blue]C.7    [/color][color=Green]' LCD enable pin 6 connected to C.7
'symbol testPin = C.6   ' LCD RegSel pin 4 connected to C.6[/color]

[color=Black]main:
      [/color][color=Blue]high testPin
      pause [/color][color=Navy]1000
      [/color][color=Blue]low testPin
      pause [/color][color=Navy]1000
      [/color][color=Blue]goto [/color][color=Black]main[/color]
Good luck,
Rick
 

Goeytex

Senior Member
In looking at a few datasheets, with some of these Hantronix Displays the LED back light can draw a current of up to 500ma. It is the users responsibility to supply a suitable current limit resistor. In other words, the back light cannot be driven directly from a Picaxe I/O pin and will need a transistor or FET as well as an appropriate current limit resistor resistors. I recall repairing a device for someone back in 2002 or so and it had an 8x16 Hantronix display. The back light resistor was a 5 watt ceramic job and it got quite hot.

How is the back light LED being driven on this one? Can you provide a complete schematic of your circuit?
 

franklynb

New Member
contrast & initialisation

Hello Marks,

Thanks for the tip. The initiialization sequence
Code:
Initialise: 	
	FOR  index = 0 to 6 
          LOOKUP index, ($38,$38,$38,$0F,$01,$02,$06),senddata : PULSOUT E,1 ' Initialise LCD/OLED
          '(8bit/2line/5x8)*3(Display On/flashing Cursor)(Clear Display)(Return Home)(Entry Mode Set)
 	NEXT index : PAUSE 10
... doesn't seem to work on this Hantronix LCD. The "TEST" code, when placed in a loop -- has no visible output.
Here's the data page for the codes I'm using which produce the blocked elements:
pg_0018.jpg

That page seems to suggest that decimal 29 is sent for 'Display ON/flashing cursor' -- rather than $0F ???

I'm chasing the current control problem for the contrast. I think the backlight? may be swamping my little adjustable regulator. The
voltage value that seems to work best is 50mV at pin 3. Raising it to .5V {as shown on your very nice and helpful schematic}
doesn't seem to get the elements to "pop". My suspicion is that there is just too much current {at too low voltage} for the backlight,
which I'll chase down tonight.

Is the initi sequence you've code used for the Samsung controller? The controller chip is buried under epoxy plugs on this display, but
the thread seems to indicate its {HDM20416L-M model} a likely candidate.
 

franklynb

New Member
How is the back light LED being driven on this one? Can you provide a complete schematic of your circuit?
Hi Goeytex,

I'm using a separate supply on an allelectronics adjustable regulator for the backlight. The PICAXE is on its own supply leg, and the digital output
for that leg shows 4.9V.

The backlight circuit, which also supplies the contrast current, is being "dragged down" to 4.1V. I've tried adding a current control resistor, which raises the
supply to ~4.4V {best} but I think I need a better {lower impedance?} regulator for that part.

Don't have a schematic -- although I'm using a breadboard version of the "Evil Genius" parallel ckt, LCD, p 111. the two circuit legs share a 1A 5V 'wall wart",
but i don't believe that matters. 1A should be plenty for the combination. It delivers ~5.1V open circuit, and is very stable.
 

hippy

Ex-Staff (retired)
That page seems to suggest that decimal 29 is sent for 'Display ON/flashing cursor' -- rather than $0F ???
The Display On/Off command is "0000 1DCB" which can have value $08 to $0F, So it would be $0F to have the display on, cursor on and have cursor blinking.

Decimal 26, hex $1A would be a Cursor Or Display Shift command.
 

marks

Senior Member
hi franklynb,
I tried your code in p0st #3 it failed to initialise showing block characters as you described.
just try running the provided code in full and check your pins match.

if your supply is'nt uptoit it may not initialise
you should have decoupling capacitors fitted to your picaxe and check your circuit is correct.
the program will at least show voltage of your supply on the terminal
and hopefully on the lcd. also tryit with the led disconnected or in series with a 200 ohm resistor
good luck!
Code:
#picaxe 18m2  '  AXE132 8Bit marks
 #no_data
 #terminal 9600
 SETFREQ M8
 dirsB = %11111111
 dirsC = %11001111 
'           DB7  = B.7
'           DB6  = B.6
'           DB5  = B.5
'           DB4  = B.4
'           DB3  = B.3
'           DB2  = B.2
'           DB1  = B.1
'           DB0  = B.0
 SYMBOL  E  = C.6
 SYMBOL RS  = C.7
 SYMBOL senddata    = pinsb
 SYMBOL index       = b0   : SYMBOL avr = b0
 
	SYMBOL ADCval      = w1
	SYMBOL batV        = w2 
      SYMBOL D0          = b6 
	SYMBOL D1          = b7 
	SYMBOL D2          = b8
	SYMBOL D3          = b9
	 	
InitialiseLCD: 	
	FOR  index = 0 to 6 
          LOOKUP index, ($38,$38,$38,$0C,$01,$02,$06),senddata : PULSOUT E,1 ' Initialise LCD/OLED
          '(8bit/2line/5x8)*3(Display On)(Clear Display)(Return Home)(Entry Mode Set)
 	NEXT index : PAUSE 10 
 		
Main:	 
 batV = 0
FOR avr = 1 TO 25 
 	CALIBADC10 ADCval : ADCval = 41902 / ADCval : batV = ADCval+batV 
NEXT avr
 
 BinToAscii batV,D3,D3,D2,D1,D0
 sertxd("Vdd = ", d3,".", d2, d1,"  ", d0," Volts",cr,lf)

DisplaySupplyLCD:
LOW RS  :senddata = 128 :   PULSOUT E,1
	HIGH RS
      FOR  index = 0 TO 15
 	    LOOKUP index,("LCD Supply ",D3,".",D2,D1,"V "),senddata 
 	                           pinsB = senddata : PULSOUT E,1 ' sending characters to line one 
      NEXT index

    GOTO Main
 

franklynb

New Member
tried #12.

hi franklynb,
I tried your code in p0st #3 it failed to initialise showing block characters as you described.
just try running the provided code in full and check your pins match.
Hello marks,

Thanks for the code. Same results as previous.

I pulled out a scope and checked all the signal lines. I'm convinced its a setup problem, since:

A) While tugging, I accidentally knocked a secondary ground around; and the display "flipped" into a high
contrast set of bars {taller than a character, so perhaps some sort of CGRAM stored thingie?} a few times.
I can't re-create the condition.

B) My contrast current on pin 3 is a paltry 1/4mA. Only way I can get grey bars to show up.

C) However, I can verify that $01 Clear Display signal DOES commit {work} by code commenting.

D) The probe of data lines looks "reasonable", without a lot of experience; repeated pulses superimposed on DC.

E) RW is dead clean, as it should be {grounded}.

F) ENABLE is periodic pulses on DC.

G) REGSEL is a mess, with some AC signal giving all the pulses on pin 4 "a ride".

I have no coupling except what's supplied on the CHI030B "project" board. A high-ish res macro picture is posted here.

--frankb
 

Rick100

Senior Member
Hello franklynb,

The link you posted didn't work for me. Here's a working link.
https://www.flickr.com/photos/55342004@N06/21554600783/


I think you may have more than one problem but the board you are using has a uln2803 darlington inverter on the portB outputs. It inverts the signals and is open collector. Here's a link for using it without the uln2803. You need to remove the chip and add some jumpers.
http://www.picaxeforum.co.uk/showthread.php?27255-CH1030-Project-Board

Also it looks like you're using two power supplies. I would just use one. Simplify as much as possible. The fewer connections the better.

Edit:
I just noticed your 2nd power supply voltage is 4.1 volts. That's very low for an lcd display.

Good luck,
Rick
 
Last edited:

franklynb

New Member
Hello franklynb,

The link you posted didn't work for me. Here's a working link.
https://www.flickr.com/photos/55342004@N06/21554600783/
Thanks Rick. Another forum I use works just the opposite, requiring BBCODE. Forgot to check.
I think you may have more than one problem but the board you are using has a uln2803 darlington inverter on the portB outputs. It inverts the signals and is open collector.
So, the net effect would be that the control signals might work, but the data would be munged by inversion? Just trying to understand the full consequences of my choices.
...
Edit:
I just noticed your 2nd power supply voltage is 4.1 volts. That's very low for an lcd display.
The Han data sheet says that the minimum voltage is 3.1V which is about where I find it {the backlight} going into cutoff. Its just a separate supply leg dedicated to the backlight.
Still think its a bad idea?

--f
 

franklynb

New Member
Darlington replaced with jumpers. marks post #12 program running. data on all eight B ports verified by scope.
Same blocks as shown here. Mystery prevails.

--frankb
 

Rick100

Senior Member
Hello frankb,

Sorry for the short reply last night. I was on my way to work, when I noticed the picture you posted didn't match the code you referred to. It looks like marks code in post 12 uses C.6 as enable and C.7 as register select. Your original code used C.7 as enable and C.6 as register select, which is what the picture shows. As Goeytex said, the backlight seems to draw a lot of current, so maybe 2 supplies are the way to go.

Good luck,
Rick
 

franklynb

New Member
... when I noticed the picture you posted didn't match the code you referred to.
Thanks, and good eyes Rick.

I had changed the code, then re-loaded. So, indeed, they were mismatched. My older "LCDparallel.bas" program used the opposite assignment.

I switched it out. Same results: BUT ... in the process of cleaning up the voltage divider circuit so that I could more easily change resistor values,
I discovered the source of --at least -- the contrast problem.

I get the same low contrast value even with the jumper from 12Kohm to pin2 --REMOVED--. Which tells me that the "G" pin on the project board, which I'm using for
"Ground" at pin1 MUST have some residual leakage; which makes its way across the .15ohm resistor, providing an {untrusted value} .2V drop! While
my cheapie VOM shows such a value, that's a full amp of current! So I pulled it, and will return to the mystery later this evening.

Thanks for the second pair of eyes!

--frankb
 

franklynb

New Member
Rick and marks,

A quick "progess" report.

I found "a" problem. Chasing the contrast bug, and going back to the Hantronix application notes, I changed the B+ supply to the LCD to 5.1V,
unregulated, and updated the Vdd drop at pin 3 to a more reasonable value, ~.4v via a change in resistor pair values.

In the process of making the changes, I discovered the source of the "lack of contrast" problem. I suppose that the display is really meant to look like
this; or this image with lights off! The pattern shown is driven by removing the pin 1 link while marks#12 program is running.

Its random, as each connection to pin 1 "clears" the display {really -- decreases contrast level}, and subsequent connection+removal changes the
dispayed set through a group of 4? or 5? different "patterns of blocks".

Apparently, I have some sort of ground loop. Those images were both produced with no ground connection at pin1.

I measure the following DC offsets:

Code:
pin 6 - enable - darlington amp "uninstalled and jumpered"  - C.6 -     -1.45 V offset to B+
pin 4 -  r/w    -     ""                     ""             - C.7 -     -4.76 V ""       ""

That's 3.5V above ground potential on the enable pin! Its even worse with the darlington installed, picking up another ~2V of offset on pin 4.

Hmmm. Before I stuff a capacitor {or two?} in place to filter the DC, I figured I solicit thoughts of "root cause". Clearly something is broken, here.

--frankb
 

Goeytex

Senior Member
Root Cause ?

It is most likely your wiring. Are ALL grounds tied together at a common point?

It it were me I would rip it all apart and start over. And I would not even consider powering the back light until I got the module to initialize and display characters. Instead of hard wiring resistors for the contrast bias, I would use a 10K pot.

A "ground loop" seems to be a WAG on your part. More commonly we find a weak or even missing ground connection to one part of a circuit. The same can happen with with the supply voltage. Sometimes breadboard connections are not secure and can present a high resistance. The least amount of breadboard connections the better.
 
Last edited:
Top