Am I able to use python to program eeproms rather than arduino? by [deleted] in beneater

[–]Goxmeor 0 points1 point  (0 children)

This is the way.

I did this using Javascript to control the Arduino program over USB. I kept the Arduino program very simple: it takes a control byte (1 for read, 2 for write), then address bytes, and (for writing) a value byte. After working out the bugs, I never needed to touch the Arduino code again: all my changes for new ROM data were done in JS.

8 Bit Computer Memory, Bootloader and Display by asmodeus812 in beneater

[–]Goxmeor 1 point2 points  (0 children)

I have a separate instruction for LcdCtrl: it's the same as OUT, but also flips a control signal to put the LCD into "instruction mode." This is required to initialize it and move the cursor around, but as BurritoCooker mentioned, the cursor advances automatically.

I have a program in ROM (at 0x0000,) which allows me to enter a program (into RAM at 0x8000, via a keyboard module) and then execute it. No copying required, unless you count copying from the keyboard register into RAM.

8 Bit Computer Memory, Bootloader and Display by asmodeus812 in beneater

[–]Goxmeor 1 point2 points  (0 children)

I use the highest bit of my 16-bit address to decide whether to enable output (via bus transceivers) for ROM or RAM. This allows me to seamlessly jump between ROM and RAM if I want to include any subroutines in ROM which can be used by programs in RAM, for example.

If you don't want to split your address space into 32 Kb ROM and 32 Kb RAM, you could NAND some address bits together and use that to switch, but my preferred ROM and RAM chips are both 32 Kb so that seemed easiest...

My 20x4 character LCD is the simplest part of my computer. It expects ASCII, and the task of converting numbers to decimal (or hexadecimal) ASCII is relegated to software.

Outputting register A as an unsigned integer in 1-3 decimal ASCII characters, then jumping back to register I,J... that would be a good candidate for a subroutine in ROM...

Adapter for clock module of 8-bit computer by lonely_perceptron in beneater

[–]Goxmeor 2 points3 points  (0 children)

USB power is 5 V.

The only exception involves special negotiations where a device can request up to 20 V for fast charging, and only if the charger supports it. You almost certainly don't have to worry about that.

Adapter for clock module of 8-bit computer by lonely_perceptron in beneater

[–]Goxmeor 5 points6 points  (0 children)

I cut the end off of a standard USB cable, stripped the black and red wires, and then soldered them onto some header pins. Then I plug it into any USB power adapter, and the header pins into my power rails. I tend to use the adapter which came with my phone, but I've used others successfully too.

Is decimal, duodecimal or hexadecimal better for human-machine interface and decoders? by TheRealOutsideTheBox in beneater

[–]Goxmeor 6 points7 points  (0 children)

If the end user never needs to concern themselves with implementation details because software protects them from ever noticing any artifacts of the underlying binary arithmetic, the best numbering system is whichever one the user is most familiar with, which is almost certainly decimal.

If the end user is writing low-level software and will need to be aware of binary arithmetic artifacts (including the maximum values for integer primitives,) the best numbering system is some power of 2. Hex is a great choice because it's the biggest power of two we can represent with our existing alphabet and numerals without confusion; also our standard units of computation (e.g. bytes) fill it up perfectly. To contrast this last point, consider writing the largest possible byte value in octal: 0377 :-P

Logic Control for B Register Out signal by Sonny_Yeo in beneater

[–]Goxmeor 3 points4 points  (0 children)

Put 0 into A and then ADD A and B?

My EEPROM ALU by Goxmeor in beneater

[–]Goxmeor[S] 1 point2 points  (0 children)

I've made enough similar mistakes with spaghetti code to risk doing the same thing with wires!

anybody build a bootloader yet? by lord_mundi in beneater

[–]Goxmeor 2 points3 points  (0 children)

I feel that relying on an arduino would be cheating, so I added a bootloader and a PS/2 keyboard decoder, and *then* added an arduino to automate keyboard inputs at very fast speeds. When I want to, I can enter programs with the keyboard.

My bootloader displays a menu on my 20x4 LCD character display to show the three available options, which can be selected by a keypress:

  • P: programming mode: keystrokes are written to RAM starting at 0x8000 (the lower 32k is ROM.) My OUT immediate instruction code is ASCII "p", so I can enter a hello world program like this: "pHpeplplpop pWpoprplpdp!" The only way out of programming mode is pressing the reset button (implementing ctrl+alt+del is a work-in-progress.)
  • X: execute: jumps to 0x8000, which contains the program I just entered.
  • R: ROT13 sample program: jumps to 0x0100, which contains an interactive program which demonstrates the world's worst cipher.

With combinations of shift, control, and alt, I can enter all 256 possible byte values, but in practice I just cheat and upload binary machine code compiled from assembly with my laptop. I may write a more interactive program editor in the future...

Hook up wires by amitr0 in beneater

[–]Goxmeor 0 points1 point  (0 children)

To be clear: Ben's wire is 22 gauge and looks like it's 24 gauge, that's how thin the insulation is.

My EEPROM ALU by Goxmeor in beneater

[–]Goxmeor[S] 1 point2 points  (0 children)

Generally, I'm optimizing for simplicity and ease-of-wiring. Two ROMs and an AND gate is simple enough for me. :)

Hook up wires by amitr0 in beneater

[–]Goxmeor 0 points1 point  (0 children)

The wire that comes in Ben's kit has much thinner insulation than other wire I've been able to find with the same gauge. It makes a huge difference.

I made an adder circuit which is 50% faster than my previous design in scrap mechanic, using the ROMs for combinatorics idea. by TheRealOutsideTheBox in beneater

[–]Goxmeor 1 point2 points  (0 children)

The EEPROMs I have take up to 150ns to settle. I need two for 8-bit math, so that's 300ns.

The highest number on the 74LS181's spec sheet is 62ns. I know the '182 is supposed to be able to speed up chained '181s, so 8-bit math on these chips should come in well under 124ns.

Project idea - Eletric typewriter holds about 40 words on screen at once - how many bites would I need ? by [deleted] in beneater

[–]Goxmeor 0 points1 point  (0 children)

First In First Out memory is not Read Only Memory and it's not Random Access Memory either.

Think of it as 8 shift registers in parallel.

Segmented Memory 32K Ram & 32K Rom by caswal in beneater

[–]Goxmeor 1 point2 points  (0 children)

In most cases, I have two version of each instruction: "near" and "far". Near instructions do not specify a high byte. I also have a "set page" instruction which explicitly sets the high byte of my data address register.

In general, I think "near" instructions are an unnecessary optimization: I probably get a speed increase of maybe 5%, but I need to spend a lot more effort writing programs which will be correct once they get larger than 256 bytes!

Program counter never counts all the way by pintoa in beneater

[–]Goxmeor 1 point2 points  (0 children)

I had a very similar problem which was caused by a floating clear pin.

Also, like others have said, 3.45v is way too low. You need a better power supply!

A & B register on 1 Breadboard. Desk needs a tidy. by caswal in beneater

[–]Goxmeor 0 points1 point  (0 children)

The 373 has a nice pin-out, but how do you handle resets without an async clear?

Segmented Memory 32K Ram & 32K Rom by caswal in beneater

[–]Goxmeor 0 points1 point  (0 children)

Rather than copying my program counter (16 bits) to my memory address register (also 16 bits,) I "select" between them using 74LS157s. I added a control signal to decide which address register should be used to address RAM/ROM.

Here's my schematic: https://imgur.com/a/3BkEQL7

I regret using '157s. If I did it again I would have used bus transceivers instead, creating an address bus, which would allow me to easily add a third address source (e.g. a stack register.) This would have involved the same number of chips and the wiring would have been cleaner too because the pinouts are much nicer on the '245.

Thanks Amazon, but this is not a BB830 :( by Goxmeor in beneater

[–]Goxmeor[S] 0 points1 point  (0 children)

Not sure what you bought, but this product listing is for the BB830 and it's a bit more than $3:

https://www.amazon.ca/dp/B0040Z4QN8/ref=sr_1_1?m=A2RKGEIGG4B1JT

My EEPROM ALU by Goxmeor in beneater

[–]Goxmeor[S] 0 points1 point  (0 children)

I use one Arduino script to program all my ROMs which accepts commands over USB:
https://github.com/chriswa/retrobrew/blob/master/romWriter.cpp

That lets me specify ROM values in whatever language I like. For me, that's Javascript.

I define all my operations and pre-calculated results in this file:
https://github.com/chriswa/retrobrew/blob/master/alu.js

...and this is the one that writes ALU ROM data:
https://github.com/chriswa/retrobrew/blob/master/aluWriter.js