Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Issues with programming Displaytech 162B

Status
Not open for further replies.

svendsved42

Newbie
Newbie level 3
Joined
Jul 27, 2022
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
55
I'm a student and would like some help programming an LCD display.
I'm currently working on a project where I'm trying to communicate data to an LCD Displaytech 162B through an PLC Siemens S1200.
I have misunderstood or overlooked something in my software, because nothing is showing on the display.

Hardware:
As mentioned, I'm programming the display with a Siemens S1200 PLC.
Power supply as well as the outputs of the PLC is 24VDC. Each of the outputs from PLC and power supply is voltage divided down to 5VDC (confirmed with voltmeter).

Pin 16: DB7 connected to PLC output as #Data_bit_3
Pin 15: DB6 connected to PLC output as #Data_bit_2
Pin 14: DB5 connected to PLC output as #Data_bit_1
Pin 13: DB4 connected to PLC output as #Data_bit_0
Pin 12: DB3 connected to ground
Pin 11: DB2 connected to ground
Pin 10: DB1 connected to ground
Pin 9: DB0 connected to ground
Pin 8: E connected to PLC output as #EN_1
Pin 7: R/W connected to ground
Pin 6: RS connected to PLC output as #RS
Pin 5: VO connected to potentiometer (potentiometer connected to 5VDC and ground)
Pin 4: VDD connected to 5VDC
Pin 3: VSS connected to ground
Pin 2: LED- connected to ground
Pin 1: LED+ connected to 5VDC

Software:
Is written is Siemens SCL.
Initialization:
Sequence is
Pre-initialization x 3
Pause
4-bit mode - 1 line - 5x7 font.
pause
Display Clear
pause
Return Home
pause
Display on - Cursor off - No blink
pause
Increment - No shift
pause
DDRAM

Timing sequence:
Capture1.PNG


Initialization code:
Sorry the code is so long, but an PLC does not work like a computer, so the timing had to be spelled out and following a timeline.
See comment below

Display data:
So just for simplifying the communication of data I wanted to write the number "9" on the display.

Sequence:
Clear display
pause
Return home
pause
Data

Timing sequence:
Capture2.PNG


Date code:
See comment below
--- Updated ---

Attached code
 

Attachments

  • Picture1.png
    Picture1.png
    20.2 KB · Views: 146
  • Initialization.txt
    19.9 KB · Views: 146
  • data.txt
    7.5 KB · Views: 137
Last edited:

I don't know how to evaluate your pin connections or code, but I understand LCD displays (perhaps early types) need continual hi-frequency AC waveform applied in some fashion?
Is yours that type?
 

Hi,

Is this a HD44780 compatible ASCII display, 2 rows, 16 columns?

If so you need to read the HD44780 datasheet. Especially the timing charts.

Issues (I guess)
Timing is related to the falling edge of "E". Thus all other signals have to be stable at this edge. But in your case all signals change state.

Please tell what type of PLC outputs you use: relay (bouncing), or non bouncing transistor output.
If transistor output: open emitter, open collector, with or without pullup/pulldown resistor, push-pull .... or any other.

Btw: if you show a timing diagram, then please also show the time scale.

********
Hopefully this is a school project, and no commercial project.
In my eyes it makes no sense to control a display this way with a PLC. Better use a dedicated, intelligent PLC display.

Klaus
 

Hi,

Is this a HD44780 compatible ASCII display, 2 rows, 16 columns?

If so you need to read the HD44780 datasheet. Especially the timing charts.

Issues (I guess)
Timing is related to the falling edge of "E". Thus all other signals have to be stable at this edge. But in your case all signals change state.

Please tell what type of PLC outputs you use: relay (bouncing), or non bouncing transistor output.
If transistor output: open emitter, open collector, with or without pullup/pulldown resistor, push-pull .... or any other.

Btw: if you show a timing diagram, then please also show the time scale.

********
Hopefully this is a school project, and no commercial project.
In my eyes it makes no sense to control a display this way with a PLC. Better use a dedicated, intelligent PLC display.

Klaus
Hello Klaus. Thank for the reply.
I'm an Automation technician apprentice, so I'm not familiar with the transistor types, but the output are transistors. I have emailed siemens tech support for more information.
I will start with offsetting the timing between E's falling edge and data falling edge.
Edit* By the way I would imagine the transistors are PNP because of the 24VDC common line
 
Last edited:

Hi,

you didn´t answer my "display type question".

and: is it a school project .. or for professional use?

***
I recommend to post a link to the dispaly´s datasheet
Also I recommend to post a schematic or sketch with the voltage dividers for signals and power supply. With part values.

Klaus
 

Hi,

you didn´t answer my "display type question".

and: is it a school project .. or for professional use?

***
I recommend to post a link to the dispaly´s datasheet
Also I recommend to post a schematic or sketch with the voltage dividers for signals and power supply. With part values.

Klaus
It's only for school project :)
I have attached the datasheet below, but no info about HD44780 compatible.
 

Attachments

  • datasheet.pdf
    402.7 KB · Views: 167

Hi,

O.K. datasheet does not tell about HD44780 compatibility ... but indeed this is what I guessed.

****
School project: thanks god. ;-)

****

You need to keep on "Write mode timing" page 4 and page 5.
In the timing diagram you see that first you have to apply RS and RW, then E_rising ...

One - maybe complicated - thing is: The timing of DATA.
It says: it needs to be stable 120ns after E_rising. (latest possible timing)
Since the PLC timing can not work precisely down to 120ns ... you should go the safe way and make DATA stable before e_rising.

thus: (each "*" is one PLC step)
* output RS, and DATA (RW is fix)
* output E rising
* output E falling
* ...

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top