Retro¶
A page to show how easy STM32 and Forth makes embedded design in the 2020’s.
AT89C2051 MCU¶
This is a 8051 with on board 2KB flash, a couple of timer counters, a USART, comparator, what a great mcu in the 90’s. It was far, far easier than wiring up a cpu, ram, rom, timers, I/O etc.
See also
Features¶
Compatible with MCS®-51Products
2K Bytes of Reprogrammable Flash Memory, Endurance: 10,000 Write/Erase Cycles
2.7V to 6V Operating Range
Fully Static Operation: 0 Hz to 24 MHz
Two-level Program Memory Lock
128 x 8-bit Internal RAM
15 Programmable I/O Lines
Two 16-bit Timer/Counters
Six Interrupt Sources
Programmable Serial UART Channel
Direct LED Drive Outputs
On-chip Analog Comparator
Low-power Idle and Power-down Modes
Green (Pb/Halide-free) Packaging Option
In Circuit Programmer and Emulator (Burn)¶
I had to design and make this,back in the 1990’s just so I could program the AT89C2051 chip in-circuit using a PC. I used SDCC, a FLOSS C compiler, for the MCU and Gcc for the PC connected programmer below.
As usual I used a Makefile to orchestrate everything, so when I has written C code on SDCC for the AT89C2051, i.e. a stepper motor driver, I would enter ‘make’ on the pc and the running stepper motor connected to the programmer would stop for about 1/2 a second while the AT89C2051 was reprogrammed and then the motor would start running again.
It took me months to design the hardware and write the C source for the PC part but you get all this in a instant with Cortex-M MCU and a $2.80 AUD USB-SWD dongle like this
St-link V2 Chinese Clone for Cortex-M Programming and IN-Circuit Debugging with GDB¶
Usually has a APM32F103 or CKS32F103 and the latest STM firmware fitted.