MCS-52 Basic

MCS BASIC-52 (also known as MCS-51 aka 8051/8052 basic)

Intel MCS-51 (aka 8051) was developed by Intel in 1980.

Somewhere around 1985 one of Intel engineers created a BASIC interpreter for this processor and the fun just started.

One of my boards with the absolute minimum configuration…

  • Atmel 89C52 (8052 clone) burned with the MCS-51 Basic
  • 74LS373
  • 62265 aka 32Kbytes memory. YES this is 32768 bytes of RAM

MCS-51 Basic Board

Connect the power, connect your serial, press space 2-3 times and the familiar basic prompt shows up

MCS-51 Basic

Commands:

  • PRINT MTOP: Printed the maximum available memory of the system (32768 bytes)
  • The second is an Easter egg from the developer of the MCS-51 basic

I had bought The Microcontroller Idea Book as hardcopy in the past (which is now available also as a free pdf http://janaxelson.com/files/microcontroller_idea_book.pdf)

I decided to create a board based on the book, keeping all the naming the same including the component designators with 32K RAM and 32K NVRAM

Here you go: Beauty 🙂

Gerber files

https://www.billy.gr/wp-content/uploads/mcs-basic-52/mcs-basic-52-gerber.zip

Schematic

https://www.billy.gr/wp-content/uploads/mcs-basic-52/mcs-basic-52-microcontroller-idea-book-schematic.pdf

Boot

ON boot remember to

Set MTOP to 32K
MTOP=7FFFh

Run FPROG3

FPROG3

Locations 8000H through 800FH are used to save the baud rate information, plus configuration information

According to the manual

The PROG3 COMMAND functions the same way as the PROG1 COMMAND previously described, except that PROG3 also saves the system control value, MTOP, when it is evoked. During a RESET or power-up sequence MCS BASIC-52 will only clear the external data memory up to the MTOP value that was saved when the PROG3 COMMAND was evoked. This permits the user to “protect” regions of memory from being cleared during a RESET or power-up condition. In typical use, the PROG3 COMMAND assumes that the user is saving some critical information in some type of battery-backed- up or non-volatile memory and does not want this information to be destroyed during a RESET or power-up sequence.

And

MCS BASIC-52 sizes consecutative external memory locations from 0000H until a memory failure is detected. The sizing operation is performed simply by writing a 5AH to an external memory location, then testing the location. If the particular memory location passes this test, BASIC then writes a 00H to the location, then again, checks the location. MCS BASIC-52 only sizes the external memory from locations 0 through 0DFFFH. Memory locations 0E000H through 0FFFFH are reserved for user I/O and/or assembly language programs.

NVRAM 

I suggest to clear the first 8192 bytes of NVRAM minus the basic variables that are saved from FPROG3 
10 FOR I=8010H TO 9FFFH
20 XBY(I)=000H
30 NEXT I
40 END

PCB ERRATA

  • DC Jack, you need to connect under the board the pins 2-3 (otherwise GND is missing)
  • RESET is not connect from U1A pin 2 to U9A pin 2
  • C20 is close to the regulator
  • Under the REG 7805 there are some vias, add some protection
  • J4 label is reverse (WE/WP => correct WP/WE)
  • NVRAM DS1230AB-70 has different orientation from the rest of the ICs

Last update: 07/03/2020

Comments

2 responses to “MCS-52 Basic”

  1. andre Avatar

    It’s a fun system , i used it on Phytec card with assemblary langage
    in 1994. It was an easy interface for screen ( or display ) when you
    use assemblary language.

    I simple system : for me the best solution for humain brain

    1. billy Avatar

      Still is :). It was common as a base for many projects back those days

Leave a Reply

Your email address will not be published. Required fields are marked *