6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Apr 29, 2024 5:32 am

All times are UTC




Post new topic Reply to topic  [ 163 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next
Author Message
PostPosted: Sun Oct 10, 2021 8:39 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 703
Location: Texas
[ Version2 of this board is now on a new topic located here: viewtopic.php?f=12&t=6868 ]

Hello everyone, my name is Chad, I'm very new here, this is my first big post (besides the Intro topic).

This will be my first computer. I'm designing a 65C02 uP + 62256 SRAM + 28C256 EEPROM+ 65C22 VIA computer, probably clocked around 1 MHz. My guidebook has been Garth's "potpourri" page:

https://www.wilsonminesco.com/6502primer/potpourri.html

With a configuration very similar to this one, I'm wanting to interface the 6522 with:

1) A 20+ button keyboard (16 plus some more for controls/options/etc)

2) A larger 128x64 LCD, 8-bit parallel input if at all possible for speed purposes.

3) A SPI interface for an SD card.

The keys could be put into whatever column-row configuration that is most efficient. 4x5 is easy but 2x10 is possible I think. I'm not picky about 20 keys exactly, but definitely 16 at absolute minimum.

I've been reading that PB's shift register won't work with the SPI interface (easily) and Garth's page recommends using PA to "big-bang".

I see also that the 128x64 parallel LCD's I'm looking at have 20 pins on them, though not all should be used. Here is something I'm looking at, there are a ton of these things, but this is just a basic idea to get us on the same page:

https://www.winstar.com.tw/products/gra ... aphic.html

So 8x Data pins, 2x Column Select pins, 1x Data/Instruction pin, 1x Enable pin, I think the rest do not need to be connected to the 6522.

Lets do a running total:

SPI -> 4 pins
LCD -> 12 pins
Keys -> 4 input pins, 5 output pins. Garth has a 16 key 4x4 configuration.

So, 4 + 12 + 4 = 20 pins, which is just at the max of the 6522.

An alternative is to write to the LCD using SPI or some other serial method, but I fear it not refreshing very well. I have zero experience with them, besides that my TI-83 has a quite terrible refresh rate. I'm wanting to be able to use it for small video games or demos, so the refresh rate is very important.

Recommendations about what should go where? SPI and Keys on PA, while LCD goes to PB? Would the shift register in PB be useful for serial LCD data transfer?

Lastly, I have never used a 6522, but by Garth's suggestion I'm trying to implement it in my design. It is an incredibly power IC but I don't know how to harness that all yet.

Thank you all for any suggestions!

Chad


Last edited by sburrow on Fri Nov 12, 2021 8:55 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 10, 2021 9:31 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1399
Location: Scotland
Hi,

(welcome and all that)

Sounds like an exciting project!

One thing to consider; You may be able to re-use e.g. 8 outputs pins that you use for data to the display for 8 (or less) output pins to strobe the keyboard - by not toggling the strobe or CS lines to the display, you can set those 8 outputs as you like, so then an 8x3 matrix is easy to achieve (and gives you space for more keys if needed)

Also note that the 2 pins CA1 and CB1 are inputs which can only be read from an interrupt. (At least I think that's right, there is no way to read them asynchronously)

So 8 outputs for display + keyboard.
4 more for the control lines for the display.
4 for the SPI

You then need 3 more pins for the keyboard in input mode and I'd be tempted to look at the 4 display control lines - if they're never driven by the display then you could e.g. put pull-ups on them, switch those pins to input mode pulse each of the 8 display pins and poll the inputs to read the keyboard matrix.

Things can go wrong when you push a button at the same time as you update the display though - at the worst you'll effectively short an output high pin on the VIA to an output low pin through the switch, so current limiting resistors may be prudent, but of-course the display may then suffer some corruption...

Looking at the schematics for the KIM-1 may give you more ideas though - a lot of the early SBCs like the KIM/Junior and I'm sure others have interesting ways to scan a keypad and drive up to 8 x 7-segment displays using latches and buffers.

Cheers,

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 10, 2021 9:54 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 703
Location: Texas
drogon wrote:
Things can go wrong when you push a button at the same time as you update the display though - at the worst you'll effectively short an output high pin on the VIA to an output low pin through the switch, so current limiting resistors may be prudent, but of-course the display may then suffer some corruption...


Thank you Gordon, I appreciate the reply. I really like the idea of using the input for both LCD and the 8x3 keys, that should put me in range of what is possible on the 6522.

Say that perhaps I put a 74HC245 in front of the keys. It should then never have a problem colliding with the LCD, right? I'm not wanting to increase chip size if at all possible, but the double usage of those 8 data pins is such a great idea.

I saw the Micro Kim some days ago, it is very compact and has a great layout. Looking quickly at the schematic, I think I see 3 strobe lines for the keys, and 7 outputs running through some TTL chips, thus unidirectional. Interesting! Could I use the same 8 output lines for the LCD as 8 input lines for the keys, or would that just increase 6522 instructions and slow down the process too much?

Thank you again!


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 11, 2021 8:18 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
sburrow wrote:
I see also that the 128x64 parallel LCD's I'm looking at have 20 pins on them, though not all should be used. Here is something I'm looking at, there are a ton of these things, but this is just a basic idea to get us on the same page:

https://www.winstar.com.tw/products/gra ... aphic.html

So 8x Data pins, 2x Column Select pins, 1x Data/Instruction pin, 1x Enable pin, I think the rest do not need to be connected to the 6522

  • Two pins are for the LED backlight; so those won't need to go through the VIA.
  • One pin is for RST\, so you can connect that to the system's RST\.
  • One is for the viewing angle (called "contrast adjustment," but it's really to get the best contrast for the desired viewing angle, so I wish they'd just call it "viewing angle"), and that will typically go to a pot of some kind, although another way is to control it digitally through a D/A converter.
  • Electrically, it appears to be two LCDs in one, so there's an enable line for each. The R/W, RS (register select, ie, data versus instruction), data lines, and the others are all in common with each other.
  • I don't see anything telling about the VEE or the instruction set at the link. It says VEE is an output; but I suspect it's a negative voltage input for the backplane, as is common with supertwist LCDs, and that you'll have to supply a negative voltage. That won't come from the VIA either.

So the VIA connections would be identical to those of a 40x4 intelligent character LCD which is electrically like two 40x2's, one on top of the other, which I've used.

Here's one idea for connecting the things you want to a single VIA, with a little bit to spare:
Attachment:
ChadsVIA.gif
ChadsVIA.gif [ 82.64 KiB | Viewed 11172 times ]

There are 24 keys, electrically arranged as 8 rows by 3 columns. The 8 rows are fed by the '138. There's a Schottky diode in series with each keyswitch so there's never any contention. I forgot to draw in the pull-up resistors on the 3 columns. If you want more switches, one possibility is to make one of the keys a shift key, to double up on functions of the other ones. Keys will have to be debounced in software of course, and a shift key would never get auto-repeat, and maybe only cursor keys would get auto-repeat.

There are select lines for two SPI devices. If you want to put half a 74HC139 section in there, you could make it three (with the fourth combination meaning "deselect everything." You can't operate the SPI port at the same time you're scanning the keypad or feeding the LCD, but I doubt that will be any problem. There's probably a way to further multiplex things to get a printer port on the same VIA. What's another VIA though. I have three on my workbench computer; and if ever get around to building my next one, it'll have four.

The LCD's register-select input is on the same line with the I²C clock; but it should not be a problem as long as you don't try to feed the LCD while something is still selected on I²C. The I²C start condition is made when you take the data line down while the clock line is high. As long as you keep these things in mind, everything should play happily. The VIA's various registers let you do what you need.

The VIA's own hardware synchronous serial port, or "SR" for "shift register," is useful for interfacing to chains of I/O bits on ICs like 74HC595's, 74HC165's, 4094's, and 4021's. CB2, the data line, also enables the '138 when you want to scan the keypad. It should seldom if ever be a problem that you can't keep the SR port going while scanning the keypad. The beeper is one of those .015"-thick ones like you find in greeting cards. It's like a tiny brass speaker, using AC to drive it, not DC, so PB7, outputting a square wave, either under software control or toggling PB7 each time T1 in free-run mode times out, determines the beep frequency. I put the inverter and 470Ω resistor in there as a buffer, so the piezoelectric element's capacitive load doesn't cause problems.

I use T1 (timer/counter 1) in free-run mode on the same VIA to produce interrupts for my real-time clock for time of day, calendar, alarms, and timing various short intervals, and feed the beeper in software instead of from T1.

Hopefully I didn't overlook anything.

_________________
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: Mon Oct 11, 2021 10:57 am 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 703
Location: Texas
GARTHWILSON wrote:
What's another VIA though.


Quote of the year!

Thank you Garth, that is amazing. Simply amazing. And, just to be 100% sure, I'm attaching my addition of the pull-up resistors for the columns. Are they correct? It's attached at the bottom I believe.

So you are correct about that LCD. Apparently the one I grabbed is not like others! Some have two column/controller selects, some have none at all, but ALL of them have an enable. Can I ask why it's important to not simply ground R/~W? I have seen many configurations where folks ignore the reading of the LCD because it's mostly insignificant. Assuming I will have the 2 separate selects AND an enable, could I just replace the R/~W line with Enable in this layout? Attaching the ~RST to the 6502 was a great idea!

This is what I was using as my basis of understanding the 2 select lines:

https://www.engineersgarage.com/128x64-graphical-lcd/

Cool to have 2x SPI interfaces. Makes sense too! I'm definitely going to use something like this on one of them:

https://lastminuteengineers.com/arduino ... -tutorial/

I actually already bought some of these, and will be testing on my Rapsberry Pi soon. An excellent tutorial I found is here:

http://elm-chan.org/docs/mmc/mmc_e.html

I don't know exactly what I'd use an I2C interface for, but I have seen those around while I've been searching. If it fits, sounds like a good idea.

For the "Sync Serial" 6522 SR lines, I am lost as to what I'd use them for, as far as I am going. Again though, with the I2C, if it fits and doesn't use other chips, that's not a bad idea.

The beeper is a SUPER cool idea. And looks easy to implement. Thank you for that Garth.

Garth, I remember reading on your message on the introduction forum page how you were working on a big project for your job, and the boss kept asking for more features, and you kept putting them in. Feature creep. Though most of this seems completely possible and even easy, I'm still slow to toss too much on at once.

And Garth, a general theoretical question: For the SPI connections, why use PB1, PB5, and PB6? Could PB1, PB2, and PB3 have worked just as well? Similarly for many of the pins, why those specific ones, and not others? Again I'm new the VIA (and all of this), and I know PA and PB are different, but are pins WITHIN PB different from one another? And different enough that you decided on this configuration vs some other one? Just a theoretical question.

Now onto my general comments about my project:

1) It seems that 10cm x 10cm boards are MUCH cheaper than say 11cm x 11cm boards. So much so that I am thinking of trying to fit everything onto two 10x10 boards. Attached is a schematic I threw together last night in about an hour. Not all of the connections, resistors, capacitors, etc are complete, but this is a general idea. I'm using a '688 to find $7F00 for I/O which would be located on the second board (along with the 6522). Things will be TIGHT with just these, and I can't yet imagine how to fit 24 buttons on the next one along with the VIA and '138. The LCD will not be soldered onto any board, but will be connected with a ribbon cable to the second board.

2) I have been going back and forth a lot on what exactly I wanted this project to DO. So that you know, it's going to be on display at an event at the college sometime next spring, and as you know the best way to 'wow' students would be to put a video game on it. Pong or Tetris would be easy (and retro) enough. Because these boards are only 10x10 anyways, I'm considering making it "handheld". It would be look somewhat like a cross between a Game Boy and TI calculator, though bigger of course.

All that being said, I'm trying hard to keep chip count down. With that in mind, I have been back and forth on this cool IC I found on Jameco a while ago:

https://www.jameco.com/z/74C923-Major-B ... 44572.html

They have hundreds of these things, and like nobody else has them as far as I can see. Odd! Probably obsolete. But seeing how this is not much bigger than a 74HC138, could something like this simplify circuitry? Perhaps (dare I say it), it could even replace the VIA? Hear me out for a second: Seeing I'd have $7F00 through $7FFF free, I could use $7F00 (or $7FFE depending on high/low enables) and just run A0 into this chip? Similarly with the SDI and LCD enables and selects, just run address lines directly into these guys, through a '245, given that the '688 is telling me we are in I/O space. I'd be WASTING a lot of addresses, but the VIA is a huge chip for my small space. Thoughts?

As of now I'm going with the 6522 plan Garth has made, with little to no modifications.

Thank you Garth, and thank you all!


Attachments:
Board1.pdf [82.64 KiB]
Downloaded 47 times
ChadsVIA-2.gif
ChadsVIA-2.gif [ 83.08 KiB | Viewed 11163 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 11, 2021 12:20 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 703
Location: Texas
Addition:

Attached is a quickly done schematic (check my timestamps) using Garth's 6522 plans. I have not put in I2C or Sync Serial components on this schematic, though I'm thinking of putting the I2C one in beside/in-with the SPI connector.

Not sure if I got the directions correct on the button matrix. I'm a little fuzzy on what's going where I suppose. Is the '138 an encoder or decoder?

I probably grounded something I shouldn't have, and I still don't have the capacitors needed for each IC, but this is the general idea.

Garth recommended DirtyPCB's, and they are cost-limiting me to 10cm x 10cm. If any of you know of a way to cheaply get a board that's larger, I can definitely put all this on a single board without space issues.

Thank you all!


Attachments:
BothBoards.pdf [241.78 KiB]
Downloaded 55 times
Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 11, 2021 5:18 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
Here's some things to think about...

First, the '138 is a decode chip, the 3 inputs are decoded to 1 of 8 outputs. Second, the LM809 does not provide a manual reset. It also actively drives the signal low and high... switching the output to ground will NOT give you a time delay on the Reset signal and may damage the chip itself. Perhaps use a DS1813 or look at another option that can provide both an active high and low reset, like a TI TL7705. Note that some chips use a high reset signal, like the NXP UARTS.

For some changes, perhaps use a resistor pack (SIP) for all of the CPU signals... RES, IRQ, NMI, RDY, SO, BE. You can then add a DS1813 and push-button switch for a Panic switch... a NMI routine can help recover a crash.

As you're quickly growing beyond Garth's simple circuit, why not consider a single 22V10 Glue logic chip? You can easily get qualified read and write signals, RAM and ROM selects and 5- I/O selects. You'll also maximize the available RAM and ROM and keep the main CPU board at a low chip count.

Finally, adding a (D)UART would be a nice touch... you can have a console attached to a serial port on a PC and be able to debug things more easily by implementing a Monitor program.

I would also suggest to start with less I/O. The more you add to your first circuit, the more complicated it becomes. If you've never designed and built something like this before, less is more the first time around. It also helps to look at other's projects... that can help you figure out some bits that are known to work and even get some initial code that works.

Best of luck and do have fun... that's the main idea ;-)

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 11, 2021 5:51 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 703
Location: Texas
Thank you floobydust!

floobydust wrote:
Perhaps use a DS1813


Yes indeed! Garth has that exact one on one of his diagrams. When going through the Kicad library, I didn't see that one specifically, so I just picked something randomly. My intent was to use the DS1813 in the end. Thank you for telling me just how bad some random replacement could be!

floobydust wrote:
perhaps use a resistor pack (SIP) for all of the CPU signals...


So... I don't know why I would need to use more resistors for those signals. I was expecting everything at +5 V CMOS levels. I'm specifically using the W65C02, which I believe wouldn't need resistors for those particular lines, but maybe I'm wrong? Something else for me to research, thank you.

floobydust wrote:
why not consider a single 22V10 Glue logic chip


I just looked that up and I was... scared! I will look into this more though, but I definitely want to take one step at a time. I do like that it's so fast, and perhaps if I were to beef up my oscillator clock I would need to use this style glue logic for speed purposes alone. Having it decrease my chips onboard is helpful though, thank you for that suggestion.

floobydust wrote:
adding a (D)UART would be a nice touch...)


Indeed. I had been originally wanting to add an RS-232 port, kind of like the Micro Kim, but I actually found that no computer in my house actually has that port! Strange, had no idea. If I go and buy a PCI card with a serial port on it, then I'll definitely want to make that move. Thank you again for this suggestion.

floobydust wrote:
I would also suggest to start with less I/O.


I do understand what you are saying. I am definitely an novice at all of this, and have not soldered more than 4 little wires in my life. But, this is something I plan on doing eventually. I don't have a ton of money to spend on equipment and extra chips and whatnot. I was able to get some basic testing supplies and a breadboard, and that has helped a lot as well. Before I actually dive into buying the pcb's, I am planning on setting most of this up on a breadboard or two. At least connected to my Raspberry Pi's GPIO pins so that I can take a look at what's going on and simulate a bit here and there.

Ultimately I want to build a computer that is useable. If I were only going to use RS-232, 16x2 LCD, and a couple of switches that would be ok (that was my original thoughts on this project). I'll consider what you have said and be thinking about it as I keep going.

Thank you again for all of this good info!


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 11, 2021 6:14 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
Well, the resistor pack makes it easy to use those pins and the features they provide at some future point, you don't need to "slice and dice", just tack a wire on the pin and you're done. Specifically, I would highly recommend a Panic switch with the NMI line.

Serial port... yup, no modern PC uses them anymore, but you can buy a FTDI USB-UART adapter and use a UART for your project. I use these on my current projects as well. Take a look at my GitHub page at the C02 Pocket SBC. Several other ones are available and most can connect directly to the UART lines (TxD, RxD, RTS, CTS) and you just run a Terminal program on your PC.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 11, 2021 8:14 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8154
Location: Midwestern USA
sburrow wrote:
Attached is a quickly done schematic (check my timestamps) using Garth's 6522 plans...

In addition to what floobydust noted (n.b., pay attention to what he said about "less is more"—creeping featurism has probably doomed more projects than anything else), I see the following items:

  1. You have Ø1 and Ø2 on the microprocessor grounded. Those pins are outputs and must not be grounded. In the 65C02 data sheet, it is recommend you do not use them for anything.

  2. You have BE, NMIB and SOB all connected to Vcc. Better to have them individually connected to Vcc through 3.3K resistors. As floobydust noted, a resistor network is useful for this purpose. Also as he noted, use a DS1813 on NMIB with a push button. You can write a simple NMI handler that can recover from most crashes. I use that arrangement on my POC units, which has saved my bacon many times during programming sessions.

  3. IRQB on the 65C02 should be pulled up to Vcc through a resistor.

  4. /WE on the 62256 should be qualified with Ø2 to avoid a spurious write and possible corruption. The 65C02's data bus is not guaranteed to be valid during Ø2 low. As it is during Ø2 low when the address bus gets set up, asserting /WE during that time may result in an inadvertent write to the wrong memory cell while A0-A15 is in a state of flux.

Quote:
Garth recommended DirtyPCB's, and they are cost-limiting me to 10cm x 10cm.

I use JLCPCB.

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


Last edited by BigDumbDinosaur on Mon Oct 11, 2021 9:48 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 11, 2021 8:19 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8154
Location: Midwestern USA
floobydust wrote:
Serial port... yup, no modern PC uses them anymore, but you can buy a FTDI USB-UART adapter and use a UART for your project.

Or you can purchase an inexpensive serial I/O card to plug into a slot in a desktop PC. Startech.com has them—I use them in our servers when the server is configured to send and receive FAXes.

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


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 11, 2021 9:42 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 703
Location: Texas
BigDumbDinosaur wrote:
You have Ø1 and Ø2 on the microprocessor grounded. Those pins are outputs and must not be grounded. In the 65C02 data sheet, it is recommend you do not use them for anything.


Ah, so when I'm not using them, don't connect them to anything? I get scared not connecting pins! Thank you for that.

BigDumbDinosaur wrote:
Also as he noted, use a DS1813 on NMIB with a push button. You can write a simple NMI handler that can recover from most crashes. I use that arrangement on my POC units, which has saved my bacon many times during programming sessions.


Noted about the resistor network, I made the modifications just now. But as for this DS1813 on NMIB, I am confused. That LM809 is actually supposed to be a DS1813 at this point, and it's connected to RSTB. So am I supposed to have a second DS1813 connecting to NMIB? What is the difference in comparison with RSTB at that point? I know they can start at different memory locations, but it sounds like the same functionality that a Reset button would do? Sorry for the confusion, I'm new to this. I have never had times when I needed bacon to be saved yet!

BigDumbDinosaur wrote:
/WE on the 62256 should be qualified with Ø2 to avoid a spurious write and possible corruption.


I really thought that I had done that. 74HC00C is ~A15 NAND Phi0, connecting to the 62256 ~CS port. So I'm not using Phi2 because I'm using Phi0, as per the WDC guidelines to bypass Phi2 and simply use the external Phi0 instead. Am I wrong about that setup?

I'll be considering the feature creep, I don't want a project to be too overwhelming on my first go. Thank you.

Thank you for the help, this has been very educational already.

Oh, just checked on StarTech, and found something like this:

https://www.startech.com/en-us/cards-adapters/pci2s5502

In the end, that's not too bad a price, I'm just weighing the options to either include or exclude something like this. My thoughts recently have been to just save data onto an SD card, then just plug that into this computer to be read off into RAM on boot or something. A tiny bit slower, but the computer itself can modify that SD card as well. Pro's and con's.


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 11, 2021 10:25 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8154
Location: Midwestern USA
sburrow wrote:
BigDumbDinosaur wrote:
You have Ø1 and Ø2 on the microprocessor grounded. Those pins are outputs and must not be grounded. In the 65C02 data sheet, it is recommend you do not use them for anything.

Ah, so when I'm not using them, don't connect them to anything? I get scared not connecting pins! Thank you for that.

The data sheet is your friend. :D WDC has a description of each pin's purpose. 8) Inputs should not be left floating on any CMOS device. Outputs should be connected as needed, otherwise left unconnected.

Quote:
But as for this DS1813 on NMIB, I am confused. That LM809 is actually supposed to be a DS1813 at this point, and it's connected to RSTB.

The LM809 is not a substitute for a DS1813. The DS1813 will respond to its output (the reset line) being grounded. The LM809 is only input-voltage-sensitive and will not respond to something grounding its output. In fact, doing so may cause damage.

Quote:
So am I supposed to have a second DS1813 connecting to NMIB? What is the difference in comparison with RSTB at that point? I know they can start at different memory locations, but it sounds like the same functionality that a Reset button would do?

Again, the 65C02 data sheet is your friend—please thoroughly read it before you get too far along with your project.

NMIB (Non-Maskable Interrupt) is an active-low, edge-sensitive interrupt input, whereas RESETB is an active-low, level-sensitive input. Asserting RESETB starts the microprocessor (MPU) from scratch—RESETB must be briefly asserted at power-on for a proper start (note that all of this is explained in Garth's 6502 build tutorial).

Asserting NMIB interrupts a currently-executing program in a way that allows the MPU to later resume that program's execution once the event that caused the interrupt has been handled. Attaching a DS1813 (or similar device) with a push button to NMIB makes it possible to manually interrupt a running program when a logic error causes the program to put the MPU into an otherwise-unbreakable loop. In my systems, the NMI handler ultimately drops into the machine language monitor, which allows me to conduct a post mortem when something goes off the rails.

Quote:
Sorry for the confusion, I'm new to this. I have never had times when I needed bacon to be saved yet!

Not to worry—wanting to save your bacon will frequently arise as you develop software for your machine. :lol:

Quote:
BigDumbDinosaur wrote:
/WE on the 62256 should be qualified with Ø2 to avoid a spurious write and possible corruption.

I really thought that I had done that. 74HC00C is ~A15 NAND Phi0, connecting to the 62256 ~CS port.

/CS and /WE are not the same thing. /CS (chip select) should be driven from the address bus decoding logic without clock qualification. /WE should be qualified by the clock and should only go low when Ø2 is high.

Quote:
So I'm not using Phi2 because I'm using Phi0, as per the WDC guidelines to bypass Phi2 and simply use the external Phi0 instead. Am I wrong about that setup?

That is correct. When I use the symbol Ø2 I am referring to the clock in an abstract way, not to a specific signal. In this discussion, Ø2 means "two-phase clock" whose source in your circuit is your clock oscillator.

Quote:
I'll be considering the feature creep, I don't want a project to be too overwhelming on my first go.

My mantra with this sort of stuff is learn how to fly a Piper Cub before you climb into a 747's cockpit and take off for Tokyo. :D

Quote:
Oh, just checked on StarTech, and found something like this...I'm just weighing the options to either include or exclude something like this...

Having an interactive console is very useful during the debugging stages. I would never consider building a unit without that capability.

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


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 11, 2021 11:14 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 703
Location: Texas
BigDumbDinosaur, thank you for all of that information. Instead of quoting quotes of quotes, I'll summarize here.

Ok, got the idea with NMIB now, that makes a lot of sense. Thank you for reminding me of what I read before, with all of this so quickly I sometimes forget things too. Thank you for your patience with me.

As per Phi2 and 62256, I agree with your reasoning, that actually makes a lot of sense tying it into ~WE instead of ~CS. STILL, just to verify, my base model was Garth's "potpourri" model:

https://www.wilsonminesco.com/6502primer/potpourri.html

I am sure that I am seeing Garth put Phi2 on ~CS, not ~WE here. He did a big article about why he does this, and I was just following in step with mine. Again, your call to tie it to ~WE makes perfect sense, too! So, which should I go with? What is the difference?

Interactive console sounds super nice. Is this something that you would suggest?

https://www.electrodragon.com/product/r ... max232-ic/


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 12, 2021 12:42 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
sburrow wrote:
As per Phi2 and 62256, I agree with your reasoning, that actually makes a lot of sense tying it into ~WE instead of ~CS. STILL, just to verify, my base model was Garth's "potpourri" model:

https://www.wilsonminesco.com/6502primer/potpourri.html

I am sure that I am seeing Garth put Phi2 on ~CS, not ~WE here. He did a big article about why he does this, and I was just following in step with mine. Again, your call to tie it to ~WE makes perfect sense, too! So, which should I go with? What is the difference?

For someone going for the higher clock speeds, sure, get the RAM selects going early, and don't enable the write until phase 2 rises. I seem to remember you're only aiming for a MHz or two though, and SRAM will typically be the fastest thing on the bus, not needing the early select; so you can, in that case, get away with gating the select with phase 2. When you start pushing the speed limits, by all means, go with BDD's method.

I intend to address other things in your post further up when I get time.

_________________
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  [ 163 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next

All times are UTC


Who is online

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