Sunday, 8 October 2023

Computers and Home computer archive


Created; 08/10/2023, Changed; 24/10/2023 - 23/10/2023

My first computer was a home computer, one of the best of its time the Acorn Atom, which I purchased second-hand in about 1979.  This ran BASIC and had an assembler plus access to system features.  All the computers I have run at home have been second-hand privately purchased but for one second-hand that I purchased from a computer shop.  The first computer I ran with an operating system ran CP/M and was an Epson QX-10, after that, I have been running PCs with DOS, Linux and also Android.  My related pages; Windows to Linux - operating systems

My electronics projects at home were unplanned do a bit of design or copy a bit then do a bit more.  With veroboard design, this is a good strategy in laying out a design you do the most important first, the power supply decoupling, and sensitive signals.  My first projects at work were electronics but later it was necessary to select and design with microcontrollers.  I started to use worst-case design methods and other things I was learning at technical college in my design work. 

Physicists and worst-case design methods - sometimes people don't understand the imprecise nature of real-world, materials and people.  They understand the words but have no feel for the imprecise way materials, technicians and engineers need to understand to work.

Spock, pictured, does not appear to understand tolerances and the imprecise nature of the universe, so he compensates by calculating to a greater accuracy than is required.  A company I worked for made optical parts to a greater accuracy than was required adding cost although the final trimming of optical assemblies could be left centred without adjustment.  Things have changed electronic components and most things, are made to a high accuracy in order to assemble devices that need little or no further adjustment, the parts have been trimmed before they were mounted in their package or discarded if they did not meet all specification points or does not work.  Temperament types figure in misunderstanding.

Embedded microcontroller;

At work, I developed software and electronics for an Intel i8748 microcontroller, which had 1K x 8 EPROM, 64 bytes of RAM and about 240 instructions.  The development system was Prompt 48 which required the programmer to write down your instructions on a pad of blank paper tables and translate the instructions to hexadecimal code instruction and operator.  The program was typed in and programmed using a hexadecimal keypad with seven-segment displays.  The manufacturers provided a lot of training books and crib cards, showing programmes to carry out many things such as multiply or divide for example.  The machine cycle was 2.5 uS with a 3.6 MHz crystal and consumed about 0.5 W.

https://www.worthpoint.com/worthopedia/intel-prompt-48-microcomputer-1823587674

https://beomicro.wordpress.com/intel-8048/

At this time it was a big cost in time and money to switch microprocessors.  i8048/8748 (1976) was not compatible with i8051 although Intel said it was.  On the other hand, the Motorola MC6800 code was compatible with newer of there 8-bit microcontrollers and microprocessors MC6801 (1978), and MC6811 until about 1988 with the introduction of the MC68HC12.  By about 1985 people had in any case moved their code to a computer such as a PC and were using cross-assemblers running on CP/M or DOS, so older software could be changed with less effort and run on another microcontroller from the same manufacturer but requiring less, but still a lot of effort.  Towards the end of this part's life, a version i8749 with 2K EPROM became available, it had been superseded by i8051/i8751 and many other manufacturers' products.  i8749 was not supported by the Prompt 48 but in any case, debugging and an emulator were not required only an adaptor for the programmer was required.  Switching to another manufacturer meant learning new embedded peripherals which is also a lot of work.  By the end of the 1980s people were beginning to use C-cross-compilers and the microprocessor instruction set was not an issue Switching to another manufacturer was not such an issue any more but for the differences in the peripherals were and are a big issue.  PC-lint was being used to check the programming which operates like a grammar checker for C source program code. 

The program to carry out one of four or five scale conversions could have used a look-up table with straight-line approximation between points.  But it used integer arithmetic; = A + B.x + C.x2 + D.x3 + F.x4 + G.x5 polynomial calculation though complicated was simplified by making the multiplier (B, C etc) a divisor;  = A + A.x/b + A.x.x/(b.c) + A.x.x.x/(b.c.d) + …..  It also did temperature compensation by calculation of B and C terms from temperature and the measurement reading using another two 5-term polynomials.  It was possible that the shortcuts would have made some scale conversions not possible but no such problem arose during the instrument's 25-year production run, because the number range necessary to maintain precision using single precision integer arithmetic had been worked through in the design stage. 

I struggled with reading when I was 20 so despite the very good programming tutorials and examples provided by the manufacturers I only got the gist of them and then re-invented but with shortcuts to save the microcontroller's memory.  I only started learning programming at college after I had started the project.  In this way, the polarimeter project which my manager started off in a good direction for me ended up as a very fast rough answer that improved and gave a pleasant and usually quicker more accurate response probably than any other polarimeter of its time. 

Programming; The MC6801 could be purchased with LILbug debug monitor.  Which I used to start developing the next project.  The construction was on veroboard including SRAM and an EPROM.  The completed range of new instruments used HD6301 microcontrollers until these became obsolete in the 2000s.  Development used an EPROM programmer, cross assembler and an Embedded BASIC, it was made and sold by a university tutor, who supported it well fixing many things.  This method of developing projects did not change much with the switch to HC12 or PowerPC other than to use the debugging interface built into these microcontrollers to program the flash ROM.  Cosmic C compiler for MC6812 was the best quality, robust tool I ever used and the French company who made that range of compiler and user interfaces were and are proud of their products.

Avoiding the transition to microcontroller (now called embedded microcontroller)

There were a lot of ICs and LSI (large-scale integration) that allowed you to continue developing electronics solutions without using a microcontroller and the big hurdle of a lot more software development for a lower cost and often better solution.  Analogue electronics were improved and were very good by 1980.  For example the Ferranti digital panel meter ZN450? did not require the expensive and large capacitors that other makers required because it used delete-sigma A/D conversion, but the development of this part was not completed.  FMMT459, high voltage, low power, the transistor used in CRT type oscilloscopes and other high voltage electrostatic driven beam devices.   The Raytheon RC4200 multiplier/divider IC was particularly good and resulted in a less compromised solution than some more expensive parts.  

Analog to Digital converters with display drivers.  Decimal counters with display drivers made by Intersil.  Better operational amplifiers and multipliers for analogue calculation rather than using software.  I used these in my earlier development work to apply some approximate scale conversion in what turned out to be a turning point instrument completion for the company's future.  The RFM80, a refractometer of 1980, was very well regarded in its time.  The drawback with parts this age was that their accuracy was usually only specified at room temperature although they also had an operating temperature range but often it was not that wide.  Now parts are specified for minimum production life, a much better temperature range with quoted performance and a vastly lower defect rate. 

Mainframe computer

Traditionally mainframe computers run micro-instructions.  An emulator or simulator is loaded to provide a nicer computer instruction set to program with each instruction being carried out using several micro-instructions. 

Ferranti made one of the first electronic computers and also made mainframe computers.  They also made 16-bit radiation-hardened and wide operating temperature range microprocessors for space and the military, the F100-L in the 1970s and 1980s.

Mainframe computers used to use ECL logic (Emitter Coupled Logic) specifically called Bit-Slice parts, which was and still is fast. 

PCs, Mini and Mainframe computers require a small ROM containing the bootstrap loader to load program from a floppy disk, tape or disk.  But the ROM also included a Monitor program, that gave some debugging such as to set break-points, load, save, edit and examine memory features.  I've used SWTbug at college. 

Mainframe computer design influenced microprocessor design by varying degrees;

Many of the earlier microprocessors evidently ran micro-instructions internally but were programmed in comprehensive instruction sets similar to how a mainframe computer would be used.  By comparison, MC6800 ran a comprehensive instruction set implemented in hardware, this is how all microprocessors operate now.  The PIC is probably the only microcontroller that runs micro-instructions and is programmed in micro-instruction by the end user these microcontrollers are only used to do very little such as set up timers,  Analog-to-Digital converters and Digital-to-Analog converters and simple input and output port pins on-chip, they are cheap parts. 

The most influential mini-computer was made by Digital the PDP-11 of 1970

The significant change point that brought about mass home computer ownership was probably when EPROM became available cheaply; 

EPROM HN482764G is generically known as 2708 to 27512 it only requires a 5V power supply.  1K x 8 bits to 64K x 8 bits with a higher voltage (12V to 21V depending on the part) is required for Vpp when programming the device.  NM2708 was new in about 1977 and cost £70-£100 each, but the price quickly dropped.

EPROM type i1702 Intel, MM5203 to MM5204 National Semiconductors required -12V +5V power supplies plus Vpp -47V or -50V.  MM5204, which had an increased capacity of 512 x 8 bits, was new in about 1976 and did not have 4-bit bus support. 

Alternatively, mask ROM could be custom-made - I believe these became viable if the batch quantity was at least 2,000 in the 1970s.  Manufactures of fusible link Programmable Read Only Memory (PROM) gave users circuit and constructional details on how to make a programmer using LEDs, thumb-wheel switches, TTL logic, etc to build on veroboard.  Be careful though, one mistake, and you have to discard an expensive part.  At this time fusible-link PROM was small, probably 32 bytes to 1K bytes and expensive in the later 1970s?

EPROM HN482764G

2764 8K byte EPROMs (pictured) were used in a considerable number of computers from the late 1970s. 

Once this size EPROM became available cheaply the home computer quickly became very popular.

By comparison, The Zilog and Intel microprocessors in the 1970s-80s may have also run micro-instructions internally to provide the comprehensive instruction set a chip user programmer would use.  Some alternatives to these microprocessors such as i8751/i8051 were made by other companies that ran comprehensive instructions directly without requiring many cycles but using hardware functions in the same way that the MC6800 Motorola and R6502 Rockwell did then and probably all microprocessors do now.  

The MC6800 may have started as a hybrid IC containing several chips before it was released commercially.  The two-phase clock input had to be correct and the MC6801 was much easier to use the embedded version.  The HD6301 Hitachi was a much lower power and faster CMOS version used in battery-operated computers and dot-matrix printers and sold in very high volumes for 1 to 2 decades.


Picture

Hitachi's HD6301 was faster than MC6801 generally, instruction took one clock cycle less to perform.  These microcontrollers and other Hitachi microcontrollers in printers and consumer products during the 1980s and 90s.  Whereas Motorola was used in the automotive industry mostly very prominently in the 1990s.  The CMOS HD63701?? with EPROM integrated pictured was withdrawn because the product did not comply with a cross-license agreement between Motorola and Hitachi so Hitachi developed the H4, H8 and H16 products instead and the HD63000 also never became available.  Motorola subsequently introduced pipe-lining architecture to improve the speed of their microcontrollers.

It was much superior to the late1970s i8748, which had 1K byte EPROM, 64 bytes of RAM and 256 address range but could access up to 4K bytes of memory using paging.  These embedded microcontrollers had mask ROM variants i8048. The MC6801 and HD6301 could alternatively run from an external ROM.  They all had ports and timers and were suitable for high-volume production.  The EPROM variants were suitable for low-volume manufacturers and prototype software development.  Compared to modern embedded microcontrollers these older parts made the bus available for programming and development.  Rare piggyback EPROM type microcontroller with the EPROM plugged into the top of the microcontroller Integrated Circuit. 

Page 18, 6 and 8 pin embedded microcontroller SC9RS08KA2.  
Note; BKGD (Debug and programming pin) can be a port or 
function output and ! RESET can be a port or function input.

The Motorola one-wire background debug interface has not been used by any other manufacturer.  Other manufacturers use interfaces that use more wires such as TI's JTAG which has 4 wires plus a reset wire and is used by other manufacturers such as IBM/Motorola's PowerPC.  The debug interface used by ST in its ARM 32 embedded microcontroller is 2 wires plus reset. 

The MC6811 and the MC68HC12 could be programmed through any one of the ports which defaulted to boot-loader or debugging.  This feature is commonly available on most embedded microcontrollers for fast production programming.  The debug interface like the one pictured is slower when programming parts with a large amount of data but would also do the job easily.  HC12 was a step back in features from the MC68HC16 which like many of Motorola's parts were more complicated, very impressive, but not so popular, that I evaluated but did not use because it was not a popular range of embedded microcontrollers.

The I2C bus developed by Philips (NXP) is widely used but there are almost equivalent copies, by comparison, the CAN bus is specified and controlled by the automotive industry and I do not think that there are near equivalent copies of it.  These are not used for programming and development but for communication between ICs on the same circuit board or within a car respectively.

By the 1990s embedded microcontrollers such as MC68HC12 included on-chip Flash one-wire  programming and debug interface.  These microcontrollers require compact therefore fast operating programs.  Now, 9HCS12 is made by NXP in Europe instead of Motorola in the USA and is very well optimised for 8 and 16-bit operations, these are flexible powerful microcontrollers.   This has a one-wire wire background debug plus a simple fast bootloader that monitors all serial communications and ports and then programs the flash if it has not already been programmed. 

The low-cost 8-bit variant HC908 (HC08) has 8 pins or more and can be found in very cheap products such as a computer mouse.  Software development Cosmic HC08 and HCS08 Products (cosmicsoftware.com).  The cheapest most cut-down variant that remains available RS08 datasheet page above is a subset the of MC6800 core approximately but with the background debug interface and is available with as few as 6 pins note that even the control and debug/programming pins!RESET (or alternative input function) and BDGM (or alternative output function) can be used as ports in a limited way.

In traditional programming with few or no libraries and tools to help there is very little need for debugging, (setting breakpoints and monitoring variables) but just programming.  The only time where these things are more important is initially before you have developed much code and therefore you can arrange hardware implementation to not use the two pins until late in development and for the simplest things so that you keep the option to debug for as long as practical.  In any case, I have and would always avoid sharing debugging pins with other functions.  There was a bug in one compiler I was using and the debug feature was useful for identifying it, Cosmic then rapidly fixed their compiler and the problem was resolved.

STM ARM based; STM32F072, Nucleo-64 
TI; MPS430, EXP430FR2433 
NXP ARM based; MKV11Z128VLF7, FRDM-KV11Z. 

In each case, these evaluation boards include the debug and programming circuits at the top of the PCBs.  They are connected and powered via a USB cable.  The microcontroller is a 32-bit bit with FLASH ROM and RAM on-chip, ports, and programming/debug interface but no bus I/O.  Rarely does an application require a 32-bit microcontroller but these parts also have more sophisticated ports, timers etc. 8 or 16-bit microcontroller would be adequate and more efficient but there is a considerable range of variants without adding more. 

Manufacturers of the microcontroller provide software tools, debugging interface and software libraries.  In the case of ARM core processors, there is one CAD tool used for writing programs which uses the code provided by the parts manufacturer.  This does not mean you can swap between manufacturers or swap between parts easily but you can now do it.  Lauterbach makes these tools for ARM.  The Texas Instruments evaluation board pictured is not an ARM core microcontroller so you need a completely different set of CAD tools for it.

Sinclair had very exciting products that always turned out to be a  disappointment.  Scientific calculator that gave the wrong answer if it had taken too long to compute a log or a trig function the manual warned of and did occur often.  A watch made with special black plastic called Black Watch.  Kits included; a matchbox-size radio,  radio and an amplifier, using pulse width modulation speaker drive (I think).  An advanced computer with an MC68008 processor and solid-state Micro-drives turned out to be a tape loop.  A portable flat-screen TV may have been okay, but I do not know about the flat-screen oscilloscope?  Still, the audacity of this company deserved an award which the Queen duly gave the owner. 

The best home computer

Reduced Instruction Set Microprocessors (RISC) are very common and a lot is claimed but they may be, in some cases, just old intellectual property dressed up.  The ARM 7 instruction set runs at half the speed of a Motorola M-core for the same clock speed but can be switched to run as fast but with more memory use than the M-core.  ARM is sold as a very cheap commodity piece of intellectual property whereas Motorola developed the most leading edge parts.  The last version of the BBC micro had an impressively fast ARM microprocessor.  The ARM microprocessor is now used very widely even Motorola (now NXP) make microprocessors using the ARM core under license.  But like Motorola make PowerPC under licence from IBM (R6000 core) I would say it is better to use one of the company's own propriety processors Motorola understated what they do and they have very satisfied users consequently.

The MOSTEC or Rockwell R6502 processor-based BBC micro was faster than the i8086-based first IBM PC's despite on paper seeming to be slow.  Both were Comprehensive Instruction Set microprocessors (CISC).  Many electronic designers got caught out by spec. points v reality.  The problem is that you never really know until you have invested heavily in a chosen microprocessor development then you are stuck with it.  https://en.wikipedia.org/wiki/MOS_Technology

The speed and size of the program being run if it is in assembler (machine code) or optimized compiled high-level language can be very small and fast this is how the Acorn Atom with its built-in assembler and highly efficient BBC Basic programming language got its justly deserved excellent reputation for.  But Basic is an interpreted language meaning it is written in text interpreted character by character at the time of running that program.  The trick with the Acorn Atom and BBC was to convert the textual words to short tokens two bytes in size that are therefore much quicker to interpret than longer full English language spelt-out words.  The BBC micro was faster still and this was achieved by placing line length code at the beginning of each program line so that the interpreter can calculate line lengths and skip along quickly to the required line.  There are a lot of scripting languages that work by interpreting text such as; Submit, Batch, Perl, Java, and HTML.  The program running may not be aware of the precise details of the computer it is running on but instead, it could be running on a standard virtual machine environment created for it such as; Pascal and p-code, Java to run JavaScript or basic interpreter.  The implication of this is that the program does not need to be rewritten for every possibility but on the other hand the machine is running a program that is, in turn, running on another program and perhaps runs a third program that interprets text list-based tasks this of cause slows the computer and makes the code very large.  It is therefore possible to create a vastly powerful and wide range of applications with a vast number of software writers each adhering to a set of rules, way beyond the capability of one person but the coding is necessarily not so efficient.  

National Semiconductors used to make a microprocessor that appeared to run very primitive micro-instructions in the 1970s and early 1980s.  One variant included a BASIC interpreter and was very slow but quite flexible DMA.  INS8060 and INS8070 SC/MP,  I do not know but this may still continue to be modified made but now known as PIC?  SC/MP (scamp) was one of the first microcontrollers to come into the country from the USA in 1976 and the evaluation kit was built into a good-sized suitcase.  Intel also made a version of i8051 but with a BASIC interpreter programmed into the ROM.

An anecdote is that Motorola's MC6800, and some of the UK's makers like Plessy, were making microprocessors for the military before 1970. 

Now, Computers are considerably faster, but the software is much slowed by being written in scripting languages, run time systems and elaborate graphics plus some of the operating systems such as Windows grow in an untidy way with patches added.