Shop OBEX P1 Docs P2 Docs Learn Events
Simple Computer Model — Parallax Forums

Simple Computer Model

microcontrollerusermicrocontrolleruser Posts: 1,194
edited 2017-01-25 01:38 in General Discussion
Developers

I am hellbent on starting at the lowest level of computing.

Figure it's just easier to write programs to reenact that than

build a system on a breadboard.

1 write data to memory and regurgitate it?

That doesn't seem to be very useful by itself. Expensive pencil and sheet of paper.

2 Input data and perform an operation on it?

That makes more sense. Does add storage for a 'program' or 'set of instructions'.

Any thoughts on this?

Thanks!

Comments

  • KeithEKeithE Posts: 957
    edited 2017-01-25 02:17
    Maybe look at the free course NAND to Tetris for ideas:

    https://www.coursera.org/learn/build-a-computer

    Note that this is all simulated, and it only covers that first half of the book. But a lot of people like it. It might help to figure out where to focus.

    [In this project-centered course* you will build a modern computer system, from the ground up. We’ll divide this fascinating journey into six hands-on projects that will take you from constructing elementary logic gates all the way through creating a fully functioning general purpose computer. In the process, you will learn - in the most direct and constructive way - how computers work, and how they are designed.

    What you’ll need:
    This is a self-contained course: all the knowledge necessary to succeed in the course and build the computer system will be given as part of the learning experience. Therefore, we assume no previous computer science or engineering knowledge, and all learners are welcome aboard. You will need no physical materials, since you will build the computer on your own PC, using a software-based hardware simulator, just like real computers are designed by computer engineers in the field. The hardware simulator, as well as other software tools, will be supplied freely after you enroll in the course.

    Course format:
    The course consists of six modules, each comprising a series of video lectures, and a project. You will need about 2-3 hours to watch each module's lectures, and about 5-10 hours to complete each one of the six projects. The course can be completed in six weeks, but you are welcome to take it at your own pace. You can watch a TED talk about this course by Googling "nand2tetris TED talk".]
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2017-01-25 04:09
    Keith

    Thank you for taking the time to look that up.

    I guess the question is: What's the first thing

    to do with a computer?

    That's to make my program.

    I say imput data-process it-output result.

    One way to make a program like this would

    be to use a keypad.

    It just throws me that microcontroller courses start with

    'light an LED' and never get around to 'Build a Computer'.

    I see why though, the Stamp 1 Appnotes have 'Build a Terminal' and

    it's quite a job.

    I guess Stamp is not equal to Intel 8088

    Thanks!

  • kwinnkwinn Posts: 8,697
    What do you mean by build a computer?

    Build a physical computer
    -using logic gates.
    -using a microprocessor, memory chips, I/O chips, and glue logic.
    -using an FPGA and verilog or similar software.

    Build a simulated computer using software.

  • The book for that course culminates in writing Tetris.

    The rest will be kind of random, but perhaps something will be of interest...

    Maybe look into simple PLCs for ideas if LEDs aren't exciting?

    https://media.digikey.com/pdf/Data Sheets/Parallax PDFs/30064.pdf

    Here's another one you could look at for ideas where you have only access to very basic keyboard entry - vintage Radio Shack:

    http://www.polylith.com/~brendan/ClassicComputers/Tandy/uCptrTrainManual1.html

    Or the Gakken:

    http://www.retrothing.com/2009/07/new-gakken-4bit-micro-computer-kit.html

    Or a Kim-1:

    http://www.brielcomputers.com/wordpress/?cat=24

    Cheating a bit by using an Arduino - http://obsolescence.wixsite.com/obsolescence/kim-uno-summary-c1uuh


    You'll see that quite a few people enjoy writing Forth for their computers. And then build applications on top of that. The PLC applications would be easy to write in Forth. You can find a lot of examples of really simple CPUs with Forth built on top of them. Just be careful not to get stuck on the Forth part - have some problem in mind that you want to solve.

    Oberon is an example of a system that is simple enough for one person to understand.
  • Developers

    Guess it depends on definition of computer.

    You could have it take input with keypad and

    call it good.

    Guess you could 'move up' to saying it should display

    'Basic Stamp Computer' when it starts up.

    Then it has a menu with a choice of 'programs' to load.

    Early computers I guess were equivalent to a calculator

    today. So that's within reach of the Stamp.

    Handling keyboard and monitor I would say is beyond a

    Stamp. At least to do all that at once with multi programs also.

    That would be the definition of a computer in one way.

    The early personal computers.

    Stamp can't do that. Back to the drawing board.

    Thanks!
  • twm47099twm47099 Posts: 867
    edited 2017-01-25 14:04
    The Propeller can be used to make a computer. There have been a number of examples. A simple one where the Propeller is the brain (rather than just a helper chip) is the Amigo which was the subject of a number of Nuts & Volts articles. One link is in this thread.
    forums.parallax.com/discussion/162894/the-amigo-prop-mini-computer-with-color-basic/p1

    The kit may still be available. It was fun to build and it has a simple version of Basic that was designed to take advantage of the Propeller capabilities. It connects to a PS-2 keyboard and a VGA monitor, and uses an SD card as a "hard drive".

    Tom


  • Tom

    That'll work.

    Good ole' Nuts & Volts.

    Is the Propellor article every week still in it?

    Thank you.

  • Keith

    Forth is interesting. I don't go back that far.

    I go back to Basic Professional Development System 7.1

    Have heard about Forth, Fortran and Algol.

    Think there was something called the 'Big Four'.

    I do remember the clunky terminals in all the small businesses that

    had to communicate with Aerospace companies.

    Have a nice day!
  • Tom

    That'll work.

    Good ole' Nuts & Volts.

    Is the Propellor article every week still in it?

    Thank you.

    Jon's SPIN articles are every two months in Nuts and Volts. The next one will be March.



  • Publison

    Stamp & Propellor articles in Nuts & Volts can

    be pretty interesting.

    Thank you.



  • Heater.Heater. Posts: 21,230
    KeithE,
    ...NAND to Tetris...
    Sounds great.

    Can't help but think they should started with transistors. I mean, how do you make a NAND gate out of transistors?

    Then they could have called it "Transistor to Tetris". Which is a bit more catchy don't you think? :)
  • Heater - I think that one could add that in without affecting the rest of the course. The way that they teach, it's just another layer of abstraction. In fact you could even build the gates out of legos or Minecraft redstone blocks ;-)
  • I can recommend the Nand to Tetris course if your goal is to learn the low level of how computers work. I didn't take the coursera version of the course, I just bought the Elements of Computing Systems book off Amazon and then followed the syllabus available here: http://www.nand2tetris.org/course.php.

    The first half of the book, from what I remember, was devoted to creating the computer processor. This starts by using a simple nand gate and subsequently building the logic elements required to build a fully functional processor. The course provides software which you can use to test and simulate your logic elements at each level.

    Whereas the first half of the book dealt with the hardware side of creating the processor through the use of writing HDL or Hardware Description Language, the second half of the book dealt with writing software that would run on that processor. You create a compiler which takes the high level language that the book uses, called Jack, and converts it into an intermediate language that then gets run through a virtual machine which turns the intermediate language into an assembly language called Hack. Then that gets run through an assembler you create which assembles the program down to the machine code which the processor can understand. The last few chapters of the book deal with writing an OS and actually creating a drawing program and games that run on the OS.

    This course really provides a great overview of how computers are built from simple logic elements. It shows how complexity in these systems are managed by building simple modules which can be tested individually. Then these modules are connected together to build a finished system. This course also introduced me into the fascinating realm of FPGA's. The course doesn't go way in depth in any one area. But it gives you enough to at least possibly whet your appetite to research the areas that the book doesn't cover.

    Anyway, hope this review helps. Have fun!
    -Jon
  • Read the book, "Code" by Charles Petzold. Very good read, takes you from smoke signals and the Telegraph through digital logic in a microcomputer.
  • jmgjmg Posts: 15,140
    I am hellbent on starting at the lowest level of computing.

    Depends on if you mean 'lowest level' in software, which would be Assembler Coding, or lowest possible level in Hardware, which probably points to something like a Computer with just one opcode

    Others may consider coding in Verilog, or VHDL, which can avoid opcodes entirely, as the best way to achieve "just easier to write programs to reenact that than build a system on a breadboard."
  • microcontrolleruser,

    So, the thought is to take something like the BASIC Stamp or Propeller and create a computer comparable to the early 8088 based computers? With regards to microcontrollers, it would seem rare for these to be used to create such a computer, but like the early computers, you could put enough of them together to get the functionality you are looking for. Even the 8088 based systems had many peripheral devices that controlled I/O, keyboard input , video and such and the 8088 was just the main microprocessor that controlled it all. But, mind you, there is a difference between a microcontroller like the BASIC Stamp and a microprocessor like the 8088 so it is not a fair comparison between the two. But, as has been mentioned, the Propeller has some nifty features that allow it to behave similar to a basic computer system. The Hydra board was good for this and the Quick Start with a HIB add on board would get you close.

    Do you have a degree in Computer Engineering or the equivalent? I would think most of your questions would have been answered there.

    I would suggest starting here:
    https://amazon.com/Computer-Architecture-Fifth-Quantitative-Approach/dp/012383872X

    and:
    https://amazon.com/Computer-Organization-Design-MIPS-Fifth/dp/0124077269/ref=pd_sbs_14_t_0?_encoding=UTF8&psc=1&refRID=YT8P0CX71YBX5GJ8E9DV

  • Heater.Heater. Posts: 21,230
    JonM,
    Propeller has some nifty features that allow it to behave similar to a basic computer system.
    Quite so. More than one of us here has emulated the Zilog Z80 on the Propeller and created a late 70's vintage CP/M machine. Complete with SD card for the file system and VGA graphics for the console interface.

    Even without emulating an older CPU and using an older OS a Propeller can be made in to an interactive machine in the style of those old 8 bitters.

  • Heater. wrote: »
    JonM,
    Propeller has some nifty features that allow it to behave similar to a basic computer system.
    Quite so. More than one of us here has emulated the Zilog Z80 on the Propeller and created a late 70's vintage CP/M machine. Complete with SD card for the file system and VGA graphics for the console interface.

    Even without emulating an older CPU and using an older OS a Propeller can be made in to an interactive machine in the style of those old 8 bitters.
    Yes, check this out: http://store.nutsvolts.com/project-kits/sku17367
  • David Betz wrote: »
    Heater. wrote: »
    JonM,
    Propeller has some nifty features that allow it to behave similar to a basic computer system.
    Quite so. More than one of us here has emulated the Zilog Z80 on the Propeller and created a late 70's vintage CP/M machine. Complete with SD card for the file system and VGA graphics for the console interface.

    Even without emulating an older CPU and using an older OS a Propeller can be made in to an interactive machine in the style of those old 8 bitters.
    Yes, check this out: http://store.nutsvolts.com/project-kits/sku17367

    I built one of these kits. It has very clear instructions, is easy to build, and has a nice 'legacy' Basic with some propeller features.

    There were also a couple of articles in N&V that made use of the Amigo for some simple Basic programs that are good for playing with younger programmers.

    Tom

  • Developers

    I'm satisfied that a microcontroller passes the input/process/output test and

    that's equivalent to early computers.

    Early computers not later keyboard/monitor/hard drive type.

    Here's kit that fills the bill for that later computer.

    http://www.elenco.com/product/productdetails/trainers=NjU=/micromaster_®_computer_training_kit=MjYw

    See how it says 'Learn I/O'. They put that there to irk me.:)

    Thanks!
  • I had seen the Propellerpowered Pocket Mini Computer sometime back and looks like a pretty cool project with the QuickStart board but I am not sure what the status of this is since most of the links are dead.

    demin.ws/blog/english/2012/11/22/personal-mini-computer-on-parallax-propeller/

    Also posted in the Parallax forum:
    forums.parallax.com/discussion/153571/design-and-make-your-own-mini-computer-based-on-propeller-chip

    Listed on Propellerpowered.com
    propellerpowered.com/forum/index.php?topic=338.0
  • JonM wrote: »
    I had seen the Propellerpowered Pocket Mini Computer sometime back and looks like a pretty cool project with the QuickStart board but I am not sure what the status of this is since most of the links are dead.

    demin.ws/blog/english/2012/11/22/personal-mini-computer-on-parallax-propeller/

    Also posted in the Parallax forum:
    forums.parallax.com/discussion/153571/design-and-make-your-own-mini-computer-based-on-propeller-chip

    Listed on Propellerpowered.com
    propellerpowered.com/forum/index.php?topic=338.0
    I think it is dead. OldBitCollector seems to have disappeared.

  • kwinnkwinn Posts: 8,697
    Developers

    I'm satisfied that a microcontroller passes the input/process/output test and

    that's equivalent to early computers.

    Early computers not later keyboard/monitor/hard drive type.

    Thanks!

    I'm still trying to figure out exactly what it is you want for this early computer.

    Input: If not a keyboard then what? Switches? Punched paper tape? Teletype? Mag tape? They were all used at some point.

    Process: What type of processing? Input 2 numbers and add/multiply/or some other function?

    Output: Punched paper tape? Printer? Teletype? Mag tape? Again, all used at some point.

    How about providing some concrete examples of what you want this "early" computer to do.
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2017-02-04 22:22
    Kwinn

    That the Stamp would duplicate one pretty much narrows it

    down.

    Keypad and LCD screen for input/output.

    Math functons of Stamp for processing.

    That would have been a big deal in early days of computing.

    40's and 50's era.

    Pre keyboard predominance which came along with a lot of other devolopments.

    Keyboards do take a lot of resources when you're at a certain level of computing power.

    Thanks!
Sign In or Register to comment.