• Please review our updated Terms and Rules here

8051/8052 SBC

On the side of the terminal connect CTS and RTS together plus DSR, DTR and DCD. Have a look at this Wikipedia article and then especially the "Loopback handshaking" part.

Weird, it seems I have been wrong for over 40 years: I always thought that this part was a null-modem cable. The full wired one was just "a serial cable".
Alrighty, can I wire cts to DTS and whatnot on the DB9 side I did that and coolterm recognized them as on.
 
Alrighty! How can I connect this to a terminal, do I use the 3 pin gnd tx rx wires? Or do I also wire DSR DTR DCD CTS and RTS. Also do I use a null modem cable and do I wire it on the DB-9 side or the terminal side. I have a screw terminal DB-9 connector which I wired DSR to DTR and DCD, CTS to RTS, would this work on a vt420? Image from coolterm showing the lines I mentioned (tx and rx are inactive since nothing is being sent or received as of now since I haven't typed in any programs)
 

Attachments

  • 1770162239045.png
    1770162239045.png
    3.4 KB · Views: 1
Last edited:
This C8051F380 is ridiculously fast.. After some struggling I got the SPI finally working.
Screen clear on the ILI9341 LCD is now just a blink
:)

I made a simple shield like PCB with a 15 ns 32kB SRAM on it and it runs with all settings to the max..
The wide flatcable is attached to the LCD
Also re-routed the programming port to the side. (and yes, I cut the PCB a bit/pin to short...)
.2026-02-02 18.39.59.jpg2026-02-02 18.40.29.jpg

Next step is to get the microSD working...
 
This C8051F380 is ridiculously fast.. After some struggling I got the SPI finally working.
Screen clear on the ILI9341 LCD is now just a blink
:)

I made a simple shield like PCB with a 15 ns 32kB SRAM on it and it runs with all settings to the max..
The wide flatcable is attached to the LCD
Also re-routed the programming port to the side. (and yes, I cut the PCB a bit/pin to short...)
.View attachment 1315834View attachment 1315835

Next step is to get the microSD working...
Hey gertk, if you got microSD working, what would be possible? Maybe I'll try messing around with that if I gain enough knowledge. Also, with the max232 setup you sent me, do I use a straight-through db9 to db25 or a null modem db9 to db25?
 
Last edited:
Hello everyone, sorry for a lot of messages lately I keep thinking of stuff. How can I add a paper tape reader to p1.0-7 using photoresistors or such technology? Do I bit-bang an SPI port?
 
Hey gertk, if you got microSD working, what would be possible? Maybe I'll try messing around with that if I gain enough knowledge. Also, with the max232 setup you sent me, do I use a straight-through db9 to db25 or a null modem db9 to db25?
With the onboard microSD of the C8051F340/380 board you can use that for storing data or Basic programs, it is already connected to port pins of the C8051F processor.
However to implement a full FAT32 filesystem is going to take a lot of code space/work.
I first want to add my mini file system which would be much simpler but already can store up to 255 Basic programs in a single directory.

RS232 is always connected as crossover signals: IN to OUT but what cable you need is depending on the gender of the connectors and the implementation of the manufacturer.
A RS232 breakout box or RS232 analyzer can be helpful but a simple multimeter will do most of the time too.

Without a cable attached and the device powered on just measure if a pin on its RS232 connector or COM port has voltage on it or not. If it has a voltage it is an output, otherwise it is either not connected or an input.
Write all the pins down for both devices and compare them for the devices you want to connect. If available, read the manual and see how the pins are assigned.
 
With the onboard microSD of the C8051F340/380 board you can use that for storing data or Basic programs, it is already connected to port pins of the C8051F processor.
However to implement a full FAT32 filesystem is going to take a lot of code space/work.
I first want to add my mini file system which would be much simpler but already can store up to 255 Basic programs in a single directory.

RS232 is always connected as crossover signals: IN to OUT but what cable you need is depending on the gender of the connectors and the implementation of the manufacturer.
A RS232 breakout box or RS232 analyzer can be helpful but a simple multimeter will do most of the time too.

Without a cable attached and the device powered on just measure if a pin on its RS232 connector or COM port has voltage on it or not. If it has a voltage it is an output, otherwise it is either not connected or an input.
Write all the pins down for both devices and compare them for the devices you want to connect. If available, read the manual and see how the pins are assigned.
You should try writing a CP/M clone for the 8052 using said file system, it'd be decently useful.

I bought both null modem and straight through, and will be testing them out soon. I figure that my max232 config already crosses TX and RX, but I'm not sure so I ordered both, and whichever one that works, well works!

Edit:
Did the trick, pin14 was giving out -8v and that ones connected to RXD, pin 13 was giving out-6v and that's connected to TXD. I'm assuming this needs a straight through?.
 
Last edited:
Alrighty, got DB-25 working with a straight through, I'm going to purchase a terminal soon after VCF SoCal, since I'm bringing 800 usd there. Turns out, my db9 to USB was null modem, you learn something new every day.
 
A small clip showing the speed difference between the original Intel 8052AH Basic cpu and the SiliconLabs C8051F380. Same Basic program, just faster hardware and 'real' SPI

 
A small clip showing the speed difference between the original Intel 8052AH Basic cpu and the SiliconLabs C8051F380. Same Basic program, just faster hardware and 'real' SPI

Oh wow that is much faster. Does the c8051 have SPI or are you bit banging it?
 
Oh wow that is much faster. Does the c8051 have SPI or are you bit banging it?

It has a true SPI port and a lot of other tricks.

Reading datasheets is not always fun certainly not as microcontrollers like this are getting more features.
But I asked Gemini and Grok to come up with code to activate both the UART and SPI on PORT0 (as they are connected already on the dev board) and both failed miserably stating registers that did not exist, wrong addresses and sometime even claiming falsely that SPI and UART could not co-exist on PORT0. So back to the datasheet and read read read...
 

It has a true SPI port and a lot of other tricks.

Reading datasheets is not always fun certainly not as microcontrollers like this are getting more features.
But I asked Gemini and Grok to come up with code to activate both the UART and SPI on PORT0 (as they are connected already on the dev board) and both failed miserably stating registers that did not exist, wrong addresses and sometime even claiming falsely that SPI and UART could not co-exist on PORT0. So back to the datasheet and read read read...
So it has MOSI?
 
So if I read correctly, this IC has all the needed hardware already on the chip?
Indeed, the only thing I have added was a 32 kB SRAM chip to get Basic running 'at large' (thanks to @ceptimus I had a good headstart with that) and connected the ILI9341 SPI LCD in parallel (except for the NSS line) to the microSD slot. The display als needs some extra port pins to drive Data/Command (DC), Reset (RST), ChipSelect (CS) and backlight (LED) pins. These are routed to PORT1 pins.

The C8051F380 has SPI, I2C, dual UART and a rather clever thing called 'the crossbar' which can map different peripherals to different port pins.
Also the external memory interface can be set to non-multiplexed so no external latch needed (at the cost of an extra 8 IO pins)

Small bummer: you can not have external program space. Buth with 64kB if internal ROM space that is not a real problem.

Internal XRAM is 4 kByte so you can run the Basic even without external memory.

Also the CPU runs of 3.3 Volts (ideal for modern peripherals) but the IO ports are 5 Volt tolerant.

You do need the 'special' USB programmer to program the internal ROM space it but it is cheap, it is also possible to write bytes to the internal ROM from within your assembler code.

and it is fast.. really fast for a 8051, there is an internal oscillator (the dev board comes with a crystal too but is not needed) that runs reliably at 48 MHz

I did cut the micro SD 'card-detect' line to PORT4.7 because it would interfere with the external memory data bus which uses PORT4. Maybe I will re-route that to a pin on PORT1 if needed.
 
It also runs most instructions in one cycle - compared with the twelve cycles of a standard 8051. So it's about twelve times faster when running at the same clock speed. Most 8051s use an 11 MHz or 12 Mhz crystal, but the C8051's oscillator can be set to 48 Mhz. The result is that it runs about fifty times the speed of a standard 8051.
 
Back
Top