On Friday, June 13, 2014 4:00:56 AM UTC-7,
jf...@ms4.hinet.net wrote:
> 2014/06/13 PM 01:01:29
hughag...@yahoo.com wrote:
>
> > There was a ROMable version of UR/Forth, although I don't think that it is available since LMI went out of business. If you can get by with a 16-bit Forth (maybe addressing the 4GB as extended memory), you could use ForthCMP from Tom Almy which is ROMable. I did use the MS-DOS version of this, and found it to generate efficient code, but to be difficult to program because it is not interactive like Forth traditionally is but only compiles to an executable.
>
> It's almost impossible to run a "ROM" program on today's x86 board where only PCI, ePCI or SATA interface is available. I will be very happy if someone can tell me how to do that.
I don't know either. I've never used an x86 as a micro-controller, and I don't know anybody who has.
The last time I gave any thought to this, was in 1995 when I was working at Testra. In those days, the 80186 as well as the various NEC Vxx chips were sometimes used as micro-controllers, typically running MS-DOS although sometimes running the program out of ROM if the compiler supported generating rommable code. I asked my boss (John Hart) his opinion on the subject, and he said that it was a terrible idea --- it cost too much and it only worked for very pedestrian micro-controller systems due to the slow interrupt response time of the x86 --- it was done primarily by people who wanted to use a compiler (Turbo C, Turbo Pascal, or whatever) that they were familiar from MS-DOS. As far as I know, this is still true --- the x86 is too slow on interrupts to be usable as a micro-controller.
> > May I ask what your project does? It seems overly complicated to have MS-DOS and a DOS-extender, when you don't have a disk-drive anyway. Why not use a 32-bit micro-controller such as the ARM or the PIC32?
>
> It's a kind of testing machine. The performance this program requires to reach makes me has no other choice except the x86. An ARM running at 200MHz is far away from doing this job.
I'm baffled as to what kind of testing you could be doing that requires high speed. Prior to working at Testra, I worked at a company that built a testing machine for the wafers used in semiconductor manufacturing. The machine would poke at the wafer with prods, squirt some juice in with a DAC, and read what came out elsewhere with an ADC. This was an 80286 and it had its own hard-drive. It was pretty pedestrian. It would hold those prods in place for long periods of time --- like 20 milliseconds --- this was not real-time at all.
All in all, I think that a processor normally used in a desktop computer, such as the x86, is a bad idea for use as a micro-controller. At Testra, for their laser etcher, they used a dual-processor board. They had an 8051 with 64MB of memory (they used some parallel ports to provide the upper address lines); this buffered the big data files that the desktop computer uploaded into the laser etcher. They also had the MiniForth that was 16-bit and did the motion-control in real-time. The 8051 would feed it the data as it was needed, so it didn't have to buffer much data --- being a 16-bit processor, the MiniForth had only 64KW of data memory and 64KW of code memory. BTW: The MiniForth has to be used in a dual-processor board anyway, because it needs a pony processor to get it going, as it can't start itself up. The competition in the laser-etcher field was using an MC68020 and it was much slower than the MiniForth --- being slow is a big problem in a laser-etcher, because if you leave the laser sitting in one place too long it will burn a big blotch in the material --- to etch thin sharp lines, your motion-control board has to be extremely fast and you can't have any harmonic feedback.
You haven't described your testing machine in any depth, so I can't really make a recommendation. Offhand though, I would say that a dual-processor is a good idea. Use a fast 16-bit processor such as the PIC24 to do the micro-controller stuff, and use a slow 32-bit processor to buffer the data and communicate with the desktop computer. It is difficult for me to imagine any kind of testing apparatus that this would not work for. The PIC24 is fast because it doesn't use external memory at all --- both code and data memory are internal to the processor --- the downside is that you only get 16KB of data memory.