6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Sep 20, 2024 5:26 pm

All times are UTC




Post new topic Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Wed Sep 27, 2017 12:03 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 588
Location: Michigan, USA
Is an LCD 'backpack' out of the question? Lots of possibilities (I2C, SPI, Serial, custom). Here's a design that drives the LCD in 8-bit interface mode while using a 2-pin interface to the host.

Image


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 27, 2017 12:11 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 362
Hmm. Yes, switching out to an SPI based interface would work, I've already got an SPI bus going on the board and I do have a spare SPI CS pin. Obviously it'd be slower than directly writing to the chip, but that is a possible solution certainly.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 27, 2017 12:33 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8510
Location: Southern California
Alarm Siren wrote:
GARTHWILSON wrote:
(at 5MHz) handles the LCD (plus five other things) through the first VIA

I only have one VIA and there isn't enough pins left on it to drive the LCD screen. I would very much rather not add a second VIA to the system if I can avoid it as VIAs are not cheap components, and they take up a lot of space (relatively speaking compared to a couple of logic gates).

I use a single VIA for:
  • LCD
  • 5-key keypad
  • beeper
  • printer port
  • T1 interrupts for software real-time clock, calendar, and alarms with 1/100th-second (10ms) resolution
  • I²C port
  • triggering the A/D convertor (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
all at the same time.

As for room, you can put other ICs under the VIA:
Image

ICs under ICs are slightly visible in this photo also:
Attachment:
WM-1testboard2.jpg
WM-1testboard2.jpg [ 61.62 KiB | Viewed 1271 times ]

But really, for the amount of work you're going to put into it, the price of a second VIA is peanuts. Using the LCD in its 4-bit interface is easy, and probably won't be any less efficient than trying to manage it through other parallel logic which may slow your maximum clock speed down anyway, and certainly won't be as slow as doing it through SPI if you have to bit-bang it (although I do like SPI, even bit-banged!). Michael's idea using the '595 could be pulled off with the VIA's serial port, shifting at half the phase-2 rate without the processor having to bit-bang. In fact, I've done the following to get well over a hundred output bits from the VIA's SR (shift register):

Image

Similarly, you can also use the VIA's SR for tons of input bits:

Image

or even both inputs and outputs on the same VIA SR, at the same time, using a 74xx126 section to stop the final 165's output when you're outputting to the 595's, to prevent contention.

It's all in the 6502 primer.

If I seem a little feisty, it's because a rather new tire with no apparent previous damage blew out on our son's van a few hours ago on the freeway and he fishtailed and rolled the van over and over. It's a total loss. Fortunately he's not hurt.
Attachment:
rolledVan1.jpg
rolledVan1.jpg [ 47.72 KiB | Viewed 1271 times ]

_________________
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: Wed Sep 27, 2017 12:47 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 362
GARTHWILSON wrote:
I use a single VIA for:
[snip]
all at the same time.

I know one can, unfortunately in this case, its not a matter of being unable to, I just don't want to.

GARTHWILSON wrote:
As for room, you can put other ICs under the VIA:

Not with an SMD VIA.

GARTHWILSON wrote:
But really, for the amount of work you're going to put into it, the price of a second VIA is peanuts. Using the LCD in its 4-bit interface is easy, and probably won't be any less efficient than trying to manage it through other parallel logic which may slow your maximum clock speed down anyway, and certainly won't be as slow as doing it through SPI if you have to bit-bang it (although I do like SPI, even bit-banged!). Michael's idea using the '595 could be pulled off with the VIA's serial port, shifting at half the phase-2 rate without the processor having to bit-bang. In fact, I've done the following to get well over a hundred output bits from the VIA's SR (shift register):
[snip pic]

Similarly, you can also use the VIA's SR for tons of input bits:
[snip pic]

or even both inputs and outputs on the same VIA SR, at the same time, using a 74xx126 section to stop the final 165's output when you're outputting to the 595's, to prevent contention.


Well, the parallel logic design above which introduces waitstates should only slow down the processor when its actually accessing the screen, and it will make the software a lot simpler - no bit-banging of any kind. I think there's pros and cons to both approaches.

I'm already using the VIA SR in exactly this manner to drive the keypad and status lights. I would rather not overload it with having to manage the screen as well.

GARTHWILSON wrote:
It's all in the 6502 primer.


Perhaps it might surprise you to learn I have read your entire primer multiple times. Not to mention several other parts of your website. I cannot describe how useful they've been. Nevertheless I am a relative newbie to all this and I like to get other people's opinions on things before I spend vast quantities of money getting PCBs made. Earlier in this topic with Jeff's help we got the decoding logic down from 10 chips and a 5-chip large prop delay to 3 chips and a 2-chip prop delay, so it was clearly worth it.

GARTHWILSON wrote:
If I seem a little feisty, it's because a rather new tire with no apparent previous damage blew out on our son's van a few hours ago on the freeway and he fishtailed and rolled the van over and over. It's a total loss. Fortunately he's not hurt.


I am very sorry to hear that, but I am glad he is OK. I can definitely sympathise, having had my fair share of crashes, scars included.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 27, 2017 7:50 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
Glad everyone is OK Garth.


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 29, 2017 5:36 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8389
Location: Midwestern USA
GARTHWILSON wrote:
If I seem a little feisty, it's because a rather new tire with no apparent previous damage blew out on our son's van a few hours ago on the freeway and he fishtailed and rolled the van over and over. It's a total loss. Fortunately he's not hurt.

Yikes! Good to hear he's okay.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 01, 2017 3:12 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 588
Location: Michigan, USA
There's been mention in the past of using a ROM or RAM chip for address decoding but I haven't seen it used. Could this be a viable decoder solution for lower speed systems? Could a 55-nS Parallel Flash chip decode fast enough for a 4-MHz system?

Cheerful regards, Mike

PS: Happy to hear your son is ok, Garth.


Attachments:
decoder rom 2.png
decoder rom 2.png [ 226.54 KiB | Viewed 1194 times ]


Last edited by Michael on Sun Oct 01, 2017 3:44 pm, edited 1 time in total.
Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 01, 2017 3:40 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 362
In that circuit, there's nothing to mask off the A14-A16 lines from the RAM when accessing the Standard RAM area. You'd need a multiplexer controlled by the decoder ROM, or perhaps sacrifice three of the I/O chip selects in order to "pass through" the A14-A16 lines when appropriate (there's some spare address inputs on the decoder ROM so it could be done). Also I've not come across ROM chips that are that quick, but I assume they must exist.

How are you making these diagrams? they're absolutely beautiful :D

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 01, 2017 4:07 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 588
Location: Michigan, USA
Sorry! The memory map insert was incorrect. That drawing is for your design with two RAM chips so the 128K RAM is only selected when the 6502 addresses the $8000-BFFF block.

* Drawings are from Microsoft Excel


Attachments:
decoder rom 2.png
decoder rom 2.png [ 229.44 KiB | Viewed 1185 times ]


Last edited by Michael on Sun Oct 01, 2017 6:12 pm, edited 1 time in total.
Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 01, 2017 4:23 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 588
Location: Michigan, USA
As you noted, supporting a single 128K RAM chip instead of two RAM chips would require giving up some of the decoder I/O chip select outputs...


Attachments:
decoder rom 1.png
decoder rom 1.png [ 250.89 KiB | Viewed 1138 times ]


Last edited by Michael on Mon Oct 02, 2017 5:05 pm, edited 2 times in total.
Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 01, 2017 8:35 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 362
Such decadance I have to try. Pray explain how Excel can be coaxed into making such images.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 02, 2017 12:37 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8389
Location: Midwestern USA
Alarm Siren wrote:
Also I've not come across ROM chips that are that quick, but I assume they must exist.

I use 55ns UV-erasable EPROMs in my POC units. Atmel makes a 45ns OTP ROM, which I've also used in my POC units. I believe that is currently the fastest ROM available from production stock.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 02, 2017 5:37 pm 
Offline

Joined: Sat Jan 02, 2016 10:22 am
Posts: 197
You can get 45ns, 5v flash from Microchip, provided you don't mind using PLCC parts.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 03, 2017 2:19 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 588
Location: Michigan, USA
Still fleshing out ideas. I wonder if anyone other than Jeff (Dr Jefyll) recognizes the bank select method in the crude design below?


reference: Ultra-fast output port using 65C02 illegal instructions


Attachments:
decoder rom 3.png
decoder rom 3.png [ 391.65 KiB | Viewed 1078 times ]


Last edited by Michael on Thu Oct 05, 2017 11:33 pm, edited 2 times in total.
Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 03, 2017 5:12 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 362
I recognise it. I did very seriously consider using something like it, but I decided that it was important that the bank bits be readable as well as writable so that subroutines / interrupts can save and restore them. For your CLKGEN is that a PIC?

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

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