Is an Arduino a computer?

I wanted to address this comment from the other thread:

storing the same 4 KB program in Flash memory would require approximately 4 × 1024 × 4 ms = 16.4 s.

This is obviously false, since the "upload" process to an Arduino, even with sketches longer than 4k, is seldom as long as 16.4s...
The discrepancy is that flash is written in "pages", that are 128 bytes on an ATmega328p, so the actual time is more like `4 * 1024/128 * 4ms = 0.128s.

Since we seem to be having pointless arguments over terminology, we can claim that having to do that page buffering interferes with the desired "RAM Properties", and counter-argue that there has been and can be a lot of complexity in between an x86 CPU and the actual memory chips (caches, pagers, fast page mode, burst handling, Refresh, RAS/CASE multiplexing, bus width != read width, etc etc.)

The number of short abbreviations for different types of memory seems wildly insufficient to cover all the types of memory that now exist. In the Arduino world, if a board is specified to have a "certain amount of RAM", that means "volatile, byte addressable read/write memory that explicitly does not include Flash or EEPROM. (Whether or not you can run code from it.) The Microchip datasheets consistently refer to chips having "Flash, SRAM, and EEPROM" as distinct.
I guess we could take an idea from the memory protection people and refer to memory by it's access capabilities: RX for "Read/Execute" Flash and "RW" for "Read/Write Data-only" SRAM. Maybe add in a "V" for Volatile, and "P" for some sort of paging requirement. But it'd still be complicated (is M328 flash RX, or just X?)
And what do we think about the SPI RAM chips showing up on ESP and Pico boards (or the SPI Flash chips, for that matter.)

But even supposing that the m328 data memory can't hold executable machine instructions, does that make it unusable as a "computer"? Can't you just think of the main CPU as "microcode", with some other "instruction set" that can be stored in RAM (Forth? PCode? BASIC source code?) 2k of memory is pretty awful, but that's what you had an a Sinclair ZX80 or a Kim-1. Even less on some of the other early hobbyist "computers."

So yeah, I'm firmly in the "of course an Uno is a computer. Depending on what you want, it may be a pretty awful computer, but that's a different question!"

Also: Linux on an 8-bit micro? - Dmitry.GR

An Arduino Uno computes. No sentient person can deny that. Therefore, it is a computer.

My calculation was the worst-case of storing code into flash manually one location at a time.

I fully agree.

Despite having a keypad, display, RAM, ROM, and a Monitor Program, Intel described their SDK-86 (Fig-1) as a System Design Kit rather than a Single-Board Computer. Can we infer from this that the definition of a computer was much broader at that time?


Figure-1;

They could use any name for it, which fits their promotional and commercial needs, they choose the "Kit" as it probabelly better described their selling intention - let people try and explore this, not to use it for serious computing, like salary/wage/warehouse records/bussiness critical computation.

They could use any other name too, but usually once the product is named, they stick to use the official name, not other possible variants. That is simple brand building.

I think this is similar to what @gilhad has done

Could @gilhad implement "Single Instruction Execution" feature in his above Microcomputer?

Ask @gilhad

Thanks.

Sure. I had debug tracing, which dumped both stacks after each instruction, it could as well stop and wait for confirmation or anything else. :slight_smile:

Hi @GolamMostafa !

If you compare the capabilities of an UNO with the definition of a"computer" as posted in
https://forum.arduino.cc/t/is-an-arduino-a-computer/1449995/117
it can be called a computer.

The idea that a computer must have a keyboard and a monitor is driven by the fact that in most cases the word "computer" is used to address a typical desktop or laptop realization with an Operating System like Windows or Linux.

However that was and is not necessarily the case.

Think of Punch-Card for input and printers for output in the good old Mainframe time and today's headless systems:

https://www.ebsco.com/research-starters/computer-science/univac-computer

https://en.wikipedia.org/wiki/Headless_computer

For Arduino follow the links in

https://forum.arduino.cc/t/is-an-arduino-a-computer/1449995/99

Honestly speaking, my reference point for defining a computer is the 1982 IBM PC-XT, which featured a keyboard, display, floppy disk drive, ROM BIOS, RAM, and DOS. Later on, I added a mouse, a hard disk, a printer, and a modem. Today, internet connectivity has become an integral part of what makes a computer. Clearly, the definition of a computer has evolved alongside the progress of technology.

With that in mind, let us reflect on your previou post #182 and respect each other's perspectives on how we define a computer today.

So todays usual desktops are NOT computers by your definition, because they lack DOS and floppy disk drive?

Please, be respectful to post #182 @ec2021 and post #146 @PerryBebbington.

Would be glad if you put few lines about how you have implemented "Single Stepping" mechanism in ATmega328P based Microcomputer.

I have personal experince of implementing "Single Stepping" mecanism for 8085, 8086, and 89S52 processors but NOT AVR which I tried few years ago without success.

Don't mark this as solved, leave it open, I may want to stir the pot some more.

I'm curious to hear how you did this. I know how the debug function built into the 328 works but since it wears out the flash if used enough I am curious to know if you came up with a better way.

@gilhad
I have told you that I was not able to do single steeping for 328P though I did try. You have experince and you may share it here.

You're welcome. I like the way you provoke thought and discussion.

I already told, that I have FORTH there and you insisted about user program in RAM.

I "hacked" the NEXT (which is in FLASH) which is used for executing next word. If the word is composite, than NEXT is recursively used to execute all words used there.

So I simply placed debug function inside NEXT and it was called before any one word in RAM as well as in FLASH. It was noisy, but at the moment it supplied detailed informations.

Single Stepping could offer address (and so name) of word to be executed, status of any stack and offer "continue" - step, "continue until same return stack level" - run function, "continue, util stack level decrease" - run to end of function, and any other debug mechanismus, like dump/modify memory, show expansion of any word, ...

There are none smaler steps in RAM, than calling words. There are words definitions, calling words and data, nothing more.

Code in FLASH may have included any debugging tools as wanted in compilation.

Yes, I recall seeing a FE doing something inside the mod 30 and asked about it. I was the systems programmer for several years for a large service bureau. two mod 30 and a 40. Plus a branch in Eugene, OR and in Seattle with the same.

I was told each IBM plant was given freedom to design their 360 they way they wanted, but had to match the design specs. So each model was different, but to the user was compatible.

I don't recall how the mod 40 was microcoded.