Seyed Masoud Hosseini · Overview · Study log · Weekly summaries · Ideas · Search · Transcript · RSS feed

Embedded Systems, 6502 breadboard computer · Lecture 6 of 29 · 38:13

Part 6: RAM and bus timing

RAM and bus timing — 6502 part 6 on YouTube

Study guide

What this lecture covers

This lecture continues the breadboard 6502 computer series by adding a RAM chip to the circuit. The previous video ended with subroutine calls failing because nothing in the computer responded to the stack's memory range at $0100-$01FF. This video's job is to fix that by wiring in real read/write memory and getting its address decoding and bus timing to work correctly alongside the existing EEPROM and VIA.

No transcript or chapter markers are available for this video, so this summary is based only on its title and position in the series.

Key ideas

  • RAM chip wiring: connecting a static RAM chip's address and data lines to the same buses already shared by the EEPROM and the 65C22 VIA.
  • Address decoding for RAM: building logic so the RAM responds only to its intended portion of the address space, leaving the EEPROM and VIA regions undisturbed.
  • Bus timing: making sure the RAM's read and write timing lines up correctly with the 6502's clock cycles, since incorrect timing can corrupt reads or writes.
  • Enabling the stack: with working RAM covering $0100-$01FF, the stack pointer, JSR, and RTS from the previous video should finally function as intended.

Before you watch

  • Watch part 5 first: it explains why the computer needs RAM and traces the exact failure caused by its absence.
  • Familiarity with the address decoding approach used for the EEPROM and VIA in parts 2 and 4 will help, since this video likely reuses similar techniques for the RAM chip.

Check your understanding

  1. Why did the previous video's subroutine calls fail without RAM in the circuit?
  2. What address range does the 6502's stack require, and why does that constrain where RAM must be mapped?
  3. What could go wrong if the RAM's read/write timing doesn't line up correctly with the 6502's clock?

Vocabulary

RAM (random-access memory) (noun)
Memory that can be quickly read from and written to, but loses its data without power.
A RAM chip is added so the computer can finally use its stack.
address decoding (noun)
Circuit logic that decides which chip should respond to a given memory address.
Address decoding lets the RAM answer only for its own address range.
bus timing (noun)
The precise timing of when signals on shared wires are valid and stable.
Correct bus timing prevents corrupted reads and writes.
corrupt (verb)
To damage or make invalid, usually data or memory content.
Bad timing could corrupt the value stored in RAM.
clock cycle (noun)
One repeating unit of time defined by the processor's clock signal.
The RAM must respond within one clock cycle.
stack (noun)
A memory region used to store data in a last-in, first-out order.
Working RAM finally lets the stack function correctly.
chip select (noun)
A signal that turns on one specific chip to respond to the current address.
Chip select tells the RAM when it should be active.
shared bus (noun)
A common set of wires used by multiple chips to communicate.
The RAM connects to the same shared bus as the EEPROM and VIA.
read/write memory (noun)
Memory that supports both storing new data and reading existing data.
Real read/write memory finally lets the stack work.
undisturbed (adjective)
Left unchanged and not interfered with.
The EEPROM and VIA regions must stay undisturbed by the new wiring.
intended (adjective)
Meant or planned for a specific purpose.
The RAM should only respond to its intended address range.
functional (adjective)
Working correctly as designed.
The stack becomes functional once RAM is wired in.
static RAM (noun)
A type of memory chip that holds data as long as it has power, without needing refresh.
A static RAM chip is added to the circuit.
constrain (verb)
To limit the possible options or range of something.
The stack's fixed address range constrains where RAM must sit.
prerequisite (noun)
Something that must be done or true before another thing can happen.
Working RAM is a prerequisite for the stack to function.
position (noun)
The place something occupies within a sequence or series.
This video's position in the series builds on the previous one.
job (noun)
A specific task that something is responsible for doing.
This lecture's job is to add working RAM to the computer.
fix (verb)
To repair something so it works correctly.
Adding RAM is meant to fix the earlier stack failure.
portion (noun)
A part of a larger whole.
The RAM only covers a specific portion of the address space.
circuit (noun)
A connected set of electronic components that work together.
The RAM chip is added to the existing circuit.

From the YouTube description

Schematics, datasheets, kits, and more at https://eater.net/6502
Support these videos on Patreon: https://www.patreon.com/beneater or https://eater.net/support for other ways to support.

Part 1: https://www.youtube.com/watch?v=LnzuMJLZRdU
Part 2: https://www.youtube.com/watch?v=yl8vPW5hydQ
Part 3: https://www.youtube.com/watch?v=oO8_2JJV0B4
Part 4: https://www.youtube.com/watch?v=FY3zTUaykVo
Part 5: https://www.youtube.com/watch?v=xBjQVxVxOxc
Part 6: This video!
Part 7: https://www.youtube.com/watch?v=omI0MrTWiMU

------------------

Social media:
Website: https://www.eater.net
Twitter: https://x.com/beneater
Patreon: https://patreon.com/beneater
Reddit: https://www.reddit.com/r/beneater

Special thanks to these supporters for making this video possible:
Adam Lininger, Adrien Friggeri, Alex Catchpole, Alexander Wendland, Andrew R. Whalley, Anthony Cuccia, Armin Brauns, Austin Grant, BakerStaunch, Beau-James Erion, Ben Dyson, Ben Kamens, Ben Williams, Bradley Pirtle, Bryan Brickman, Carlos Ambrozak, Christopher Blackmon, Clayton Parker Coleman, Daniel Tang, Dave Walter, David Boardman, David H. Friedman, David House, David Turner, Dean Winger, Debilu Krastas, Dirk Lentzen, Dmitry Guyvoronsky, Dušan Dželebdžić, Dzevad Trumic, Eric Brummer, Eric Busalacchi, Eric Dynowski, Eric Twilegar, Erik Broeders, Eugene Bulkin, Foaly, George Miroshnykov, HaykH, Ian Tait, Ingo Eble, Ivan Sorokin, Jason DeStefano, JavaXP, Jay Binks, Jayne Gabriele, Jeremy A. , Jeremy Wise, Jimmy Campbell, Joel Jakobsson, Joel Messerli, Joel Miller, Joern Heidenreich, John Fenwick, Jon Dugan, Jordan Scales, Joshua King, Justin Duch, Kefen, Kent Collins, Lambda GPU Workstations, Lucas Nestor, Maksym Zavershynskyi, Manne Moquist, Marcus Classon, Mats Fredriksson, Matt Alexander, Matteo Mohr, Matthäus Pawelczyk, Michael, Michael Burke, Michael Garland, Michael Tedder, Miguel Ríos, Nathan Wachholz, Nicholas Counts, Nicholas Moresco, Örn Arnarson, Örper Forilan, Paul Pluzhnikov, Paul Randal, Philip Hofstetter, Randy True, Ric King, Richard Wells, Rob Bruno, Robert Butler, Ross, Sachin Chitale, Sam Rose, Samuel E Joseph, Scott, Sergey Ten, SonOfSofaman, Stefan Nesinger, Stefanus Du Toit, Stephen Riley, Stephen Smithstone, Steve Jones, Steve Gorman, Steven Pequeno, Thomas Ballinger, Tom Burns, Vladimir Kanazir, Warren Miller, xisente, Ziggy L

← Part 5: What is a stack and how does it work? · Part 7: Subroutine calls, now with RAM →