• Please review our updated Terms and Rules here

8051/8052 SBC

Ruud

Veteran Member
Joined
Nov 30, 2009
Messages
1,752
Location
Heerlen, NL
About 40 years ago I was tinkering with the 8052-BASIC micro-controller but lost interest due to Commodore and simply having not enough time. But next year I will retire and preparing for this new era I went through my stock and surprise: I found my original IC. So I decided to buy this cheap DIY devellopment kit. OK, I don't know if this counts as home brew but at least I had to solder it myself :) But don't worry, I have another project in my sleeve.

Unfortunately I realized too late that this DIY kit cannot be used for the 8052-BASIC because RAM is needed. So some questions:
- Does anybody else have this kit?
- If so, did you program something for it?
- If so, would you be so kind to share it with us, please?

I also want to share this tread for asking questions, sharing programs and code, and sharing hardware ideas.

So let's have fun!
 
About 40 years ago I was tinkering with the 8052-BASIC micro-controller but lost interest due to Commodore and simply having not enough time. But next year I will retire and preparing for this new era I went through my stock and surprise: I found my original IC. So I decided to buy this cheap DIY devellopment kit. OK, I don't know if this counts as home brew but at least I had to solder it myself :) But don't worry, I have another project in my sleeve.

Unfortunately I realized too late that this DIY kit cannot be used for the 8052-BASIC because RAM is needed. So some questions:
- Does anybody else have this kit?
- If so, did you program something for it?
- If so, would you be so kind to share it with us, please?

I also want to share this tread for asking questions, sharing programs and code, and sharing hardware ideas.

So let's have fun!
Your kit has pin headers so it might be possible to add an Arduino like shield on top (or bottom) with the extra RAM and EEPROM?

I have been fiddling with my homebrew 8052AH Basic board and have it running with 32k+8k SRAM and a 32k EEPROM

The EEPROM is mapped in program space at 2000h/4000h and in the 8000h/A000h area, giving the option for added Basic instructions and offering 16 kB of Basic program storage as well.

So far I have added instructions for driving a 128x128 LCD (it is connected through an MCP32S17 SPI IO expander connected to three pins on PORT1)

The extra 8kB SRAM is mapped into both program and data space at the top (E000h) so I can execute code while the EEPROM is unavailabe during writes.

P.S. I ordered that kit also, seems like a nice bunch of parts anyway :)
 

Attachments

I've just ordered a couple of AT89C52's, I'm going to have a go too!
For some reason I'd always thought MCS-basic-52 was integer only, a 'tiny basic'.
Having downloaded the files and done some reading, I now realise its full FP
with a huge range of commands & features. Should be fun!
Phil
 
Yes this Basic is quite comprehensive for its 8 kB size. String handling is a bit awkward but usable.

Elektor published an improved version of the Basic (V1.3), it has better support for EEPROM's and you can use other 805x CPU' s as well.

I am running my homebrew board with a real 8052AH Basic V1.1 chip so I added my own routines for writing to the EEPROM. It needs part of the internal code because of how the EEPROM is connected.
 
This sinewave display is made with this code, using my added Basic commands
Code:
10     REM graphic LCD demo
20     DMODE 12
30    F=20
40     CLG
50     FOR S=10 TO 63 STEP 5
60     FOR T=0 TO 127
70     PLOT T,63-SIN(T/F)*S
80     NEXT T
90     NEXT S
100    END
 

Attachments

  • 2025-10-12 19.41.55.jpg
    2025-10-12 19.41.55.jpg
    1.2 MB · Views: 2
Ancient stuff.
I also had an 8052 with BASIC 40 years or so ago.
I ran a few simple BASIC programs. IIRC it was one of the first microprocessors to have BASIC on board the chip.
Pretty impressive for the day.
Now if I can only find it... !
 
Thought I would mention that I programmed an AT89S52 with v1.3. It is sightly different than the AT89C52. I used an adapter for my Willem, of course there are other ways of programming these chips.. As mentioned, the original 1.1 source file is is around (e.g., here) and I am attaching the 1993 zip file from the EDN BBS that I thought was worthy of investigating back then :). Both versions (1.1 and 1.3) were tested.

Edited to add: I found this site to be a wealth of knowledge on the subject.
 

Attachments

Last edited:
Can anyone advise a hex-to-bin and bin-to-hex converter for the 8051/8052, please? Preferably with the source code so I can find out how it works.

Thank you!
 
Its standard Intel hex, not related to the 8051/2. Any hex util such as HxD will do that, even the TL866 eprom programmer software will do conversions.
All hex converters work the same way, by combining character pairs to make load addresses and data bytes, and accumulating a checksum which is compared with the file :)
 
I am using 'asem' as the 805x assembler and the srecord utils for converting them to binary. This is under Linux.


srec_cat file.hex -Intel -o file.bin -Binary

converts an Intel hex file generated by the assembler to a binary file
 
Its standard Intel hex, not related to the 8051/2. Any hex util such as HxD will do that, even the TL866 eprom programmer software will do conversions.
Thank you! And I do have a TL866 so that is covered as well.

The reason I could use the source code is to persuade my assembler to out HEX as well.
 
Btw unless you really need/want Intel S-records I would recommend considering Motorola S-records.
 
Another Linux option is the srecord utilities found at http://srecord.sourceforge.net (and I see that @gertk has mentioned srec_cat, one of the three utilities, already). It's available as an installable package in many distributions: debian, ubuntu, fedora, mint, arch etc. Also freebsd, netbsd, openbsd. You can even use it on Windows.

For binary to s-record:
srec_cat /path/to/my/input.bin -binary -output /path/to/my/output.srec -motorola

For s-record to binary:
srec_cat /path/to/my/input.srec -motorola -output /path/to/my/output.bin -binary

Besides s-record and raw binary, it supports 40 other formats (some are read- or write-only), and the current maintainer seems keen for a challenge if you've got a format that the utilities don't support yet. Also has other handy features like generating checksums and CRCs, or random and repeated data fills. It's a real swiss army knife, and I'm a happy user.
 
Back
Top