6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 10:37 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Fri Apr 23, 2021 1:00 pm 
Offline

Joined: Fri May 06, 2005 1:02 pm
Posts: 17
Location: Limerick, PA
As I look across different 6502 projects I see two different methods of connectivity for Character LCD displays. Some projects show them hanging off the ports of a VIA and some projects have them directly on the system bus with the enable being driven by address decoding.

I plan on using a 4 x 20 character display that I have here in a drawer, standard 4 bit interface, nothing fancy. In my mind if I have the address space (or granular control of the address space) it would be more efficient to put the display right on the bus vs. on a VIA and be able to keep that VIA port available for other uses but not sure if I'm missing on a benefit of leveraging the VIA?

Thoughts, comments, is it really just a preference thing?


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 23, 2021 1:07 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Check the datasheet, if you have it. I think there's a chance the LCD will be quite slow, which is fine if you drive it from a VIA, but means you need to deal with RDY or with clock-stretching if you drive it directly off the bus.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 23, 2021 6:39 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
I've done both; but I've only put it directly on the bus, as Ed says, in a computer that ran intentionally very slow to save battery power. It spent most of its time at 170kHz IIRC, and I kicked it up closer to 1MHz when there was a string of floating-point operations to perform, so the user wasn't left waiting. The whole computer, including the LCD, took only a couple of mA. I'd have to review the data sheets again; but I think having the LCD directly on the bus is going to limit you to 1MHz or less, unless you have a lot of wait states.

_________________
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: Fri Apr 23, 2021 7:08 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Gurft wrote:
[....] and be able to keep that VIA port available for other uses

Even with the LCD attached you may still be able to attach other device(s) to the same 4 port lines. As a simple (though perhaps unlikely) example, you could attach *two* LCD's.

Of course, the VIA would also have to provide a Strobe or Write signal to each LCD, and these signals would have to be unique to each LCD, not shared. But the total number of pins for two LCD's would be 4+2 = 6 port lines -- not 4+1 + 4+1 = 10. I hope that explanation makes sense! :P It would also be possible to attach a device driving data in the other direction, using the 4 VIA lines as inputs.

Just thought I'd mention these possibilities. I'm not saying you ought to multi-task some of the VIA port lines, but the idea may be appealing, depending on your own priorities.

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 23, 2021 7:41 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
...continuing on what Jeff said above: You can hang an awful lot of stuff off a single VIA if you work it right. As I put in the I/O ICs page of the 6502 primer, I have eight things on VIA #1 of my workbench computer:

  • LCD
  • 5-key keypad
  • beeper
  • printer port
  • T1 interrupts for software real-time clock and calendar with 1/100th-second resolution
  • I²C port
  • triggering the A/D converter (which puts the data on another VIA)
  • "Abort" button (like Reset but less drastic)
  • and a synchronous serial port for things like my analog oscilloscope raster-graphics display

connected as shown in the diagram on that page, which is from my 3x5" mini ring binder. Since the tiny page is so full, some of the info I would like to have here is on other pages. The main thing I wanted to show however is how the printer, LCD, and keypad are connected.

The point is that connecting an LCD through a VIA does not require dedicating a whole VIA or even half of one.

_________________
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: Fri Apr 23, 2021 9:34 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Acorn's BBC Micro also does a lot with one of the VIAs:
- joystick button inputs, and lightpen strobe
- ADC completion signal
- two bits to control video's memory map
- * TMS5220 speech chip (optional)
- * sound chip
- * keyboard scanning and control
- 2 keyboard LEDs
- vertical sync indication (for a per-frame interrupt)

The three marked with * sit on an 8 bit databus which uses the A port. On the B port, four bits are used as inputs to a 74LS259 which gives (I think) 8 bits of set/reset control, which are in part used as chip selects and write enables for devices on that slow bus.

The keyboard itself is a bit complex, and includes an 8 bit readable DIP switch for boot options.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 46 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:  
cron