Author Topic: Worlds Smallest/Cheapest Computer !!!  (Read 16136 times)

0 Members and 1 Guest are viewing this topic.

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8276
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #25 on: December 29, 2014, 02:27:06 am »
 

Offline aargee

  • Frequent Contributor
  • **
  • Posts: 873
  • Country: au
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #26 on: December 29, 2014, 02:58:44 am »
I agree with John_L,


Check out this 32 Bit PIC, on an 8 pin DIP form factor http://www.users.on.net/~tassyjim/stuff/NanoMite.pdf running Geoff Graham's ported version of MS Basic (http://geoffg.net/micromite.html) with an on-board editor, you just need RS232 and VT100 emulation.

Quite a powerful little micro-controller/computer setup.
Not easy, not hard, just need to be incentivised.
 

Offline LabSpokane

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #27 on: December 29, 2014, 07:03:19 am »
Paulie,

How do you go about putting together an OS for the Atmel?  I've been playing around with different favors of uCs and am coming back to the Atmel just for its relative simplicity.

Thanks!
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #28 on: December 29, 2014, 09:53:29 am »
If you mean from scratch I'll tell you how I'd go about it:

1. Choose an MCU based on cost, memory, and peripherals required. It don't hurt to start with one of the bigger chips and scale down when done. Although historically a PIC-head, I've recently gravitated toward AVR too. Specially since adopting a bare metal philosophy and with cost and development time a factor. Those who live in HLL land might not be so particular with all the ugly details hidden from them.

2. Choose toolset and test the setup with something simple like a classic blinky.. In my case I wanted to use a lowest cost chip and it was necessary to leave as much space open for user programs so assembly (AVRASM) was the obvious choice. Then maybe get serial I/O running for debugging even if the final app don't need that.

3. Decide what functions are required and what's needed for I/O and the human interface then test those routines individually. In my case serial seemed to be the lowest cost interface so I started with a hello world demo. Hexdecimal input and output were next. Since loading and storing user code was required it was also necessary to test out some flash self program routines (SPM).

4. Integrate all the bits and pieces and make sure they play well together. A command interpreter (get key and do something) was needed here so that tied things together. As mentioned memory space was at a premium for my app so some effort was put into reducing program size down to  the minimum. Currently only only around 180 instruction words  which left plenty of room for user programs. Pretty good considering what's going on.

The Mega8 has a rather nice bootloader area for protecting the OS from corruption so that was nice. A Mega328 is almost as cheap and has lots more flash so it would be a great candidate if cost were not the biggest goal. In fact Mega128 with 16 times more memory yet costing only a dollar and change would be another good choice. Unless you were trying to establish a world record for smallest and cheapest like me.
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #29 on: December 29, 2014, 01:15:53 pm »
For a "computer", I would pick a relatively small and fast chip running an interpreter for some language. The interpreted code would then be stored in an external EEPROM. This way there's lots of space for code and the uC focus only on making a good interpreter, even implementing "higher" level functions to boost the interpreted language's performance. There could be a small FLASH space reserved for special user-defined routines, defined in the high level code. Ideally there would be a 3rd chip, a RAM since uCs usually have small RAM sizes, but it complicates things. This could probably be implemented under a $1 and still be very small.
« Last Edit: December 29, 2014, 01:17:42 pm by nuno »
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #30 on: December 29, 2014, 05:30:56 pm »
I agree with John_L,


Check out this 32 Bit PIC, on an 8 pin DIP form factor http://www.users.on.net/~tassyjim/stuff/NanoMite.pdf running Geoff Graham's ported version of MS Basic (http://geoffg.net/micromite.html) with an on-board editor, you just need RS232 and VT100 emulation.

Quite a powerful little micro-controller/computer setup.

That's very neat. Small and useful out of the box. A QFN package would make it even smaller.

BTW, another option for interpreted language is Forth. It's very compact and customizeable.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #31 on: December 29, 2014, 05:34:56 pm »
Paulie, you can try running this interpreter. This way it will qualify as a 'real' PC ;-)

http://amforth.sourceforge.net/
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #32 on: December 29, 2014, 08:35:22 pm »
I would love to run Forth on one of these chips. I had great fun with it on my old Commodore.  Unfortunately there was no obvious path to implement on that site. I'll tell you a secret, if it ain't easy I'm outta here. Generally that means at the very least a hex file and wiring diagram.

It's amazing how many DIY "gurus" put up hi-res photos, fancy PDFs, Eagle files, and pages and pages  of source expecting noobs to install and struggle through their personal idea of a development setup. Usually involves gigabytes of bloatware and 3 week learning curve. Then they wonder why the blog dies off.

Or the guys that scatter pieces all over the web. Github, youtube, Savana, blogs, Google, forums, etc with no single location for the needed info. These guys love to watch noobs dance around the world but then wonder why their project withers in the bud  too.

I do find interpreters fascinating and specially fond of BASIC because it's so.... that's right.... EASY! That Micromite looks interesting but I'm more into DIY than closed source "store boughten" chips. Here's a version that was open and only took a few minutes to get up and running: http://www.instructables.com/id/Single-Chip-AVR-BASIC-Computer/

Flash the chip, connect to TV with clip leads, yank the keyboard from my PC and plug in, YOWZA... "OK"... ready to go. This is my kinda project.
 

Offline LabSpokane

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #33 on: December 29, 2014, 09:29:32 pm »
Paulie,

What device are you using to write to the uC?    Any advice on the best choice to get one's feet wet?

Thanks!
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #34 on: December 29, 2014, 09:41:25 pm »
I actually use 4 wires going to my LPT port but for most USBASP is highly recommend:

http://www.ebay.com/itm/USBASP-USBISP-AVR-Programmer-Adapter-10-Pin-Cable-USB-ATMEGA8-ATMEGA128-DX-/271712366467?pt=LH_DefaultDomain_0&hash=item3f4351af83

Lots more trouble free than MKII, TnyISP, or ArduinoISP. At a dollar and change each shipped it might be a good idea to pick up 2 or 3. In addition to functioning as a programmer they make an excellent target too. Cheaper than a Pro Mini.
 

Offline LabSpokane

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #35 on: December 29, 2014, 09:49:07 pm »
Thanks!  Two on order.  I'm assuming that does not allow debugging.  Do you handle most debugging via serial output? 
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #36 on: December 29, 2014, 10:02:54 pm »
Smart move.

Actually because my projects tend to be on the simple side most debugging is done with an LED. Believe it or not in addition to just on/off you can actually send out hex and/or decimal numbers. So I'd say 90% of the time LED, 9% of the time serial, and for that one out of a hundred tuffy I'll fire up AVRStudio and my Dragon.

The ARM chips are much nicer for this with built-in SWIM or SWD. The STLINK debug dongles go for 2$-3$ or you can actually build one from scratch for less. Something that is not possible with Atmel. Nothing's perfect...
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #37 on: December 30, 2014, 01:52:54 am »
I do find interpreters fascinating and specially fond of BASIC because it's so.... that's right.... EASY! That Micromite looks interesting but I'm more into DIY than closed source "store boughten" chips. Here's a version that was open and only took a few minutes to get up and running: http://www.instructables.com/id/Single-Chip-AVR-BASIC-Computer/

That's an impressive project indeed, achieving so much with that little off the shelf hardware.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #38 on: December 30, 2014, 10:33:54 am »
Quote
It's amazing how many DIY "gurus" put up hi-res photos, fancy PDFs, Eagle files, and pages and pages  of source expecting noobs to install and struggle through their personal idea of a development setup.
I'm always a bit surprised at the people who put up photos of their hand-wired hardware abominations without a PCB or even a schematic for us SW jocks to follow, without looking up a bunch of datasheets and stuff.  :-)
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #39 on: December 30, 2014, 01:44:57 pm »
LOL. And I find it specially annoying when those guys offer on the 1st page to supply schematics and code for anybody who might want to build one and no only no takers but all that comes back is criticisms, complaints, and whining. :)
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #40 on: December 30, 2014, 06:28:00 pm »
Ok, so after receiving a couple POLITE offline requests for construction info a wiring diagram and hex file are attached to the first post. It's amazing what we can do if we use the magic word.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #41 on: December 31, 2014, 09:47:30 am »
You could get an old version of linux running on a STM arm micro with a little effort.

That would be much more powerful and you could run/compile some of the simple linux apps for it.
You would need some external ram and flash though
Pff. Linux...

Why don't you port the 8051 basic to an stm32. Slap on a bluetooth module to the uart and youd have a real home computer on a single chip. All you need is a terminal with bluetooth (smartphone). The code editor and runtime reside in flash, you can store programs in flash and have every single io pin avaialble. No need for a bloated operating system. Bring back the home computers that booted straight into basic in a millisecond flat.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #42 on: December 31, 2014, 06:29:17 pm »
Why don't you port the 8051 basic to an stm32. ... No need for a bloated operating system.
In that regard, embedded lua looks quite interesting:
http://www.eluaproject.net/overview/status
http://www.fussylogic.co.uk/blog/?p=1222
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #43 on: January 01, 2015, 01:49:29 pm »
No direct experience with Lua but Python has been a life saver for programming on the PC. It's weird to see people struggling to do serial or menus with C#, .NET, Visual this and that, when a few minutes with script languages like these can save hours (or months). I'm amazed the full interpreter can be fit into a 256k STM chip and would love to give that a try. Unfortunately like many of these efforts there is no easy implementation on that site. No diagrams or binary available. You need to register into their secret society to get anything and even then forced to compile from scratch.

I've also had some experience with small Linux distributions (Puppy. Tinycore, etc) but at best we are talking megabytes. Many years ago, back in the days of floppies, a fellow sent me a CLI version that ran off 720k. No HD involvement as I recall. But that is lost in the mists of time and it don't look like anybody will be achieving those kind of milestones again.

No matter what it's doubtful any these will ever run on a 50 cent MCU.

ps. I'm still thrilled by the idea of implementing a BASIC interpreter though. There are over 200 bytes left in the boot section of this Mega8 so it might be possible to squeeze in a basic BASIC interpreter. It won't quite be GW, QBASIC, or BASICA or even Palo Alto but initial experiments last night were promising.
« Last Edit: January 01, 2015, 02:01:13 pm by paulie »
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #44 on: January 01, 2015, 04:48:31 pm »
No direct experience with Lua but Python has been a life saver for programming on the PC. It's weird to see people struggling to do serial or menus with C#, .NET, Visual this and that, when a few minutes with script languages like these can save hours (or months). I'm amazed the full interpreter can be fit into a 256k STM chip and would love to give that a try. Unfortunately like many of these efforts there is no easy implementation on that site. No diagrams or binary available. You need to register into their secret society to get anything and even then forced to compile from scratch.
Indeed. Given the current thread audience I refrained from mentioning python to reduce the chance of a frothing event. ;) But now that you mention it ...  Embedded python also looks interesting. Basic has less appeal to me, but disregarding personal preference Basic also seems totally legit as an embedded interpreter for stm32. I'd go with either elua or embedded python, whichever happens to work out of the boxier.

Quote
Unfortunately like many of these efforts there is no easy implementation on that site. No diagrams or binary available. You need to register into their secret society to get anything and even then forced to compile from scratch.
Which one? You mean elua? I thought that step by step guide in the 2nd link was pretty doable. I certainly don't see any login requirements or some such. Maybe you mean python? That elua guide looks plausible, in that I see all the required categories of things being addressed. But then again, maybe you prefer development under windows in which case that guide is less useful. There probably are more guides or maybe even ready to go installers. Haven't looked that hard. :-//

Quote
I've also had some experience with small Linux distributions (Puppy. Tinycore, etc) but at best we are talking megabytes. Many years ago, back in the days of floppies, a fellow sent me a CLI version that ran off 720k. No HD involvement as I recall. But that is lost in the mists of time and it don't look like anybody will be achieving those kind of milestones again.
720k? That much?!? We made do with less than that back in the day, and had to haul our own 19" racks up hill in the snow. Then walk all the way back to the village (still up hill somehow, and still snow of course) to get the slackware floppies, and and... ;) And no I do not miss those days at all. Trying to do a big compile job on an 4 Mb machine was not exactly fast. :P First thing I did was get an extra 16 Mb module for HOLY SHIT THAT MUCH?!? Well worth it.

But yes, sometimes I have to smile a little when I see one of those current day "space constrained" distros. But fair is fair, you tend to get more goodies installed these days, so you do get some convenience in return for the increased bloat. And with flash memory being free with a packet of cornflakes the larger install seems a reasonable tradeoff to me. Memory usage however could do with some tuning sometimes.

Anyways, will be interesting to see what flavor of basic you come up with for the 50 cent mcu. :-+
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #45 on: January 02, 2015, 07:17:25 pm »
I thought that step by step guide in the 2nd link was pretty doable.

Maybe doable but not EASY. At least from my viewpoint. Like I said if it's interesting and the creator is courteous enough to supply hex and wiring I may give something a try. That fellow expects you to not only hunt around the net for bits and pieces but then jump through his oddball os hoops to compile. Even then there's no guarantee anything will work. His comment:

Quote
the build instructions on the website are wrong.

is a perfect example and leads me to wonder if he got his right. Anyone who was motivated enough might not hesitate to jump in but that's not me. If it were a lower cost chip like one of the $2 512k f4 dealies it might be worth it but I'm not going to spring for a $50 discovery just to gamble that he knows what he's doing.

Anyway I've added a couple more keywords to the 50 cent BASIC which brings it up to 9 total:

print
inp
out
for...next
end
input
a=
a+b=
a-b=

Not bad for a little over hundred machine instructions. Of course they do make use of a half dozen or so BIOS calls from the original OS otherwise would take up several times more space. I've also succeeded in running a couple full blown MS type 4k-8k interpreters like the one from that link when loaded as regular apps.


 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #46 on: January 03, 2015, 05:09:10 pm »
Maybe doable but not EASY. At least from my viewpoint. Like I said if it's interesting and the creator is courteous enough to supply hex and wiring I may give something a try. That fellow expects you to not only hunt around the net for bits and pieces but then jump through his oddball os hoops to compile.
Is there any particular stm32 platform that is on the supported list for which you'd like a hex file? If the toolchain install happens to be straightforward I don't mind running the compile for one more target and attaching the hex file. *checks list* Okay, that basically boils down to an STM32F103 board...
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #47 on: January 04, 2015, 04:12:24 pm »
Thanks. I might like to take you up on that offer. It would be very interesting to see how well the build procedure goes for you and details on that would be appreciated.

You are right that the STM103 are best candidates. Particularly STM32F103RE (ET-Stamp) which are available for a little over $2 small qty from china. I've been trying to set up a group buy with some local ARM enthusiasts but so far no bites. We could each throw together a couple STM boards significantly more powerful than what we have for $5 or so total investment. If there's a possibility to run something like Lua that would be huge motivation.

Unless i"m confusing it with the ePython one there's a minimal Linux CLI shell hidden away in there too. Maybe slightly more impressive than my "AVROS". :)
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #48 on: January 06, 2015, 04:15:38 am »
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Worlds Smallest/Cheapest Computer !!!
« Reply #49 on: January 07, 2015, 03:36:22 pm »
Thanks. That looks like absolutely the worlds cheapest WIFI computer and definitely smaller than mine. Off the shelf too so no need to build anything. With Lua installed at least 100x more powerful than 50 cent BASIC.

I have several of those ESP8266 modules and have been using them quite successfully for home control and security from remote locations. No attempt to program them though because there doesn't seem to be a kindergarten level tutorial around. Lots of sites but again you have to hunt around for the bits and pieces. I guess attaching everything to a blog or thread is a lost art. I may give it a try anyway if I get time some day because the rewards might turn out to be worth it.

ps. Thanks to you and Mrfibble I've spent many hours now learning a new language. It wasn't quite as easy to get going as Python. Not getting to the point of being able to send serial hello world anyway.
« Last Edit: January 07, 2015, 03:43:20 pm by paulie »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf