Author Topic: Using an x86 pc as an obese microcontroller?  (Read 12662 times)

0 Members and 1 Guest are viewing this topic.

Offline botcrusherTopic starter

  • Regular Contributor
  • *
  • Posts: 192
  • Country: ca
Using an x86 pc as an obese microcontroller?
« on: March 04, 2016, 02:36:24 pm »
Straightforward enough, let's say i have an army of Pentium 4 boards that still work, is there any way i could interface with it and use it as a realllly fast controller?

Short of some kind of pci /pcie card, i wonder if i could cheat and hijack the audio lines for dialup-esque data transmission.
« Last Edit: March 04, 2016, 02:42:34 pm by botcrusher »
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Using an x86 pc as an obese microcontroller?
« Reply #1 on: March 04, 2016, 02:59:52 pm »
nothing stopping you. providing you can code it and interface you can do as you like. I'm guessing it will be much harder to write low level code for but have no experience to go by.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12859
Re: Using an x86 pc as an obese microcontroller?
« Reply #2 on: March 04, 2016, 03:09:34 pm »
Back in the days of MSDOS and the ISA bus, this was fairly common, and one could get various PIO cards for the purpose. However it is extremely difficult to write fully deterministic code for Pentium class or higher processors, + you have a very restricted choice of OSes if you need guaranteed realtime control.
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Using an x86 pc as an obese microcontroller?
« Reply #3 on: March 04, 2016, 10:13:33 pm »
Not to mention that the P4 is some of the worst performance / Watt ever shipped by Intel. Modern hardware might cost a few bucks now (but it's so cheap nowadays, who cares?), and will definitely save money via lower power consumption, probably already after a few months of 24/7 operation.
,
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Using an x86 pc as an obese microcontroller?
« Reply #4 on: March 04, 2016, 10:18:26 pm »
I'd be interested to know why so much processing power is required for a micro controller job.
 

Offline Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3338
  • Country: ca
  • Place text here.
Re: Using an x86 pc as an obese microcontroller?
« Reply #5 on: March 05, 2016, 12:06:37 am »
Or electrical power, or weight, or space, or noise. The VIC-20 is a far better controller IMO.
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Using an x86 pc as an obese microcontroller?
« Reply #6 on: March 05, 2016, 12:21:56 am »
Back in the days of MSDOS and the ISA bus, this was fairly common, and one could get various PIO cards for the purpose. However it is extremely difficult to write fully deterministic code for Pentium class or higher processors, + you have a very restricted choice of OSes if you need guaranteed realtime control.
You have to define realtime first because there is no use in overspecifying a constraint. If you need milli-second resolution then even Windows will do just fine otherwise it would be useless for playing audio & video. Still you'd need I/O cards, drivers and such to do something sensible with a PC platform.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4539
  • Country: gb
Re: Using an x86 pc as an obese microcontroller?
« Reply #7 on: March 05, 2016, 12:25:43 am »
Straightforward enough, let's say i have an army of Pentium 4 boards that still work, is there any way i could interface with it and use it as a realllly fast controller?

Short of some kind of pci /pcie card, i wonder if i could cheat and hijack the audio lines for dialup-esque data transmission.

There are many advantages, that the Pentium 4 solution has, over modern alternatives, such as the raspberry PI 3.

The P4 is massively more powerful. It produces probably 50x as much heat POWER, as the RPI3.
It calculates things in a really heavy weight way. Perhaps weighing well over 50x as much.
If you use them, It will produce at least 50x the laughter, from me when I hear about it.
It can do millions of things, the RPI3 CAN'T do. Such as the P4 won't use USB, HDMI, modern PCI cards, modern power supplies, DDR4 (or DDR3 or DDR2 for that matter).

Actually on a more serious note. Many PCs are apparently used in things like bank cash machines, travel money exchange machines, shop tills (some), etc etc.

You can actually get proper Pentium 3 embedded boards. From what I have seen, they are just like massive PCI expansion cards. Which allow VGA and other stuff to be plugged in to them. They are used in applications, such as embedded machine (very large) controllers.

Seriously, why not get a Raspberry PI 3, or something. It will be considerably more useful and accessible (I/O) + relatively future proof.
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: Using an x86 pc as an obese microcontroller?
« Reply #8 on: March 05, 2016, 05:04:22 pm »
army of Pentium 4

well, if you are up in the north you can use them for heating
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Using an x86 pc as an obese microcontroller?
« Reply #9 on: March 05, 2016, 06:19:43 pm »
Historically there has been a large market for embedded PCs presumably since the software environment was well established leading to all sorts of devices like ATMs, information kiosks, photo booths etc. so it's not an outrageous solution.

Which solution you take might be determined by factors like size, power consumption etc, in which case you will get more bang for your buck with more modern hardware.

The non-PC segment has evolved hugely over the last few decades with the ascendance of things like ARM, Linux etc,. but as with all technology the goal posts continue to move.
 

Offline eugenenine

  • Frequent Contributor
  • **
  • Posts: 865
  • Country: us
Re: Using an x86 pc as an obese microcontroller?
« Reply #10 on: March 05, 2016, 06:34:36 pm »
While you can use those old boards, its not really worth it anymore.  They take up a lot of space, produce a lot more heat and use a lot more power then a raspberry pi or beaglebone.  I cleaned out most of my old PC's and replaced them with Pi's and used some old cell phone changers and microsd cards lying around from upgrading those.
 

Offline botcrusherTopic starter

  • Regular Contributor
  • *
  • Posts: 192
  • Country: ca
Re: Using an x86 pc as an obese microcontroller?
« Reply #11 on: March 05, 2016, 07:15:49 pm »
Not to mention that the P4 is some of the worst performance / Watt ever shipped by Intel. Modern hardware might cost a few bucks now (but it's so cheap nowadays, who cares?), and will definitely save money via lower power consumption, probably already after a few months of 24/7 operation.
I know, i know. I have to deal with explaining why my school board's "free" government hand me downs are a terrible solution.
You haven't seen slow until you witness 25 pentium 4s trying to log into windows 7.
well, at least it's got hyper threading?  :-//

Actually Intel is sick enough to market x86 microcontrollers... Google Quark D1000/D2000 or Quark SE.
To be frankly, it is quite power efficient -- my Arduino 101 (based on QUark SE -- a 32MHz x86, a 32MHz DSP, 6 axis MEMS and BLE) runs comparably to just any other Arduino boards.

Wasn't there a big issue with the intel boards actually being incredibly slow when used as an arduino?

While you can use those old boards, its not really worth it anymore.  They take up a lot of space, produce a lot more heat and use a lot more power then a raspberry pi or beaglebone.  I cleaned out most of my old PC's and replaced them with Pi's and used some old cell phone changers and microsd cards lying around from upgrading those.
But the advantage to using a P4 is that i have a virtually endless supply! They decommissioned a bunch of the really old Pentium 4 towers (beige, built when p4s were actually considered "fast")

I'm aware the heat to perfomance is beyond terrible, but would you rather i used pentium D boards?
for those who don't know, a pentium D is two pentium 4 chips forced onto the same die, the thermal output is terrifying.
« Last Edit: March 05, 2016, 07:27:39 pm by botcrusher »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Using an x86 pc as an obese microcontroller?
« Reply #12 on: March 05, 2016, 09:42:54 pm »
Quote
is there any way i could interface with it and use it as a realllly fast controller?

Running DOS on them.
================================
https://dannyelectronics.wordpress.com/
 

Offline Wilksey

  • Super Contributor
  • ***
  • Posts: 1329
Re: Using an x86 pc as an obese microcontroller?
« Reply #13 on: March 05, 2016, 10:24:20 pm »
Install Linux on them, but it depends on what you want to do with it? I doubt it has things like SP / I2C and probably only 1 serial port, you can buy expansion cards, but, why would you?

You could use them for processing heavier stuff that a small micro can't like data logging or something perhaps?
 

Offline Hypernova

  • Supporter
  • ****
  • Posts: 655
  • Country: tw
Re: Using an x86 pc as an obese microcontroller?
« Reply #14 on: March 06, 2016, 01:37:37 am »
I'm aware the heat to perfomance is beyond terrible, but would you rather i used pentium D boards?
for those who don't know, a pentium D is two pentium 4 chips forced onto the same die, the thermal output is terrifying.

I remember Tom's Hardware overclocking Celeron Ds, gave great performance per CPU $ but the wattage was surreal.

As far as OS platform goes from what I've heard from the gray beards here DOS is the way to go. As for I/O you probably have to try make your own PCI expansion boards.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8270
Re: Using an x86 pc as an obese microcontroller?
« Reply #15 on: March 06, 2016, 05:41:43 am »
Seriously, why not get a Raspberry PI 3, or something. It will be considerably more useful and accessible (I/O) + relatively future proof.
It's also considerably less open or documented. Good luck getting anything useful from Broadcom. |O

On the other hand, the PC has been around long enough that all the warts and quirks are well-documented, you can find datasheets for most of the critical components easily. Older ones will be better if you want to play around, especially those before the introduction of  "secure" boot and the whole (U)EFI mess.
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4539
  • Country: gb
Re: Using an x86 pc as an obese microcontroller?
« Reply #16 on: March 06, 2016, 07:43:28 am »
Seriously, why not get a Raspberry PI 3, or something. It will be considerably more useful and accessible (I/O) + relatively future proof.
It's also considerably less open or documented. Good luck getting anything useful from Broadcom. |O

On the other hand, the PC has been around long enough that all the warts and quirks are well-documented, you can find datasheets for most of the critical components easily. Older ones will be better if you want to play around, especially those before the introduction of  "secure" boot and the whole (U)EFI mess.

I agree that the Raspberry PI 3 is NOT fully open sourced. BUT I use it myself (version 2, currently), because I have enough information to do what I want with it, and DON'T need to know how everything about it works.

But if that worries you and/or the OP, then there are plenty of open sourced, similar microcontroller based, boards available, many of which are very reasonably priced. Or even buy a microcontroller and build it yourself.

But an old Pentium 4 system has so much wrong with it, as regards physical size, power consumption, lack of availability of brand new stuff for it (e.g. the capacitors on the motherboard will now be, how many years do you say ?).

I don't really agree with your implication that a Pentium 4 PC, is hugely open sourced and known about, in minute detail. (Fully, PUBLICLY).

I.e. If you used Dos or later (original), have Microsoft released the source code etc for it ?
Have Intel released the full factory documentation with all the (in all likelihood), hundreds of minute errata with the Pentium 4 cpu ? (to the general public).

Does it really matter if you can get the raspberry PI 3 to do what you want, that it is NOT fully open sourced ?

tl;dr
I still think that it is NOT a good idea to go for the Pentium 4's.

Allowable exceptions (in my opinion), would be a third world country, where even low cost microcontrollers, are unavailable and/or out of reach, or doing it purely for fun, obsession with intel Pentium 4's or just as a big learning exercise, would NOT sound too unreasonable.

If people are really that concerned about the open sourced nature of things, then go for a fully open sourced cpu.
« Last Edit: March 06, 2016, 07:46:14 am by MK14 »
 

Offline Mechanical Menace

  • Super Contributor
  • ***
  • Posts: 1288
  • Country: gb
Re: Using an x86 pc as an obese microcontroller?
« Reply #17 on: March 06, 2016, 12:06:29 pm »
http://wiki.osdev.org/Main_Page

Has some decent introductions to barebones x86 development.
Second sexiest ugly bloke on the forum.
"Don't believe every quote you read on the internet, because I totally didn't say that."
~Albert Einstein
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4539
  • Country: gb
Re: Using an x86 pc as an obese microcontroller?
« Reply #18 on: March 06, 2016, 12:24:21 pm »
Allowable exceptions (in my opinion), would be a third world country, where even low cost microcontrollers, are unavailable and/or out of reach, or doing it purely for fun, obsession with intel Pentium 4's or just as a big learning exercise, would NOT sound too unreasonable.

Can anyone get a full computer if even a MCU is hard to get? Besides, EMS network can ship any legal goods to virtually any populated point on this planet.

PS. I consider China a 3rd world country (if you define 3rd world country = developing country), and I started playing with MCU since I was 13 -- I'm almost 24 now, and I know people working with MCU (not for government or research facilities) since the 90s.

Actually, some time ago, I was reading about this very thing, I can probably link to it if you want.

Basically it was a number of enthusiasts, similar to us/EEVblog members. But who were living in one of the poorest countries in the world (by the sound of it).

Sooooooooooo ....

How do they manage to get their (Intel I7) 4790K (or Skylake, or Socket 2011 etc), souped up PC, bought and made, when they have to search through rubbish tips (LITERALLY!), each day, to get by ? (I might be remembering it wrong, maybe it was NOT that bad. It was some time since I read the article).

The answer was that they (if I recall correctly) collected old bits of old computers, from those tips. Then invented techniques, whereby they swapped out the "bad/cheap capacitors", in cheap power supplies. Also they upgraded other components, with other scrap ones. Ending up with a somewhat decent power supply. Which cost them $0.

tl;dr
I imagine I would be doing similar, if I lived there.

But you could well be right.

Microcontrollers are so cheap now, what from about $0.10, I think even less in China, maybe less elsewhere. They can probably be bought just about everywhere.

Except perhaps North Korea.

EDIT: On reflection, I think I am probably recalling the article BADLY. I've tried to find it, but can't. I think it came from the badcaps site, or similar.

The following is a vaguely similar type of thread:

http://www.badcaps.net/forum/showthread.php?t=23128
« Last Edit: March 06, 2016, 01:16:18 pm by MK14 »
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3441
  • Country: us
Re: Using an x86 pc as an obese microcontroller?
« Reply #19 on: March 07, 2016, 02:17:07 am »
...
PS. I consider China a 3rd world country (if you define 3rd world country = developing country)
...


First, Second, and Third word are jargon developed during the cold war to describe allegiance...

First world = USA and allies (or counties operating within there sphere of influence)
Second world = USSR and allies (or counties operating within there sphere of influence)
Third word = the rest.

So, China during cold war was "second world" when the term was used for its original meaning.  USSR is kaput, I suppose we can replace it with Russia.  So, China could still be 2nd or 3rd depending on its relationship with Russia.
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3441
  • Country: us
Re: Using an x86 pc as an obese microcontroller?
« Reply #20 on: March 07, 2016, 06:36:44 am »
First, Second, and Third word are jargon developed during the cold war to describe allegiance...

First world = USA and allies (or counties operating within there sphere of influence)
Second world = USSR and allies (or counties operating within there sphere of influence)
Third word = the rest.

So, China during cold war was "second world" when the term was used for its original meaning.  USSR is kaput, I suppose we can replace it with Russia.  So, China could still be 2nd or 3rd depending on its relationship with Russia.

Thanks. For the first time I know the exact definition. I guess that's why I chose to study science and engineering -- I constantly fail history and geography in high school ;D.

I know the feeling.  When I first saw the term "2nd world nations..." in news magazines, I had no idea what they were talking about.  I thought may be they mean some other geographical locale!  One day, I got so confused by the news I just had to research at the library what the hack that means.

These days, 3rd world is used mainly to describe poor countries.  Third world was typically poor even during the cold war.  Third world by definition isn't aligned with USA or USSR so it doesn't have a big brother to help.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Using an x86 pc as an obese microcontroller?
« Reply #21 on: March 07, 2016, 09:35:36 am »
Quote
the PC has been around long enough that all the warts and quirks are well-documented, you can find datasheets for most of the critical components easily.
I think you'll find this not to be the case, if you actually try to do low-level bare-metal programming of a modern x86 CPU or chipset.  Intel Documentation comes in several levels of "proprietaryness", for example, and something like a "BIOS Writers guide" is a "red" document that had a bunch of requirements including time limits and such.  I had (briefly) access to some "yellow" level manuals; they had to be returned to Intel "when you're done."

Now, in terms of using a PC as a microcontroller, the PC will generally come with a BIOS installed that will, if properly configured, leave the board in a pretty good state to do bare metal programming ... thereafter (using something like grub as a bootloader.)  We did have one mysterious performance anomaly that turned out to be due to the BIOS periodically doing USB stuff so that it could make USB keyboards appear at BIOS level...
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3441
  • Country: us
Re: Using an x86 pc as an obese microcontroller?
« Reply #22 on: March 07, 2016, 06:36:43 pm »
...Now, in terms of using a PC as a microcontroller, the PC will generally come with a BIOS installed that will, if properly configured, leave the board in a pretty good state to do bare metal programming ... thereafter (using something like grub as a bootloader.)  We did have one mysterious performance anomaly that turned out to be due to the BIOS periodically doing USB stuff so that it could make USB keyboards appear at BIOS level...



But once you start using the BIOS, it adds to the issue of "difficult to make it deterministic" as Ian.M's reply (quote below) pointed out.

386 is probably a lot easier if it must be deterministic.  If I recall: single decoder queue, no predictive jump/speculative execution, no CPU memory cache; and surely you wont have USB on an old 386 motherboard!

But once you get down to 386, why not just select an MCU which would be designed as an MCU.


Back in the days of MSDOS and the ISA bus, this was fairly common, and one could get various PIO cards for the purpose. However it is extremely difficult to write fully deterministic code for Pentium class or higher processors, + you have a very restricted choice of OSes if you need guaranteed realtime control.
 

Offline Porch

  • Contributor
  • Posts: 37
Re: Using an x86 pc as an obese microcontroller?
« Reply #23 on: March 07, 2016, 09:17:48 pm »
 

Offline R_Gtx

  • Regular Contributor
  • *
  • Posts: 52
  • Country: gb
Re: Using an x86 pc as an obese microcontroller?
« Reply #24 on: March 07, 2016, 11:48:19 pm »
...Now, in terms of using a PC as a microcontroller, the PC will generally come with a BIOS installed that will, if properly configured, leave the board in a pretty good state to do bare metal programming ... thereafter (using something like grub as a bootloader.)  We did have one mysterious performance anomaly that turned out to be due to the BIOS periodically doing USB stuff so that it could make USB keyboards appear at BIOS level...



But once you start using the BIOS, it adds to the issue of "difficult to make it deterministic" as Ian.M's reply (quote below) pointed out.

386 is probably a lot easier if it must be deterministic.  If I recall: single decoder queue, no predictive jump/speculative execution, no CPU memory cache; and surely you wont have USB on an old 386 motherboard!

But once you get down to 386, why not just select an MCU which would be designed as an MCU.


Back in the days of MSDOS and the ISA bus, this was fairly common, and one could get various PIO cards for the purpose. However it is extremely difficult to write fully deterministic code for Pentium class or higher processors, + you have a very restricted choice of OSes if you need guaranteed realtime control.

For heavy-duty embedded applications there are a number of manufacturers of VME SBCs using intel i7s. Modern boards will use, say, coreboot with Intel® Firmware Support Package.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Using an x86 pc as an obese microcontroller?
« Reply #25 on: March 08, 2016, 01:15:15 am »
Quote
But once you start using the BIOS, it adds to the issue of "difficult to make it deterministic"
Ideally, you don't use the BIOS *except* to set up the cpu and chipset.   The trick is finding the settings (and/or things you can do programatically) that get it completely out-of-the-way after your "bare metal" code starts.

(As a would-be bare-metal PC programmer, I have about zero interest in reading the EEPROMs on the memory DIMMS and setting up the chipset for the correct timings/etc.  As one example.)
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: Using an x86 pc as an obese microcontroller?
« Reply #26 on: March 08, 2016, 01:31:12 am »
Quote
But once you start using the BIOS, it adds to the issue of "difficult to make it deterministic"
Ideally, you don't use the BIOS *except* to set up the cpu and chipset.   The trick is finding the settings (and/or things you can do programatically) that get it completely out-of-the-way after your "bare metal" code starts.

(As a would-be bare-metal PC programmer, I have about zero interest in reading the EEPROMs on the memory DIMMS and setting up the chipset for the correct timings/etc.  As one example.)

except you cant because this is pc
interrupts, exceptions, bios takes over a lot of stuff and runs in the background constantly
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline timb

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Pretentiously Posting Polysyllabic Prose
    • timb.us
Re: Using an x86 pc as an obese microcontroller?
« Reply #27 on: March 08, 2016, 02:10:49 am »

Quote
But once you start using the BIOS, it adds to the issue of "difficult to make it deterministic"
Ideally, you don't use the BIOS *except* to set up the cpu and chipset.   The trick is finding the settings (and/or things you can do programatically) that get it completely out-of-the-way after your "bare metal" code starts.

(As a would-be bare-metal PC programmer, I have about zero interest in reading the EEPROMs on the memory DIMMS and setting up the chipset for the correct timings/etc.  As one example.)

except you cant because this is pc
interrupts, exceptions, bios takes over a lot of stuff and runs in the background constantly

Not true. You can hook into all that stuff in your own code. Do you think Windows really relies on the BIOS to handle I/O, keyboard input, interrupt management, etc.?! Hell no! Once your PC boots, that's pretty much it for the BIOS these days. No reason you couldn't do the same in your own code.
Any sufficiently advanced technology is indistinguishable from magic; e.g., Cheez Whiz, Hot Dogs and RF.
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: Using an x86 pc as an obese microcontroller?
« Reply #28 on: March 08, 2016, 04:52:24 am »
except you cant because this is pc
interrupts, exceptions, bios takes over a lot of stuff and runs in the background constantly

Not true. You can hook into all that stuff in your own code. Do you think Windows really relies on the BIOS to handle I/O, keyboard input, interrupt management, etc.?! Hell no! Once your PC boots, that's pretty much it for the BIOS these days. No reason you couldn't do the same in your own code.

are you suggesting someone should use windows as a software base for his "pc microcontroller"? :))) or write his own os from scratch? with exceptions, scheduling, memory management and hookers?
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3441
  • Country: us
Re: Using an x86 pc as an obese microcontroller?
« Reply #29 on: March 08, 2016, 07:40:53 am »
except you cant because this is pc
interrupts, exceptions, bios takes over a lot of stuff and runs in the background constantly

Not true. You can hook into all that stuff in your own code. Do you think Windows really relies on the BIOS to handle I/O, keyboard input, interrupt management, etc.?! Hell no! Once your PC boots, that's pretty much it for the BIOS these days. No reason you couldn't do the same in your own code.

are you suggesting someone should use windows as a software base for his "pc microcontroller"? :))) or write his own os from scratch? with exceptions, scheduling, memory management and hookers?

That brings us back to the question earlier - why use the PC as MCU at all.

Without Linux or Windows or some such, the PC is rather useless.  You have to rewrite every damn driver and software - down to a UART driver, keyboard driver, and a VGA/CGA driver of some sort.  The convenience that came with the PC, like plugging in a USB Cam and it works, just wont be there.  All you get with the PC-MCU is just a larger hunk of iron.

If one "gives up" and just load Windows to run the PC as a giant MCU, you better hope that the "fire detection" routine isn't the one running when Windows decides it needs an auto-update.

Future news story: "The investigation of the rocket explosion found: when the rocket was about to do the 0.3 second burn to slow down for re-entry, Windows decides to phone home via the satellite link for the latest auto update...  The rocket did burn up due to delays, but investigation also shows the update was successful and Windows was absolutely up to date with the latest patches before the rocket hits ground."
 

Offline botcrusherTopic starter

  • Regular Contributor
  • *
  • Posts: 192
  • Country: ca
Re: Using an x86 pc as an obese microcontroller?
« Reply #30 on: March 08, 2016, 10:38:09 pm »


If one "gives up" and just load Windows to run the PC as a giant MCU, you better hope that the "fire detection" routine isn't the one running when Windows decides it needs an auto-update.

Future news story: "The investigation of the rocket explosion found: when the rocket was about to do the 0.3 second burn to slow down for re-entry, Windows decides to phone home via the satellite link for the latest auto update...  The rocket did burn up due to delays, but investigation also shows the update was successful and Windows was absolutely up to date with the latest patches before the rocket hits ground."

Just lol.
I'd probably run linux on it, make a python script to communicate via the sound interface. maybe use some other interface, don't say serial, that's just too easy.
If i don't find a better use for it, i have a mini-ITX rig with a modern pentium (G3258) that i could use.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Using an x86 pc as an obese microcontroller?
« Reply #31 on: March 09, 2016, 12:28:00 am »
Quote
why use the PC as MCU at all
a PC makes for a wonderfully inexpensive development environment for any x86 bare-metal product you might have been planning (which is not quite the same thing.)
For every complication that the BIOS causes, it also provides some nice little features (like: initializing video hardware so that you have a "debug display" that can be used just by poking bytes off into a known memory location.)  (A lot of x86 bare-metal products will end up buying a BIOS from someone anyway, for that low level initialization that you can't find out how to do without heavy legal agreements with intel.)
 

Offline rolycat

  • Super Contributor
  • ***
  • Posts: 1101
  • Country: gb
Re: Using an x86 pc as an obese microcontroller?
« Reply #32 on: March 09, 2016, 12:46:57 am »
Quote
why use the PC as MCU at all
a PC makes for a wonderfully inexpensive development environment for any x86 bare-metal product you might have been planning (which is not quite the same thing.)

Unless you need x86 compatibility for hysterical raisins, why would anyone plan such a product today?
 

Offline ivan747

  • Super Contributor
  • ***
  • Posts: 2045
  • Country: us
Re: Using an x86 pc as an obese microcontroller?
« Reply #33 on: March 09, 2016, 01:49:09 pm »
Not to mention that the P4 is some of the worst performance / Watt ever shipped by Intel. Modern hardware might cost a few bucks now (but it's so cheap nowadays, who cares?), and will definitely save money via lower power consumption, probably already after a few months of 24/7 operation.
I know, i know. I have to deal with explaining why my school board's "free" government hand me downs are a terrible solution.
You haven't seen slow until you witness 25 pentium 4s trying to log into windows 7.
well, at least it's got hyper threading?  :-//

Actually Intel is sick enough to market x86 microcontrollers... Google Quark D1000/D2000 or Quark SE.
To be frankly, it is quite power efficient -- my Arduino 101 (based on QUark SE -- a 32MHz x86, a 32MHz DSP, 6 axis MEMS and BLE) runs comparably to just any other Arduino boards.

Wasn't there a big issue with the intel boards actually being incredibly slow when used as an arduino?

While you can use those old boards, its not really worth it anymore.  They take up a lot of space, produce a lot more heat and use a lot more power then a raspberry pi or beaglebone.  I cleaned out most of my old PC's and replaced them with Pi's and used some old cell phone changers and microsd cards lying around from upgrading those.
But the advantage to using a P4 is that i have a virtually endless supply! They decommissioned a bunch of the really old Pentium 4 towers (beige, built when p4s were actually considered "fast")

I'm aware the heat to perfomance is beyond terrible, but would you rather i used pentium D boards?
for those who don't know, a pentium D is two pentium 4 chips forced onto the same die, the thermal output is terrifying.

Windows 10 is actually faster then 7 if you're willing to switch.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Using an x86 pc as an obese microcontroller?
« Reply #34 on: March 09, 2016, 08:13:43 pm »
Quote
why would anyone plan such a product [x86 bare metal machine] today?
Well, x86 cpus are about the fastest OTS general purpose CPUs you can get.  Probably several of the fastest.  Sure, a multicore 2GHz ARM has much better total MIPS/Watt, but sometimes you'd rather have a single-core 4GHz blazing away at more than one operation/cycle.
(or did you mean "why bare metal, when you could run linux or whatever and implement your product code as a device driver or something, and get all that support infrastructure for free?"  That's a tougher question.)
(also, the resources put into x86 compilers are quite substantial.)
 

Offline botcrusherTopic starter

  • Regular Contributor
  • *
  • Posts: 192
  • Country: ca
Re: Using an x86 pc as an obese microcontroller?
« Reply #35 on: March 09, 2016, 11:26:21 pm »
for those who don't know, a pentium D is two pentium 4 chips forced onto the same die, the thermal output is terrifying.

Actually PD is not 2 cores on one die. It is 2 single core dice on the same package. Intel later did this on Core 2 Q6600 family (2 dual core E6600 on the same package), then Arrandale (one separate MCP/GPU), then Haswell and Broadwell (128MB L4 eDRAM on selected models).

Yes sorry my bad, package not die.

Thermal output is still really bad though at a blistering 130W :P
Still has nothing on amd's 5Ghz 8 core...
 

Offline ahayes

  • Newbie
  • Posts: 1
  • Country: us
Re: Using an x86 pc as an obese microcontroller?
« Reply #36 on: March 16, 2016, 08:45:05 am »
If they have a parallel port you can use it as a crappy GPIO header.  If you have soundblaster cards at your disposal you can use the game/midi port as a crappy A2D input.  You might even get semi-deterministic behavior with FreeDOS and whatever C compiler you can find for it.

You'd probably spend more money powering the thing over the course of its use than you would on an arduino clone so keep that in mind. 
 

Offline cio74

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: Using an x86 pc as an obese microcontroller?
« Reply #37 on: March 18, 2016, 07:27:21 pm »
If you want real time data processing you can run DOS on it and write your own code to deal with ISA/PCI cards, parallel port, serial port and whatever else you've got in there.

I would rule out both Linux and Windows since both are not real time operating systems. That only if you care about precise timing otherwise they are fine.

On the benefits of running a Pentium over a MCU, lots of free compilers, excellent debuggers with no requirement to buy expensive trace probes, tons of documentation, easily expandable and upgradable to faster machines, if you feel so.

So yes, I would definitely consider them, just power it up, deploy a DOS version and a free C, Pascal, ASM compiler and you're good to go.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf