Close
0%
0%

Single Chip Computer

Simple Single Chip Computer running MCS BASIC-52 with wireless connectivity between PC or Phone. No external crystal, latch or RAM required!

Public Chat
Similar projects worth following
356 views
0 followers
Intel 8052AH-BASIC microcontroller requires additional external LATCH and atleast 1KB external RAM along with external crystal or oscillator to function as a stand alone computer running BASIC-52.
But after few decades now we can run true Single Chip Computer using just a 8051 core controller with internal RAM and internal oscillator with extended FLASH memory.
No external device programmers required to program the FLASH memory.
Running BASIC-52 V1.31 along with I2C functions and SFR Read/Write functions included.
Enhanced 8051 core performs 8~15 times faster than conventional core.
We can fit everything into a small DIP-40 form factor board which enables plug and play replacement for the conventional microcontroller board.

OBJECTIVE:

The objective of the project is very simple. Make a Single Chip Computer running BASIC-52 using enhanced 8051 core. The board form factor should be equal and compatible with existing DIP-40 600 mils package. The available pins should be mapped to the original DIP-40 package pinout.

The circuit should be very minimal. If possible run with only a single chip. 

PROs:

  • Single chip solution without any external components.
  • No external address latch
  • No external RAM required. Uses internal RAM for BASIC and program
  • No external Crystal or Oscillator required. Running at 24MHz internal oscillator
  • No external programmer required. Programming via USB or UART
  • PORT1, Tx, Rx, Timer, Interrupt, pins available for user interface!
  • Runs 8~15 times faster than conventional controller

CONs:

  • Limited Memory
  • No external memory 

We can easily overcome the limitations using CH558 or CH559 controllers. Using CH558/CH559 controllers gives the speed advantage of 2x since running at 48MHz. CH559 comes with 6kB RAM which is good enough for most of the programming needs.

The following description shows how we can implement a BASIC-52 single chip computer using CH552  IC. CH552E comes with MSOP-10 package. It is just 3x3mm size. But the number of useful I/O pins are just 4.  CH552G comes in SOP16 package. It has more I/O pins compared to CH552E. Same thing applicable to CH552P IC.  CH552T comes in TSSOP-20 package. It is having 20 pins and having highest pin counts in the CH552 family. CH552 family comes with 16kB FLASH and 1288 bytes Data Flash or RAM.

CH552E does not have UART0 pins mapped to physical IC. So we need to reassign the UART0 traffic to UART1 in the source code. 

The souce code was modified by Twitter(X) user @hiyodori5 

You can also find CH552E, CH559 code in his Twitter feeds.  CH559 code also supports SPI bus apart from I2C bus.

CH552 Block Diagram
Block Diagram

CONSTRUCTION:

If you just want to run the BASIC-52 on single chip, you can use any of the commerical available boards which using CH552E, CH552G, CH552P or CH552T.  We can also run the CH559 code on CH559 eval or dev boards.

The above image shows the board form factor and pin assignment.  Since the board was made in DIP-40 size and pins compatible with the original pinout of the 8052 IC. The board is very simple and can be fabricated on two layers. The fabricated board looks like below.

Power supply pins are VCC at pin 40 and GND at pin 20. PORT1 pins 0~7 available which is very useful for interface. Port 1 pin 2 also serves as PWM output which is useful to make any PWM based control or just create some noise or sound using buzzer/speaker.  Hardware Reset pin is available. RxD and TxD pins available for primary communication. INT0, INT1 pins are available. T0, T1 pins are available. P3.6 and P3.7 pins are available.  P3.6 and P3.7 are useful for programming the device Flash memory. 

We need VUSB capacitor and proper supply decoupling for reliable flash programming through USB port.  After programming BASIC-52 code, since we are not going to use the USB port anymore, we don't require the VUSB capacitor. By this way we can achive the real 100% Single Chip Computer using BASIC-52.  The Flash programming cycle endures for around 200 times.  Since we are going to flash only once, we need not to bother about flash programming anymore.

Since there is lot of space and no other components required, I don't want to go for fabrication with no other features. So I have decided to add onboard USB-TTL converter.  We can directly connect the Single Chip Computer to PC using 4 connections VCC, GND, D- & D+ pins.

The assembled and firmware loaded board looks like below. 

Both top and bottom side view. In the top side only one chip needs to be assembled. Bottom side there is no components needed for wired and wireless operation. There is a optional...

Read more »

ideabook.zip

BASIC-52 program listing The Microcontroller Idea Book Circuits, Programs, & Applications featuring the 8052-BASIC Microcontroller by Jan Axelson

Zip Archive - 21.52 kB - 03/26/2024 at 15:45

Download

microcontroller_idea_book.pdf

The Microcontroller Idea Book Circuits, Programs, & Applications featuring the 8052-BASIC Microcontroller by Jan Axelson

Adobe Portable Document Format - 1.32 MB - 03/26/2024 at 15:44

Preview
Download

270010-003_MCS_BASIC-52_Users_Manual_Nov1986.pdf

MCS BASIC-52 Users Manual 270010-003 Nov 1986

Adobe Portable Document Format - 16.33 MB - 03/26/2024 at 15:29

Preview
Download

MCS_BASIC52.pdf

MCS BASIC-52 ORERATING AND REFERENCE MANUAL V1.0 & V1.1 INTEL CORPORATION 1986

Adobe Portable Document Format - 776.74 kB - 03/26/2024 at 15:20

Preview
Download

Intel_80C52_DS.pdf

Intel 80C52 datasheet 87C52/80C52/80C32 Preliminary

Adobe Portable Document Format - 250.38 kB - 03/26/2024 at 15:16

Preview
Download

View all 7 files

  • 1
    SOURCE CODE

    First we need to download the source code from HERE

    You can find assembly language files along with hex and lst files.  

    If you want to modify anyting then you need to use the assembler .

  • 2
    ASSEMBLER

    I have used the C51ASM assembler for Windows from Microchip from HERE

    C51ASM is a 2 pass assembler same as metalink and produces same checksum without any errors or warning.

  • 3
    WCHISPTool

    To program the hex file into the FLASH of the target microcontroller, we need the WCHISPToolwhich is available .

    We can easily program using USB port which supplies VCC, GND and D+ and D-

View all 3 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates