Author Topic: Can anybody recommend a socketed 8051 dev board?  (Read 5276 times)

0 Members and 1 Guest are viewing this topic.

Offline audiotubesTopic starter

  • Regular Contributor
  • *
  • Posts: 176
  • Country: cz
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #25 on: January 14, 2024, 08:36:59 pm »
I found 2 USB UARTs locally:

https://www.gme.cz/v/1508933/ftdi-prevodnik-s-mini-usb-a-isp
https://www.gme.cz/v/1508310/prevodnik-usb-uart-reset-pin

Is this what I should get, and will it work with the Mikroe board mentioned earlier, so I don't have to shell out 59 euros for their programmer?

Thank you.
I have taken apart more gear than many people. But I have put less gear back together than most people. So there is still room for improvement.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1545
  • Country: au
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #26 on: January 15, 2024, 01:04:38 am »
I found 2 USB UARTs locally:

https://www.gme.cz/v/1508933/ftdi-prevodnik-s-mini-usb-a-isp
https://www.gme.cz/v/1508310/prevodnik-usb-uart-reset-pin

Is this what I should get, and will it work with the Mikroe board mentioned earlier, so I don't have to shell out 59 euros for their programmer?

The mikroe257 already has a FT232 included, so you do not need anything for UART bootloader parts. (eg AT89LP51RB2/RC2/RD2/ED2 etc, & STC12C5Ax family )

Their mikroProg for 8051, is a SPI-USB bridge, that supports the AT89 MCU SPI programming mode.  Expensive for what it is.

Addit: it gets worse. I just spotted the device list for their mikroProg for 8051 is only partial, and lacks the AT89LP51RB2/RC2/RD2/EC2.

« Last Edit: January 15, 2024, 01:57:32 am by PCB.Wiz »
 
The following users thanked this post: audiotubes

Offline audiotubesTopic starter

  • Regular Contributor
  • *
  • Posts: 176
  • Country: cz
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #27 on: January 15, 2024, 07:46:35 am »
I found 2 USB UARTs locally:

https://www.gme.cz/v/1508933/ftdi-prevodnik-s-mini-usb-a-isp
https://www.gme.cz/v/1508310/prevodnik-usb-uart-reset-pin

Is this what I should get, and will it work with the Mikroe board mentioned earlier, so I don't have to shell out 59 euros for their programmer?

The mikroe257 already has a FT232 included, so you do not need anything for UART bootloader parts. (eg AT89LP51RB2/RC2/RD2/ED2 etc, & STC12C5Ax family )

Their mikroProg for 8051, is a SPI-USB bridge, that supports the AT89 MCU SPI programming mode.  Expensive for what it is.

Addit: it gets worse. I just spotted the device list for their mikroProg for 8051 is only partial, and lacks the AT89LP51RB2/RC2/RD2/EC2.

Thank you. I meant to ask not only if these USB UARTs would work with the Mikroe board, but also wanted to ask if they were what you recommended regarding 8051 chips in general above.

Are these the right devices?
I have taken apart more gear than many people. But I have put less gear back together than most people. So there is still room for improvement.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1545
  • Country: au
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #28 on: January 15, 2024, 06:00:30 pm »
has a FT232.

Are these the right devices?
Almost any TTL UART bridge can work.
I try to buy the ones with the control handshake lines at least available somewhere on the board.
No excuse to not take them to a pad.
2nd one does this.
 
The following users thanked this post: audiotubes

Offline audiotubesTopic starter

  • Regular Contributor
  • *
  • Posts: 176
  • Country: cz
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #29 on: January 15, 2024, 07:23:05 pm »
Did you mean the first one does?
I have taken apart more gear than many people. But I have put less gear back together than most people. So there is still room for improvement.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1545
  • Country: au
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #30 on: January 15, 2024, 08:30:32 pm »
Did you mean the first one does?
The yellow header is not well documented, so we have no idea what pins go where.

Here is an example, of one done properly.
https://www.aliexpress.com/item/1005005866120228.html

 
The following users thanked this post: audiotubes

Offline audiotubesTopic starter

  • Regular Contributor
  • *
  • Posts: 176
  • Country: cz
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #31 on: January 15, 2024, 09:23:25 pm »
Did you mean the first one does?
The yellow header is not well documented, so we have no idea what pins go where.

Here is an example, of one done properly.
https://www.aliexpress.com/item/1005005866120228.html

I see, thank you. What is CTS used for?

On the back of the board which I think you didn't like of the two I linked, there is a CTS label. I wonder if that picture helps understand the pinout which is unlabeled at the top of the board.

BTW I installed Simplicity Studio to try to code up some 8051 although I don't yet have a device. Miserable experience!

1. You have to sign up for a silabs account and then use that to sign in to the IDE
2. Was unable to find a way to create an assembly lang. source file in the IDE, everything seem based on C. I'm sure there must be a way to do it, but I could not find it
3. Tried to turn off "User Experience" option in the IDE which sends my info to silabs. That caused it to open the signon screen again, I signed on, the option I wanted to disable was reenabled, and that got into an infinite loop of me unchecking the box, having to sign in, returning to the IDE only to find that the option was checked again.
4. Uninstall, go find all silabs crapfiles all over the users directory, delete.

I found Microchip has a standalone 8051 assembler, I grabbed that and will look at it later. The setup is manual, non-existent, you have to update the Windows environment variables etc. Looks like 1985, but that's fine.

Checking TI's Code Composer now, although that won't help with 8051 but I do have a couple of MSP430 boards for some other project ideas.

Update: So TI is aware of the fact some people write assembly lang, and they give you the option of an assembly only project, lovely! Both this an Silabs "Simplicity Studio" use Eclipse which means appalling gigantic packages of burdensome crap, wretched slow performance with anything that has to do with the IDE. Do professional MCU developers have to live with this stuff? It's hard to imagine.

Anyway after quite a long time installing, I started a project and then wanted to look at examples so it opened a package manager and installed stuff to a drive other than where I installed Code Composer. So big UX fail there. I couldn't find the package manager after that, when I searched help I got 150 hits, nothing looked relevant, couldn't find a way to delete 1.5G of crap to be able to install it on the correct drive. So I had to delete the whole thing and I'll start again when I'm less angry :D

I've been developing software (in assembler) for the better part of 50 years. I mean that is my job, not that I do it for fun although I do enjoy it. Every time I have to use PC software I regret it...and I marvel at the people who do live with this stuff and are ok with it.

I hope there is a way to use command line tools, even if you have to install 5G of IDE to get them!

« Last Edit: January 15, 2024, 10:28:31 pm by audiotubes »
I have taken apart more gear than many people. But I have put less gear back together than most people. So there is still room for improvement.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1545
  • Country: au
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #32 on: January 16, 2024, 12:04:59 am »

Update: So TI is aware of the fact some people write assembly lang, and they give you the option of an assembly only project, lovely! Both this an Silabs "Simplicity Studio" use Eclipse which means appalling gigantic packages of burdensome crap, wretched slow performance with anything that has to do with the IDE. Do professional MCU developers have to live with this stuff? It's hard to imagine.

Anyway after quite a long time installing, I started a project and then wanted to look at examples so it opened a package manager and installed stuff to a drive other than where I installed Code Composer. So big UX fail there. I couldn't find the package manager after that, when I searched help I got 150 hits, nothing looked relevant, couldn't find a way to delete 1.5G of crap to be able to install it on the correct drive. So I had to delete the whole thing and I'll start again when I'm less angry :D
It's a sign of the times - things are large and cumbersome.  PC hardware is getting faster about the same as software is getting bigger !

There are Silabs assembler examples, just not many of them.
The debugger is good enough, so I persist with the bulk, but do use notepad and external builds in many cases.

As mentioned before, you can launch SiLabs debugger inside Simplicity Studio, on an external generated OMF51, by manually simply pointing to that OMF51.
The OMF51 should have all source files as full paths, so debug works.



I've been developing software (in assembler) for the better part of 50 years. I mean that is my job, not that I do it for fun although I do enjoy it. Every time I have to use PC software I regret it...and I marvel at the people who do live with this stuff and are ok with it.

I hope there is a way to use command line tools, even if you have to install 5G of IDE to get them!

You can launch Keil tools from command line & external editors.
I'll find a batch example ....  you need to locate A51/BL51/OH51
Code: [Select]
ECHO OFF
REM Keil A51/BL51/OH51 Assembler BUILD BATCH
REM looks like DEBUG is required A51 command line
ECHO Assembling %~N0.asm using A51
C:\SiliconLabs\SimplicityStudio\v4\developer\toolchains\keil_8051\9.53\BIN\A51.EXE %~N0.asm DEBUG
REM C:\SiliconLabs\SimplicityStudio\v4\developer\toolchains\keil_8051\9.53\BIN\A51.EXE %~N0.asm SYMBOLS DEBUG
if errorlevel 1 ECHO   !!!!!!!!!!!  Assemble Warnings or Errors !!!!!!!!!!!!!!!  Search for '*** ERROR' or '*** WARNING' in %~N0.LST file
if errorlevel 1 GOTO END
ECHO Linking %~N0.obj using BL51
C:\SiliconLabs\SimplicityStudio\v4\developer\toolchains\keil_8051\9.53\BIN\BL51.EXE %~N0.obj
if errorlevel 1 ECHO   !!!!!!!!!!!  Linking Errors !!!!!!!!!!!!!!!
if errorlevel 1 GOTO END
REM Simulators and Debug expect omf extension, from BL51 default no extension file, & create HEX, in case needed.
C:\SiliconLabs\SimplicityStudio\v4\developer\toolchains\keil_8051\9.53\BIN\OH51.EXE %~N0
ECHO Copying OMF
COPY %~N0. %~N0.OMF
:END
pause


and here are command lines for Microchip Assembler C51ASM,  and ASEM
Code: [Select]
:ATMEL_ASM
D:\AT89LPDeveloperStudio\system\C51ASM\BIN\c51asm %~N0.asm --listfile --omf-51 --debug

:ASEM_51_ASM
D:\AT89LPDeveloperStudio\Turbo51Studio\Asem-51\ASEMW.EXE %~N0.asm /omf-51

rem ASEM.EXE only 8 char names ?, a blast from the past ....


Did you download this MCtools, I linked before ?  That is a nice 8051 simulator, that has SDCC support and Turbo51 support and assembler. It is small and nimble.

https://www.rathlev-home.de/mc/mctools-e.html

It does not simulate the newest peripherals, but is very good for getting code blocks working.
« Last Edit: January 16, 2024, 12:14:07 am by PCB.Wiz »
 
The following users thanked this post: audiotubes, adinsen

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12862
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #33 on: January 16, 2024, 12:39:54 am »
Considering the two USB UART adapters:
I found 2 USB UARTs locally:

https://www.gme.cz/v/1508933/ftdi-prevodnik-s-mini-usb-a-isp
https://www.gme.cz/v/1508310/prevodnik-usb-uart-reset-pin

The first claims to have a FT232RL, which *IF* *Genuine* FTDI, is preferable for embedded stuff due to the wide range of other stuff it can do, including 'talking' SPI and I2C, and even as a JTAG adapter using OpenOCD and its 'bitbang' mode.  Its also got a convenient switch to configure its logic levels. However its cheaper than FTDI sell just the chip, so odds are its fake.   If you are using Linux there are fairly reliable workarounds for fake FTDI chips, but on Windows (and also I believe OSX), you are in for driver hell with the genuine FTDI drivers refusing to talk to the chip, and if you roll back the drivers to pre-FTDIgate and have been lucky enough to avoid the driver that attempts to brick the fake chips by wiping their VID and PID, good luck getting that to stick long-term through OS updates.

The second claims a SiLabs CP2102, which is less versatile than the FTDI chip, but at the price point is far less likely to be fake and only outputs 3.3V signals.  However its inputs are 5V tolerant.  The extra serial handshake signals are available at the board edge pads.

Re: Simplicity Studio,
I think you grabbed the wrong IDE.  SiLabs have a native Windows 8051 IDE which does support assembler projects and doesn't force online registration.  Have a root around at:
https://www.silabs.com/developers/8-bit-8051-microcontroller-software-studio
and see if you like it better.  I have it and SDCC installed to support a C8051F330 'toolstick' I was playing with a while back.
 
The following users thanked this post: PCB.Wiz, audiotubes

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1545
  • Country: au
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #34 on: January 16, 2024, 01:58:13 am »

Re: Simplicity Studio,
I think you grabbed the wrong IDE.  SiLabs have a native Windows 8051 IDE which does support assembler projects and doesn't force online registration.  Have a root around at:
https://www.silabs.com/developers/8-bit-8051-microcontroller-software-studio
and see if you like it better.  I have it and SDCC installed to support a C8051F330 'toolstick' I was playing with a while back.

Interesting suggestion, that older IDE is a little deprecated, but I downloaded it and checked. Seems Ok in Win11. Download is 40MB and install is ~ 200MB.

Release notes are here  IDE Version 5.50 - June 27, 2019 
https://www.silabs.com/documents/public/release-notes/mcu_WebReadme.txt

Shows it supports EFM8 parts, but not (yet?) the newest EFM8BB5x series - but that may not matter to the OP.
EFM8BB1 is cheap, and has the low cost Debug EFM8BB1LCK.

It needs to be pointed to Keil C51 for C builds, but it can also download a externally created OMF51 file, so I checked a Atmel/Microchip C51ASM  assembler created, and that  seems fine.

Attached screen shot is a SiLabs older IDE 5.5 running a externally generated C51ASM file I had lying about, and I added 3 watch and stepped a few lines, on a EFM8BB1LCK host.
(note the red highlight in DATA changed after single step)
Just point to the OMF51 file to download.

« Last Edit: January 16, 2024, 02:17:04 am by PCB.Wiz »
 
The following users thanked this post: audiotubes

Offline audiotubesTopic starter

  • Regular Contributor
  • *
  • Posts: 176
  • Country: cz
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #35 on: January 16, 2024, 08:32:23 am »
You guys are AWESOME! Thanks so much for the helpful info and links.
I have taken apart more gear than many people. But I have put less gear back together than most people. So there is still room for improvement.
 

Offline bson

  • Supporter
  • ****
  • Posts: 2270
  • Country: us
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #36 on: January 17, 2024, 06:49:48 pm »
Remember there's a difference between a programmer and a debugger.  The former is plenty if all you're going to do is flash it with some firmware you have on hand, but if you're actually going to develop firmware a debugger is often a huge time saver and can do things that you simply can't with printf's to a serial port.  Like set hardware breakpoints that will work even with interrupts disabled and don't mess with timing (unlike synchronous polled serial writes).
 

Offline adinsen

  • Regular Contributor
  • *
  • Posts: 50
  • Country: dk
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #37 on: January 17, 2024, 09:37:00 pm »
Some things are impossible to find with printf's and hard to find even with debuggers... I experienced a timing issue recently where a somewhat longish interrupt handler caused the serial port to do odd stuff. I realized when I looked at the generated assembly that the simple C code was not so simple.

Fortunately I could move most of the processing I was doing ino into the main loop instead and that solved it.

However, I must admit I found it strangely pleasing to run into such a problem for my hobby project  ;D

I doubt if a debugger could have helped me detect this, but my 89S51 doesn't have that ability anyway. What goes on inside it stays inside it. For my next design, I have six unused pins which I'll reserve for debugging.
 

Offline audiotubesTopic starter

  • Regular Contributor
  • *
  • Posts: 176
  • Country: cz
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #38 on: January 20, 2024, 07:28:37 pm »
I like the ATMEL 89S51/52's, even though they are going out and are not single cycle like the LP's. But they're still available through my normal channels. I guess I'm nostalgic about the 8051 architecure, DIP40 etc ;D

I prefer to wire wrap my prototypes so I don't need a dev board. Yeah, I'm +50 and still use the same wire wrap tool I got back when I was a teenager  8)

I flash the 89S51 with my XGecu T48 programmer using the SPI interface.


My buddy's dad worked for AT&T in the 1970s and had a living room full of hand-built SBCs and other devices, all wire-wrapped. It seems to me a very good system, but the sockets are like 2 euros a piece on digikey.

Do you have a good international source for wire wrap goodies?

I am a bit lost with all the discussion on programming here. So if I can get some quiet time yet this weekend I'll probably order one of the Silabs BB boards mentioned upthread that has onboard program/debug, and probably the standalone 8051 card from Mikroe, which has a DIP40 socket and onboard programming (but I think not debug).

I'll also take a chance on some USB UARTs, one I linked above which is about 5 euros and another one I found on Mouser which is around 16 euros but should have the real FTDI chip. If I don't hate 8051 (I hate most of what I have seen from Intel) and it turns out to be more or less what I expected, then I will try the po-man's dev board either with wire wrap, breadboard, or PCB. I got some crystals and other stuff in the last weeks and should be able to get something together.
I have taken apart more gear than many people. But I have put less gear back together than most people. So there is still room for improvement.
 

Offline audiotubesTopic starter

  • Regular Contributor
  • *
  • Posts: 176
  • Country: cz
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #39 on: January 22, 2024, 10:40:15 pm »
Did you download this MCtools, I linked before ?  That is a nice 8051 simulator, that has SDCC support and Turbo51 support and assembler. It is small and nimble.

Thank you, yes. I looked at the site and indeed it looks like a very nice set of tools. But I am going to try to start with vendor tools for now.

The Silabs EFM8BB52 series parts are newer, with better ADC and DAC and more MHz than the Atmel parts, but EFM8 do not come in DIP.  SO16 is the 'largest pitch' part.

I finally had a few minutes free, so I ordered BB52-EK2701A. Thanks very much for all your help.

If your goal is to write in assembly then the 8-bit AVR series of microcontrollers is probably a nicer option:

Thanks very much, along with the Silabs board mentioned above I also ordered a Microchip EV66E56A.

It's gonna be a long startup curve for me, but at least I will have one 8051 and one AVR board that have onboard program and debug.

Thanks to everyone, you have all been incredibly patient and helpful!

I have taken apart more gear than many people. But I have put less gear back together than most people. So there is still room for improvement.
 
The following users thanked this post: Whales, PCB.Wiz

Online Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3362
  • Country: nl
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #40 on: January 24, 2024, 11:27:47 pm »
First, I apologize for not responding sooner. It's a bit of a hit and miss for following forums for me.

Thanks, I did not know it was not a good architecture from the assembly programmer's view. What MCU architectures do you like and would consider the best, of 8 or 16 bit MCUs that still have DIP packages available?

I did some assembly for school project only, and I liked the mnemonics of the Z80 a lot better then the 8085, even though the binaries were mostly compatible (Z80 had some nice extra index registers and shadow registers, but those were not often used. 6802 was apparently popular but I never used it.

But more important: I stopped using assembler over 20 years ago. Any decent uC family has at least one viable C compiler these days, and writing code in C instead of assembly is a huge productivity improvement. C is also easier to learn then assembly. A program written in C is also mostly portable between different uC architetures. You have to abstract out machine dependent code such as direct register writes, but generic algorithms can be ported quite easily.


I am not qualified to try to design a PCB, I am getting back into electronics after many years of being away from it, and I am having to relearn almost from the beginning.

In the last 30 years, "electronics" has changed gianormously. Electronics and computer magazines were very popular back then, and now a lot have seized to exist, and the remaining ones are struggling. Back then assembly was widely used, but the reason for it was that there simply were no better tools available. When better tools (such as C compilers) became available, a lot of excuses were invented by the assembler lovers to justify sticking to their own trade. Back then, the few C compilers that did exist, were also much less advanced then they are now. They have been continuously improved and are still improving.

It is a whole different world. Take for example an ESP32. You can write a program with a size of 2 pages, pull in some libraries, and then communicate over WiFi with some other uC or PC that speaks WiFi too. There are many thousandths of IC's you can add to a microcontroller board, and there are thousands of small libraries you can use to talk to such an IC, over whatever interface that IC supports (often SPI, I2C or some custom serial protocol).

I say that re-starting now with learning assembly for an 8051 is a waste of time. Put the same effort into learning C and you can quite easily switch between 20 or so different microcontroller architectures. And you can re-use code distributes via sites such as github and gitlab. There are hundreds of thousands of projects over there. Many uC's have small breakout boards available that you can simply stick on a breadboard, and that is all you need. Some work with bootloaders. for others you pay EUR5 for such a board, and EUR3 for a programmer.

I wonder, what sort of research have you done before starting this thread? Where are your interests?
Was it just "I once did asm on 8051 and I want to do it again", or other reasons?

I am not qualified to try to design a PCB,

This is also a topic you do not have to be afraid of.
There is no "qualification" needed for starting to design a PCB. 12 year old kids can start designing PCB's these days. I use KiCad myself. It's a quite capable PCB design suite, and it is fully open source and free software. Just install it and start practicing. If you want to do anything with electronics, you probably want to draw some schematics too. And then you are already 30% along the route to the PCB. Also, when you design your own PCB, it is easy to work with SMT parts (0805 is an easy "size" for resistors and capacitors to start with). I find SMT easier to handle then the old wired parts. All that bending and cutting of leads was a lot of work. And and turning the PCB and working with "straight" and "mirror image" layout was a bit nuisance for me.

And also, once you've designed a PCB, you can simply order them online. Single layer PCB's are nearly extinct (Except for mass produced FR2). You can order PCB's for around EUR2 (each) these days, and for that money you get double sided PCB with plating, two solder masks and two silkscreens.

I do do not know what your reasons are for wanting to stick with ASM on 8051. If that is all you want, then go for it. But if your main intention is to "do something fun with electronics". Then look around a bit first and then choose something more modern.

There are lots of sites to learn about electronics, and demo's of (possible) projects. Hackaday.com is a good start, but just browsing youtube is also an option. Several of the old magazines also still exist, and they often have a forum and a section with projects made by their members.
 
The following users thanked this post: audiotubes

Offline audiotubesTopic starter

  • Regular Contributor
  • *
  • Posts: 176
  • Country: cz
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #41 on: January 25, 2024, 10:03:21 am »
As noted above, my day job for the last almost 50 years has been writing assembler. I don't use libraries, I write services and it's just me and the hardware and the OS, with nothing in between.

I don't like C for many reasons and I also don't agree this or that language is more productive. I'm more interested in quality than C can provide, and looking at MCUs for me is as much about another platform to write assembly language on as it is about a fun project or two where I can get more up to date with what else has changed in the decades I wasn't doing anything with electronics.

The focus on 8051 was that I was a video where a guy was able to put together an 8051 on a breadboard with minimal components. That appealed to me, maybe one day I would be able to do something useful. If I look at the more modern, powerful MCUs, I don't believe I'll ever be able to design my own board.
I have taken apart more gear than many people. But I have put less gear back together than most people. So there is still room for improvement.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12862
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #42 on: January 25, 2024, 10:23:10 am »
The same is true of Microchip's PIC MCUs, from 8 bit all the way up to 32 bit, as many are available in DIP packages.  Generally, all you need to get one running on a breadboard are a few decoupling caps, a 10K pullup on /MCLR (the reset pin) and a programmer to flash the chip with your code.   Microchip also have various ex Atmel AVRs in DIP packages, which are probably a better choice for an assembly programmer than the PICs as the architecture of the lower end ones is just plain nasty.
« Last Edit: January 25, 2024, 05:34:59 pm by Ian.M »
 
The following users thanked this post: audiotubes

Offline audiotubesTopic starter

  • Regular Contributor
  • *
  • Posts: 176
  • Country: cz
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #43 on: January 25, 2024, 11:25:22 am »
Thank you.

I just got the 8051 and AVR boards I mentioned today from FedEx. These have onboard program/debug, so it will hopefully be easier to get started.

I had read that PIC architecture varied by series, so I would suspect they're not a good target for somebody who wants to code in assembly language.

Does the AVR in a DIP package need a lot of components or is it comparable to the 8051 in that regard?
I have taken apart more gear than many people. But I have put less gear back together than most people. So there is still room for improvement.
 

Online Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3362
  • Country: nl
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #44 on: January 25, 2024, 01:18:04 pm »
Does the AVR in a DIP package need a lot of components or is it comparable to the 8051 in that regard?

The minimum would be a decoupling capacitor. (Some even find that debatable).

I have had some problems with putting an atmega32 (or atmega328) directly into a breadboard because of capacitive coupling. If you use a crystal oscillator and put the crystal directly into the breadboard, then capacitive coupling between the crystal, and the I/O pins next to it can throw off the crystal and cause spurious resets or lockups. But as long as you use the internal RC oscillator this is not an issue. You can also bend the pins for the crystal upwards and solder the crystal and decoupling caps directly to the IC (some extra glue makes it robust).

The other issue is with the reset pin. AVR's have an internal pullup for the reset, but it is quite weak. If the reset pin has long wiring or if you put it in a breadboard, I advise to use a stronger external pullup resistor.

I have dabbled a bit in assembly for AVR. Wrote a few test programs before I settled on C. After that I sometimes looked at asm code generated by the compiler to judge efficiency. AVR has a relatively modern instruction set, and it's sorta nice for programming in asm. But it's instruction set has been optimized for C compilers. For example it only has an add (or was it subtract?) for immediate values. You get the other by subtracting (or adding?) a negative constant. It is possible that some assemblers have a pseudo opcode to hide this. The opcode to reset a register is also the same as the opcode for x-oring a register with itself. I guess this is common in more modern processors. I don't know about the older ones.

AVR has some other quirks too. For example an offset of 0x20 depending on the addressing method used, and limited address range for some instructions.

A small AVR costs around EUR2 and a programmers start also for EUR5 or less, so cost won't be a problem.

A thing I do not like about AVR is incompatibility of peripherals. An AVR has a bunch of timers, but there are many variants and small differences in how the timer works. There are also completey silly (and stupid) changes between the attiny, and the atmega. For example, I once bought some ATTINY2313 IC's, and then I found out it does not have a u(s)art, but it has an "usi" (universal serial interface) instead. For me this is a real nuisance. I can't write a library in C for any peripheral and map it to another timer or to an other AVR without extensive verification whether it will still work or not.

The newer atmega's are also a hodgepodge. They have functions that look nice on paper, and probably nice to have too, but they mostly break all compatibility with older atmega's. They are more like the Xmega's then the mega's.

I am more interested in switching to STM32 myself. If you read a datasheet, then it describes how a timer works, and then there is a line that states it has 5 of those timers. Peripherals also change very little between different uC's (or even between families). With AVR it's rare to find two timers which work the same.

For visual stuff, have a look at this search for a "minimal" setup with an AVR. Plenty of breadboard photo's over there.

https://duckduckgo.com/?hps=1&q=bare+bones+arduino&iax=images&ia=images

« Last Edit: January 25, 2024, 01:40:13 pm by Doctorandus_P »
 
The following users thanked this post: audiotubes

Offline audiotubesTopic starter

  • Regular Contributor
  • *
  • Posts: 176
  • Country: cz
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #45 on: January 25, 2024, 02:43:49 pm »
Thank you! Great post, and I appreciate all the interesting and helpful info :)
I have taken apart more gear than many people. But I have put less gear back together than most people. So there is still room for improvement.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1545
  • Country: au
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #46 on: January 25, 2024, 07:24:40 pm »
I don't like C for many reasons and I also don't agree this or that language is more productive. I'm more interested in quality than C can provide, and looking at MCUs for me is as much about another platform to write assembly language on as it is about a fun project or two where I can get more up to date with what else has changed in the decades I wasn't doing anything with electronics.
For the 8051 with Assembler, grab these older PDF

8051 Microcontroller Instruction Set  - this gives full opcode details, including which flags are affected.
https://ww1.microchip.com/downloads/en/DeviceDoc/doc0509.pdf

and this is similar, but different focus
https://ww1.microchip.com/downloads/en/DeviceDoc/doc4316.pdf

Of course the opcode timings have changed, with the 1T 8051 parts, and even among those, speeds vary.
The cutting edge parts (eg STC) now have 32bit fetch, so even 3 byte opcodes can execute in 1 sysclk.

The new wide supply MCU's have on chip regulators, so those typically show two decoupling caps, 100nF and 10-20uF, similar to any LDO.
The reset RC components often shown on legacy drawings, are no longer really needed, tho often a button on RST is useful to have :)  ( plus maybe a boot button, for those with loaders)

Crystals/resonators are also no longer mandatory. The calibrated on-chip oscillators are usually good enough to get going.

You can get sets of breakout boards from Aliexpress very cheap - SO16 and TSSOP20 if you find interesting new parts without DIP's.

« Last Edit: January 25, 2024, 08:42:12 pm by PCB.Wiz »
 
The following users thanked this post: audiotubes

Offline audiotubesTopic starter

  • Regular Contributor
  • *
  • Posts: 176
  • Country: cz
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #47 on: January 25, 2024, 09:16:28 pm »
Thanks a lot. I have been collecting various 8051 doc but I don't think I saw these yet.
I have taken apart more gear than many people. But I have put less gear back together than most people. So there is still room for improvement.
 

Offline Davor

  • Contributor
  • Posts: 13
  • Country: hr
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #48 on: January 27, 2024, 06:59:39 pm »
Books with 8051 assembler examples may also be useful:
The 8051 Microcontroller and Embedded Systems - Mazidi
The 8051 Microcontroller - Ayala

Old and free IDE and simulator for practicing with "virtual MCU" (8MB download):
https://sourceforge.net/projects/mcu8051ide/files/mcu8051ide/1.4.9/

Good resource for STC parts mentioned in this thread:
https://codeberg.org/20-100/Awesome_STC
 
The following users thanked this post: audiotubes

Offline c64

  • Frequent Contributor
  • **
  • Posts: 298
  • Country: au
Re: Can anybody recommend a socketed 8051 dev board?
« Reply #49 on: January 28, 2024, 10:14:48 pm »
Another option for you is to find any microcontroller in LCSC, find opensource development board for it, and have it made and assembled by JLC. Assuming JLC can deliver to your country.

P.S. 8051 architecture sucks.
 
The following users thanked this post: audiotubes


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf