6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 16, 2024 8:37 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sun May 11, 2014 3:22 am 
Offline

Joined: Wed Oct 08, 2003 1:15 am
Posts: 25
Location: Florida
Hello folks,
have not visited this forum in six years, so I am probably out of touch.
Have been using one line 20-charcter alphanumeric displays, 1/2 high characters, such as Optrex, Samsung for 25 years. Never had any problem with initialization.
Unfortunately, none of these are available any longer.
All I can get in 1/2 inch height characters now is Newhaven Display, 16-character.
Smaller height character displays are useless in industrial environment.
Problem is that my 65C02 program, that has worked flawlessly with all previous displays, will not initialize this Newhaven display. The specs about initialization, provided by Newhaven is just plain bad, inadequate, confusing.
Newhaven is a Chinese (not Taiwan) company and I have to conclude there is no one there who knows how their displays work, they are just making them. None of their software examples work.
I am also using Microchip microcontrollers (for example PIC16F877A) in some of my products, programming them in MicroEngineering Labs, using their PicBasic. This program initializes and drives the Newhaven displays perfectly. Unfortunately, the PicBasic compiler does not give me output in assembler that would show me how they are initializing it. If it did, I could simply convert it into 6502.
I would welcome any suggestions.
Here is the the display spec:
http://www.newhavendisplay.com/advanced ... cription=1


Top
 Profile  
Reply with quote  
PostPosted: Sun May 11, 2014 4:10 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
Icy wrote:

It says, "Controller/Driver: ST7066U", which I don't think I've heard of. If you have, or can convert, the code to work with the common HD44780 LCD ICs, you'll have something that will work with intelligent character LCDs that everybody and their dog makes. The LCD section of the potpourri page of my 6502 primer shows a 4-bit interface to the common LCDs, and there's a link there to working 6502 code for 4- and 8-bit interfacing to these through a 6522 VIA. I can send you PIC16 assembly for it also.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sun May 11, 2014 3:01 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
There is a data sheet for the ST7066U located here:
http://www.futurlec.com/LED/ST7066U.shtml

It has some example initialization code. It might help you understand what is needed.

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Mon May 12, 2014 2:54 am 
Offline

Joined: Wed Oct 08, 2003 1:15 am
Posts: 25
Location: Florida
Hello Garth,
we have exchanged emails in past.
My 6502 code works flawlessly with Hitachi HD44780 LCD controller.
The problem is that Newhaven display is using a new Sitronics ST7066U LCD controller.
They are supposed to be equivalent, since the new Sitronics chip copied the Hitachi specs to the letter, passing the specs as their own. I think this is the problem, these chips are not equivalent.
The problem I have with using my 6502 program to operate Sitronics LCD controller is that I can't get the second 8 characters of 1*16 display show in second half of the display. They will always show in first half, overwriting what should be there. Second half of the display will be blank, no matter what.
To pinpoint the problem, I cannot direct the starting line of second half of display to location #$C0.
In MicroEngineering Labs PicBasic, this is no problem at all. Apparently, they have figured a way to do is somehow, in spite of bed Sitronics specs.

PicBasic code to control mu LCD is very simple, here are pertinent parts:

DEFINE LCD_DREG PORTB ' data = portB
DEFINE LCD_RSREG PORTA ' Register Select = portA
DEFINE LCD_RSBIT 1 ' RS
DEFINE LCD_EREG PORTA ' Enable
DEFINE LCD_EBIT 2 ' Enable
DEFINE LCD_BITS 8 ' 8-bit bus
DEFINE LCD_LINES 2 ' 2 line display
DEFINE LCD_COMMANDUS 10000 '
DEFINE LCD_DATAUS 100 '
.
.
.
Lcdout $FE,1
' PAUSE 250 ' don't need the pause
Lcdout $FE,128, disbuf, disbuf5, disbuf6, disbuf7, disbuf8, disbuf9, disbuf10, disbuf11
Lcdout $FE,192, disbuf12, disbuf13, disbuf14, disbuf15, disbuf16, disbuf17, disbuf18, disbuf19

By the way, I have R/W pin grounded, since I do not read the busy flag, I have enough delays there.
If I had Microchip version of this in assembler, I would easily convert it to 6502 assembler.
You mention you could send me PIC 16 assembler version, that would be a great help!
Here is the email:
ic@automatedsonix.com

I need to make it work since I have no plans to replace 6502 with PIC microcontroller for my bigger, existing products. 6502 work works very well in industrial applications, since I have started using old Rockwell NMOS '02 and '22. They are practically indestructible. I have bought a lots of these old chips. CMOS chips are too sensitive to electric spikes, that are commonplace it heavy industry. I don't use WDC chips any longer.
Regards,
Ike Cagan


Top
 Profile  
Reply with quote  
PostPosted: Mon May 12, 2014 3:51 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
It sounds like you pretty much know what you're doing. The only thing I can think of is that most 1x16's are connected to the dot rows and columns as two 1x8's end to end, whereas this one might truly be connected like a 1x16, meaning character position 8 will really be 08 instead of $40. I'll send the PIC assembly when I get to my other computer. It's for a 2x16, so addresses are 0-F and $40-4F. Although there's probably very little different from what you're doing, it might give some confirmation. Actually, come to think of it, I have it in Forth too, since I made a fixture before designing the product in order to test the many different brands of LCDs I have here and make sure they really are compatible so we wouldn't find ourselves locked into a single source of the right combination of mechanical and programming specs.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: BigEd and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: