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.
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 »
Do you know if anyone is working on adding USB (CDC) support to Basic52 instead of (or in addition to) UART? There ought to be enough space...