Hello!  

This site was reorganized.  Please try out the Disks,
Books, Tutorials, and Vitamin C buttons.  If you see any
problem, send a message to:
support@offete.com  or  ting@offete.com

Most of the historical information are removed.  If you
need them, send a message to the above address.  You
can get most information on Forth at:
www.forth.org

Thank you very much.
Offete Enterprises

The Buy Now buttons accept single item order.  To order multiple order,
use the following Make a Donation button, list all the items you want,
and donate the total amount.
The Age of USB

Dr. Chen-Hanson Ting

Microprocessors and microcontrollers evolved for 40 years.  Tools and system to develop applications also
evolved with them.  When I first started programming microprocessors in the 70’s, we used teletypes for
communication and paper tapes for storage.  Then, teletypes were replaced by dumb terminals, and paper tapes
were replaced by audio cassettes.  Then, Intel released its blue box MDS, Microprocessor Development System,
and 8 inch floppy drives became norm.  When IBM and Apple started their PC’s, 5 inch floppy drives were
standard accessory.  Then, 3.5 inch drives, hard disks and optical disks became standard.  Now, USB thumb
drives eased floppy drives out completely.
In the back of a PC, USB sockets have also replaced the serial and parallel ports and achieved what its name
says, Universal Serial Bus.  In spite of the complication it introduced into the microcomputer system designs,
USB is increasingly being adopted by microcontroller manufacturers to connect their microcontroller development
tools to PC.  USB also allows them to build very powerful evaluation kits at very low prices to promote their
microcontrollers.  These evaluation kits, when connected to a PC through USB ports, perform better than the
microprocessor development system of yesterday, and are cheap enough for high school students.
I have always been looking for cheap microcontroller kits to teach Forth programming language, and could not
resist the urges to buy these kits when they cost only $10 or so.  On my shelf, I had collected many of these kits:
2010: STM8S Discovery Kit from ATMicroelectronics Corp for $10.
2011: MSP430 LaunchPad from TI for $4.30.
2012: Arduino Uno for $29, later $10 from China.
2014: STM32F4 Discovery Kit from ATMicroelectronics Corp for $40.

The use of USB reduced the hardware of a usable microcontroller system to a small single printed circuit board.  
The complexity of USB is hidden behind an USB interface chip, which is another microcontroller, and the USB
driver on PC.  As far as the user is concerned, the USB interface is transparent.  However, the software
recommended by the manufacturers to write applications for the microcontroller chips are complicated beyond
belief.  The manufacturers expect the users to write programs in C, which is plainly the wrong language for
microcontrollers.  In fact, they expect that all users have advanced degrees in computer sciences.  These
expectations are not entirely unreasonable, if you look at the specifications of these microcontrollers, which
generally are documents 600 pages in size.
My great sympathy to all those who had to endure the pain and suffering going through the process to get
something working on these kits.
On the contrary, my experiences with microcontrollers have been enjoyment and ecstasy, because I have learnt
the right language and used the right tools.  Forth is such a language that allows you to talk to your
microcontroller, and to form a close partnership with it to solve my application problems.
In 1990, Bill Muench and I developed the eForth dialect of Forth, anticipating all the new and more powerful
microcontrollers coming out of the new millennium, to be an easy to learn and easy to port programming
language for these chips.  For more than 20 years, I had used it in my professional career and in my private
projects, making the best efforts to improve and enhance it for the particular job at hand.  As I acquired the new
evaluation kits, I adapted eForth to them and tried to make the best use of these kits.  These are the eForth
systems I built for them:
Stem8ef (2157) for STM8S-Discovery Kit
430eForth_v43 (2166) for MSP430 LaunchPad Kit with a manual Zen of LaunchPad
328eForth (2159) for STmega328P chip on Auduino Uno Kit with a manual Tao of Auduino
Stm32eForth720 (2165) for STM32F-Discovery Kit with a manual Irreducible Complexity

From these implementations and from all my prior experience with microcontrollers, it is easy to draw two
conclusions:  that hardware engineers do not know how to design a CPU, and that software engineers do not
know how to make the microcontrollers easy to program.  Hardware engineers generally do not understand
computer architecture.  They conceived an instruction set, and exhausted the available gates to make this
instruction set do its best.  Then they threw the hardware over a wall and expected software engineers to make it
work.  The software engineers only learnt C and UNIX in the school, and tried to impose C and UNIX on the
microcontroller.  Earlier, microcontrollers did not have enough memory to host C and UNIX, and software
engineers gave up and turned the project to firmware engineers.  Now, the microcontrollers do have enough
memory, and the CPU’s are fast enough to run C programs, manufacturers shoe-horned UNIX into their IDE
(Integrated Development Environment) and tried to convince users that this was the way to program
microcontrollers.
The approach I am promoting in eForth implementations is that most of the modern microcontrollers are big
enough and fast enough so that we can put a Forth operating system in the microcontroller.  With a resident Forth
operating system, it is very easy to program the microcontroller with the integrated interpreter, compiler, and all
necessary debugging tools.  The microcontroller is no longer an adversary to you.  It becomes a friend.  It opens
the CPU, the memories, and all the IO devices to you.  You can ask questions, and it will give you what it knows.  
Hardware engineers did not know the instructions you need to solve your application problem.  Software
engineers did not know the tools you need, either.  However, in a Forth Virtual Machine, you can extend the
hardware instruction set without limitation.  You can build software modules following the structured
programming principles without limitation.  You can explore the solution space almost exhaustively, and find
optimized solutions quickly.  This is why microcontroller projects are enjoyable to me.  
I mentioned Forth Virtual Machine.  The first thing I did in an eForth implementation is to construct a Forth Virtual
Machine based on the underlying CPU, to replace this particular CPU.  The Forth Virtual Machine is an universal
microcontroller, which shows the hardware engineers how a microcontroller should have been designed.  It has
a minimal instruction set, which can be extended indefinitely.  This instruction set is extended to the point that an
text interpreter, a new instruction compiler, and all necessary debugging tools are included.  Now it becomes an
operating system and a language interpreter/compiler.  It shows software engineers how an operating system
should have been designed to program and to operate microcontrollers.
I am happily closing my career with these three manuals: Tao of Arduino, Zen of LaunchPad, and Irreducible
complexity.  Completely by chance, Tao of Arduino is on a lowly 8-bit STmega328P chip, Zen of LaunchPad is on
a middle range 16-bit MSP430 chip, and Irreducible Complexity is on an high-end STM32F407 ARM/THUMB chip.  
An identical Forth Virtual Machine is imposed on these three vastly different microcontroller architectures, which
then behave almost identically from user’s point of view.  What I am emphasizing is that we have to focus (Zen) on
Tao, the essence of computers, and not distracted by the multifarious ramifications of them.  Computers are very
complicated machines, but there is a core of irreducible complexity, which can be understood and managed by
ordinary people like you and me.
The microcontroller evaluation kits based on USB are good platforms for a Forth Virtual Machine, relying on a real
host for operation.  I complained that hardware engineers did not know how to design microcontrollers, so I had
to use inferior hosts for my Forth systems.  I do have real Forth machine designs, eP32/eP16/eP8, written in
VHDL and verified on FPGA.  Efforts in building them for commercial applications failed.  However, I think they are
good designs and hope that somebody will use it to build successful products.  The designs of eP32 (2158) and
eP16 (2163), like other eForth implementations, are all available on this site at $25 each.
DSO203 Pocket Digital Storage Oscilloscope

DS203 is a pocket size 4-channel digital storage oscilloscope for common electronic engineering
tasks. Its CPU is an ARM Cortex M3, STM32VCT6, with an AD9288-40 dual A/D converter sampling
at 72 MHz, and a customer FPGA to manage the ADC and data buffering.  A built-in 2MB USB disk
enables you to store waveforms and to upgrade firmware.  It also provides 4 application areas,
convenient for users to load and upgrade at most 4 different application firmware. Schematics and
source files are open-sourced to encourage improvements and innovations.  You can order it on
Amazon for $172.

People complained about its manual, which is hard to read.   I edited the manual and you can
download it
DSO203 User Guide.