Re: Trouble implementing memory chip
Posted by
Mikey2520 on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Trouble-implementing-memory-chip-tp4025962p4028116.html
cadet1620 wrote
There are a couple of approaches to decoding the address, but begin by looking at the top two bits of the address.
[14] | [13] | selects |
---|
0 | 0 | RAM16 |
0 | 1 | RAM16 |
1 | 0 | Screen |
1 | 1 | Keyboard |
You can treat the Keyboard as if it were a memory part without address or load inputs.
--Mark
Hi, the chart you is also a part of my best approach now, but it would cause problem if it is implemented directly, because it enables the keyboard register to load whatever's inputted in the whole chip while an address that starts with "11" is selected. Although invalid address greater than 24576 (that is 11+fourteen 0s) should not be selected, comparing input address to keyboard address bit by bit gives the whole chip a lot more robustness.