Down ROMemory Lane

8052 Minicontroller

Connecting via minicom

The 8052 minicontroller communicates via RS-232 serial at 9600 baud.

# Install minicom
apt install minicom

# Connect
minicom -D /dev/ttyS0 -b 9600

# Settings within minicom (Ctrl-A Z to open menu):
# Serial port setup:
#   Baud rate: 9600
#   Data bits: 8
#   Parity: None
#   Stop bits: 1

Connection settings: 9600 baud, 8N1 (8 data bits, No parity, 1 stop bit)

8052 BASIC

The 8052 includes onboard BASIC in ROM:

LIST            List program
RUN             Run program
NEW             Clear program

10 FOR I = 1 TO 10
20   PRINT I
30 NEXT I
RUN

Assembly

The 8052 uses the MCS-51 instruction set:

; Hello World (send to serial port)
ORG 0000H
    MOV DPTR, #MSG
LOOP:
    CLR A
    MOVC A, @A+DPTR
    JZ DONE
    MOV SBUF, A
    JNB TI, $
    CLR TI
    INC DPTR
    SJMP LOOP
DONE:
    SJMP $

MSG:
    DB "Hello, World!", 0DH, 0AH, 00H
END