2

I'm a little new to circuitry, and the Arduino in itself!

From what I know, I think that it might be possible to actually build one (the processor itself, of course) from transistors. This isn't a practical question, of course, but it would be an excellent learning opportunity.

Would it be actually possible to go through with such a project (Even without EEPROM)?

If so, how would it be completed?

Thank you!

Dimitry M
  • 31
  • 1
  • 4

7 Answers7

5

Yes, it is possible - after all, the Arduino is essentially just a bunch of incredibly tiny transistors. Early computers, before ICs were invented, were built from transistors. Before that it was valves. Before that it was relays. All just, at the end of the day, switches.

Would it be a practical project? Not really, although someone has done it (not for the AVR CPU, but the concept is the same): http://www.megaprocessor.com/

How would you start? Well, first off you'd create the basic building blocks of a CPU, which is logic gates. There are two basic ones that can be combined together to make any other gate: the NAND gate and the NOR gate. You'd pick one of those and put lots of them together to make the basic sections of the CPU. Then those blocks connect together to form the CPU. More logic gates go together to make the IO functionality, memory, interfaces, etc.

Basically:

  • Transistors combine to make NAND gates (or NOR gates if you prefer that form)
  • NAND (or NOR) gates combine to make complex gates.
  • Complex gates combine to make logic functions
  • Logic functions combine to make logic blocks (like the ALU)
  • Logic blocks combine to make the CPU
Majenko
  • 105,851
  • 5
  • 82
  • 139
3

I do not think you could build an ATmega328P out of discrete parts: you would need floating-gate transistors for implementing the flash, and these do not seem to be available as discretes.

If you forgo the flash (or replace it with RAM or ROM), then it should in principle be possible. This processor, however, is probably not a good choice for such a project. From the discussion linked to by Mikael Patel, it seems you would need something like 80 K transistors for the core alone, and much more if you include the RAM and the peripherals. It would be a daunting task to assemble all this by hand. For comparison, the Megaprocessor1 as about 42 K transistors total (core + RAM + LED drivers).

If you want to pursue such a project, I recommend you target a simpler CPU. The MOS 6502 may be a good choice. This CPU, which was very popular in the late 70s and early 80s, has “only” 3,510 transistors and is well documented. See for example the resources at visual6502.org. They have an amazing online transistor-level simulator built from the actual layout of the chip.

1Thanks Majenko for the link

Edgar Bonet
  • 45,094
  • 4
  • 42
  • 81
2

The ATmega128 have 800000 transistors. (+-200000 transistors)
So If you want to take some transistors and breadboards and build an ATmega128p first count the money for transistors (if 1 transistor costs 0.01€ then 800000 x 0.01 = 8000€ and the breadboards is much more expensive than transistors!)

ARISTOS
  • 121
  • 1
2

Try to build out the entire thing inside a simulator instead of buying 10s of thousands of transistors and several other components....less messy and gets the job done at almost no expense

user221238
  • 21
  • 1
1

Why not? Atmel did it. But if you mean by soldering up discretes...

In the mid 70s the Zilog Z80 had 8,500 transistors; a couple of years later, the Intel 8088 had 29000(source: Wikipedia). Neither of those had on-chip memory. The AtMega 328p has 2K of RAM and 1K of EEPROM on chip, so factor in for those and their drivers. At 20 MHz it will probably be fun 1) keeping signals where they belong; and 2) keeping the wire runs short enough and suitably arranged that capacitance doesn't slow and distort the signals to unusability.

JRobert
  • 15,407
  • 3
  • 24
  • 51
1

While it is possible, you will have to spend a lot of money and a lot of time. I think about thousends of dollars and months of work. Even when accomplished you will have learned more about electronics than about the ATmega328P. In order to accomplish, you will also have to ask Atmel to hand you over the schematics to get the inner working right. I highly doubt they will aggree since it is not Open Hardware.

I highly discourage you to do that. Instead I suggest you start with an Arduino UNO and discover the capabilities and then go a step further and use a bare ATmege328P.

Kwasmich
  • 1,523
  • 12
  • 18
1

Would it be actually possible to go through with such a project (Even without EEPROM)?

yes.

If so, how would it be completed?

the easiest would be to find or write a soft-core for AVR on a fpga. Get the logic blocks for that softcore , and then implement those logic blocks with transistors.

Before you set out actually doing it, however, check if you have enough of space or bank account (for the electric bills).

dannyf
  • 2,813
  • 11
  • 13