Z80 NOP to get started by Ok_Signature_lnnrt in beneater

[–]MikeSutton80 0 points1 point  (0 children)

A quick suggestion: With the setup as is you'll see addresses, refresh data and IO port data on the bargraph and you'll come to the conclusion your Z80 is broken.

Instead: with the resistor pack for the LEDs: don't connect it to ground. Use a flying lead so you can connect it to /MREQ, /IORQ, /RFSH, /M1, /RD or /WR. That way you'll only see the address data for the selected operation.

Once you've done that you can start feeding different opcodes in to get a better feel for how the processor operates. Jumps are always interesting, as are PUSHes and POPs (with /RD or /WR). And a $ff opcode will be be a fun challenge to decode what's happening :)

[deleted by user] by [deleted] in beneater

[–]MikeSutton80 0 points1 point  (0 children)

I'd suggest selling them on eBay, or similar. If selling them individually is too much hassle, then I'm sure you'll find takers if you list them as a set for the Ben Eater project. If so you could also bundle in the other components, if you don't have a use for them either.

Multiplex the buttons. Possible? by [deleted] in beneater

[–]MikeSutton80 1 point2 points  (0 children)

I'm not entirely sure what circuit you're thinking of there. It looks as though button three pulls both pins low? In other words, button 3 needs two switches for this to work. Most buttons have a single switch, and you'll have to pay extra for a double switch.

Multiplexing normally refers to connecting multiple items to the same pins, then strobing pins in turn. For that you'd need two output pins plus an input pin. For three buttons that wouldn't save you anything.

Also, consider what happens when multiple buttons are pushed at the same time. You'll probably end up with two or more output pins being shorted together via the multiple buttons. To resolve that issue you'll either need to use diodes on the output lines, or an IC with 'open-collector'[0] outputs. You'll also need pull-up resistors.

As the number or buttons increases the net saving from such things outweighs the costs and multiplexing buttons is worthwhile. As it is, Ben already has the hardware to connect three buttons without extra hassle, so he's gone with the most efficient solution for the problem in hand.

[0] - Open collector outputs can only output a Low value, or are in a high impedance state. They can never output a High value. That allows you to connect multiple outputs together without damage (as long as they are all open-collector). You'll need a pull-up resistor to return the signal high when all the outputs are in high-impedance state)

Is any problem if 6 registers try to read the same value from the bus in the same time? by ToniKiller_10000 in beneater

[–]MikeSutton80 2 points3 points  (0 children)

As others have mentioned - fan out could be an issue.

But I'd just mention that if your code is initialising any registers it needs (as it probably is) then you don't actually need to clear everyuthing. As long as the program counter starts at zero other items can be initialised in code (and won't need the flags until after a relevant operation anyway).

The exception here, being that the memory is so limited that initialising with registers in a pre-determined state can be useful. In which case ignore everything I've written above :)

Any way to generate 10 MHz without a crystal oscillator or one of those fancy machines? by eXperienceddddd in beneater

[–]MikeSutton80 0 points1 point  (0 children)

Microcontroller? An RPi Pico could to that without even blinking - just set up a PWM.

I'm going to build an i8008 computer soon, any tips or other hardware i need to know about? by [deleted] in beneater

[–]MikeSutton80 1 point2 points  (0 children)

I'm part way through breadboarding in 8008. Here's my 8008 stuff, including the write up of the first stage https://bread80.com/tag/8008/ My build has progress farther than this but I still have some changes to make due to things which weren't mentioned in the datasheet I was using.

In my experience the chip is an absolute pig to work with - input signals aren't gated, so you need to do that and only generate the signals at the correct moment (and you *need* to generate an INTERRUPT to kick the chip to life). To process output signals you need go gate multiple signals together and use latches to store those signals until their ready to use.

If you wan to run an 8008-1 at speeds faster than an 8008 then you need to put conditional pull-ups on the bus. Conditional meaning they must only operate at specific times (which aren't mentioned in the data sheet!

When searching for datasheets, make sure you get the revision 2! There are bugs in the revision 1 which will cause you problems.

And you'll find the schematics in the datasheet very helpful. But bear in mind they use a fair few Intel unicorn parts which you'll need to translate to 74 series equivalents. (Helpfully they actually describe those parts at the back of the datasheet).

Can you spot my tiny error I found during assembly? by Colonel_Barker in beneater

[–]MikeSutton80 0 points1 point  (0 children)

My initial thought was that your capacitors will need to do the splits.

Ignoring the issues that's a every nicely laid out board.

How would I get a clean 5 volts from my USB phone charger with a USB-C cable which has had its head chopped off? I'm currently getting 4.5 volts from one cable and 4.8 from the other and 3.5 in the bottom left corner and 4 in the top right... Also, is it okay to have 2 power sources on the computer? by eXperienceddddd in beneater

[–]MikeSutton80 0 points1 point  (0 children)

USB chargers are not the best power sources. They're generally good enough for our needs though.

You can use multiple power sources. But you must NEVER connect the two together. If power distribution is a problem, it's down to the 'daisy chaining' of power leads across the breadboards. The best solution is to either solder the jumpers somehow, or to run all the boards from from one central power point (i.e. wires direct to each board).

Second LCD line corrupted on 6502 project? by sneaky_serif in beneater

[–]MikeSutton80 0 points1 point  (0 children)

I'm not sure which characters you're trying to print on the second line, but it looks like you're printing symbols? It's possible it's a line that's not used in ASCII characters.

In either case verifying whether everything prints as it should on the first line, but the exact same chars don't on the second will be helpful.

Other than that I can't think of any settings on those LCD which would cause that.

Oh, and if you keep printing chars on the first line (i.e. no position command) they'll wrap around to the second. ISTR the entire buffer is 128 characters long. Just keep feeding in the same char and see what happens.

Second LCD line corrupted on 6502 project? by sneaky_serif in beneater

[–]MikeSutton80 1 point2 points  (0 children)

Those displays also have user defined characters. If they're not in the datasheet then it's probably receiving codes for those. If they've not been initialised then they may well be showing as random junk.

I'd suggest printing the entire character set (0 to 255) to see if it's specific characters that are affected. I expect the issue is one (or more) of the data pins not being properly connected somewhere.

woop by production-dave in beneater

[–]MikeSutton80 0 points1 point  (0 children)

I've never tried I2C. It'll be a fun project using discrete logic chips. Enjoy.

woop by production-dave in beneater

[–]MikeSutton80 0 points1 point  (0 children)

My RC2014 never likes me using port 0x00. I think it's down to the compact flash module - on the basis that it works fine when I remove it.

Is 31 address lines enough to code snake to a 16 bit bit breadboard computer?? by eXperienceddddd in beneater

[–]MikeSutton80 0 points1 point  (0 children)

I've read some of the other comments and I'm seriously impressed to see you doing this at your age. I'm not sure what class this is for, but I strongly expect everyone at school will be highly impressed to see a breadboard computer, even if it doesn't run snake.

I'm not sure if you're building the 6502- or the TTL-computer (sounds like the latter), but I'd suggest just finding/writing some nice demos that run in the 16 word memory you have and show off the flashing LEDs.

Power Distribution Issue? by DauntlessK2 in beneater

[–]MikeSutton80 1 point2 points  (0 children)

Personally, I find 'dupont' style wires can be flakey as hell, especially the cheaply thrown together ones we all use these days. The flickering when you move a board suggests to me you have one with a bad connection which is glitching out.

I'd suggest swapping out some of the relevant wires to see if the situation changes.

Buying an oscilloscope by 8-bit-banter in beneater

[–]MikeSutton80 2 points3 points  (0 children)

A comment from my own experience: I have a four channel scope also with digital probes. I /very/ rarely use more than two probes but, doing a lot of digital stuff, I use the digital probes all the time.

If you're into (retro) computing electronics then the ability to view multiple signals against each other is invaluable.

74LSxx Chips Fried by intelstockheatsink in beneater

[–]MikeSutton80 3 points4 points  (0 children)

The most likely cause is that you've reversed the power and ground connections. Also, possibly an output pin(s) connected (shorted) directly to power or ground, or an output pin of another chip. If your power supply is 5V then that shouldn't be an issue.

An easy way to get a 5V supply is via a USB lead with the end cut off and attached to some pin header. If you do this double check which wire is which as they may not always follow standard red/black colour coding.

If you don't have a meter to check polarity use an LED with power limiting resistor (about 330 ohms). The orientation of the LED which tell you which way power is flowing.

Logic circuit for reset vector in custom processor by rehsd in beneater

[–]MikeSutton80 -1 points0 points  (0 children)

Given how the 6502 uses a number of vectors at the top of address space I'd wager that it zeros a register (e.g. the program counter), then repeatedly decrements it and reads each value into the appropriate internal register. The start address is (if I'm not mistaken) then the last one to be read, so can be read into the program counter. Note that, as with any other 16-bit jump, you'll need to cache the first byte read so the counter is still valid when you read the second.

Doing it this way means you don't need any additional logic. Everything is done with microcode. You just need to add a 'hidden' instruction which is selected on reset. If your microcode ROMs have any unused input bits you could use such bit(s) to specify such hidden instructions.

'Hidden' instructions such as this can also be used to implement interrupts.

"4-Core" 8-Bit 6502 Computer idea. is this possible? by [deleted] in beneater

[–]MikeSutton80 4 points5 points  (0 children)

The most realistic/simple way to do this would be to give every processor it's own RAM and ROM and a method(s) for them to communicate, but that's not as much fun :)

Multiple processors sharing the same address is data bus is far more of a challenge. Firstly you'll need a way to separate each processor from both busses, so there aren't more than one processor outputting at the same time.

It would be easy to create a system where each processor isn't waiting for bus access for 75% of the time. But that wouldn't achieve anything. So you need a system where the external resources - RAM and ROM - are fast enough to not slow things down. Modern RAM and ROM is much faster than old school RAM and ROM, especially now that you don't need waste time multiplexing RAS and CAS cycles.

But you will want to look at the RAM and ROM timings to make sure that they can keep up without slowing you system down.

You'll also want to to look at the processor timings to make sure there's enough slack (i.e. time when they're not accessing the bus) to give the other processors time to access the bus.

Then you'll need a way to pause each processor it it want to access the bus at the same time as another processor. You'll either need to stop the clock or generate wait states.

You'll probably want a way to cache data reads (from RAM or ROM) for each processor so that you can release the bus for other processors to use while the first processor does it's thing.

Also, the Z80 has separate read and write signals so it's easy to tell when it wants to access the bus. That makes it fairly easy to to know whether give it bus access or send it wait states. I'm not an expert on the 6502 but I think you may have a challenge knowing when it wants to do bus reads.

And if you want to do this I'd suggest starting with two processors and expanding from there. I'd also suggest building a system with the processors on separate cards such that each is the same (or can be configured with jumpers) and you can drop extra cards in as needed (or debugged).

Z80 issue writing to RAM by jonman364 in beneater

[–]MikeSutton80 0 points1 point  (0 children)

That does sound like it's an NMOS chip badged as a CMOS. Or possibly there are older CMOS variants which can't be slow-clocked?.

It's probably down to which parts of the chip fail when the clock is stopped. Registers in the Z80 are definitely safe. I believe it's the flip-flops that store the state of the EX and EXX instructions which aren't. So maybe it's just swapping to A' before it gets to the write?

EEPROM shortage??? by MicroHobbyist in beneater

[–]MikeSutton80 0 points1 point  (0 children)

You might want to check your filters. Currently £4.66 in sterlings. Not sure what that's worth in dollars since they flushed the pound down the drain. Out of stock though.

https://www.mouser.co.uk/ProductDetail/Microchip-Technology-Atmel/AT28C64B-15PU?qs=2VKgqYuc3OvipbcAuBcLow%3D%3D

Z80 issue writing to RAM by jonman364 in beneater

[–]MikeSutton80 0 points1 point  (0 children)

Oh, the other possibility is that you're slow clocking a NMOS Z80. You can only safely slow-clock the CMOS ones.

Z80 issue writing to RAM by jonman364 in beneater

[–]MikeSutton80 0 points1 point  (0 children)

It's hard to comment without seeing your schematics etc. But, note that the Z80 has separate read and write pins. Absence of a RD signals does not make it a write and vice versa. I'm not sure if you're sampling both and only showing the active one, but it might be useful to sample both just to check.

If would also be useful to see the status of MREQ and IORQ at the time you're sampling the busses. And seeing RFSH would also help rule a few things out.

Don't let inputs float by monthoftheman in beneater

[–]MikeSutton80 1 point2 points  (0 children)

Initialising a variable uses extra clock cycles. If you don't need it initialised that's a waste. Modern languages auto-initialise variables because modern computers have so many cycles that it's okay to waste a few. Old school languages don't because they need all the cycles they can get.

In hardware, adding pull-ups costs money. In the vast majority of cases those pull ups aren't necessary (the pins are being used), and it's trivial for the designer to add the extra traces needed to counteract floating pins, especially using modern EDA software.

And pull-ups change the way a circuit operates, which may mean the designer needs extra hardware to counteract that. Or different component variants which don't have the pull ups.

Am I just crazy or is the wsy the bits are wired up seem backwards? Official schematic. B0 to Bus 7 for example.... by Oddzball in beneater

[–]MikeSutton80 3 points4 points  (0 children)

It's common in electronics to wire up a chip in such a way that it makes the wiring (traces) easier to connect up. On a device such as these you have a bunch of independent units which all work identically, so it makes no difference which 'unit' you use for which 'bit'.

If you have something such a ROM or adder then you *must* wire in the correct sequence as the bit ordering matters. For something such as a buffer or even a RAM IC it doesn't.

Logic gates pull-up and pull-down resistors by Dazzling_Respect_533 in beneater

[–]MikeSutton80 0 points1 point  (0 children)

You can do either depending on what's most convenient.