Any Free IDE for AT89C51? - Page 1
Forum section: electronics / general

author: igendel
author_rank: Frequent Contributor
timestamp: June 02, 2021, 08:58:04 am
content: Hi all,I received several old boards with Atmel AT89C51RE2 MCUs. These days no piece of silicon can go to waste, so I was wondering if there's any free IDE out there that can still compile for those models. I found out Keil supports them, but the code size limit on the free version is too tight, and with all due respect I don't want to spend a lot of money on this, or spend a lot of time trying to set up a complete toolchain myself.Any suggestions, ideas? I doesn't have to be a modern IDE with bells and whistles, just something that works.Thanks,

author: retiredfeline
author_rank: Frequent Contributor
timestamp: June 02, 2021, 09:28:09 am
content: You could use SDCC with an editor like codeblocks. Not as integrated as Keil but it will do the job.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 03, 2021, 12:06:11 am
content: Quote from: igendel on June 02, 2021, 08:58:04 amA quick check on old links I have, shows these are still activehttps://turbo51.com/8051-editor-idehttps://www.rathlev-home.de/mc/mctools-e.htmlthe last one includes the Turbo51 Pascal and sdcc supports, and mentions 2021 releasesIt has a basic simulator included, and a basic terminal tho that limits COM ports to COM1..COM8, and also has only generic (ancient-fixed) BAUD rates.Looks like the IDE has a loader, but for custom hardware that uses Serial port as SPI, (https://www.rathlev-home.de/mc/hardware/at89s8252-ds.pdf) so that will be slow.FWIR, the AT89C51RE2 MCUs have a ROM loader, that you access via pull-down on PSEN of 1k at reset, so you could find the Atmel loader SW for that to get the code into your parts ?Looks like this is what you need, for ROM UART loading of AT89C51RE2 :https://ww1.microchip.com/downloads/en/DeviceDoc/FLIP_3_4_5_Release_Notes.txtIf those AT89C51RE2 are in sockets, you can also drop in AT89LP51rx2 parts, for faster operation.

author: ebclr
author_rank: Super Contributor
timestamp: June 03, 2021, 05:47:01 am
content: https://www.silabs.com/developers/8-bit-8051-microcontroller-software-studio

author: igendel
author_rank: Frequent Contributor
timestamp: June 03, 2021, 12:51:45 pm
content: Quote from: PCB.Wiz on June 03, 2021, 12:06:11 amMy teenage-years programming was all Turbo Pascal, it'll probably come back to me quickly if neededQuote from: PCB.Wiz on June 03, 2021, 12:06:11 amYes, after asking for an IDE earlier, I realized these chips have UART bootloader ROM. I tried installing this "flip" but it was a flop, the versionwithoutJava Runtime said it needed Java Runtime, and the versionwithit simply wouldn't start (on a perfectly good Win10 PC). So I need to figure out the pinout of the programming connector on the boards I got, and find a programming software that works.Quote from: PCB.Wiz on June 03, 2021, 12:06:11 amSoldered, unfortunately, and I don't have any other AT89 of any kind.Quote from: ebclr on June 03, 2021, 05:47:01 amI used "Simplicity Studio" for fooling around with EFM8. Will the generated code be generic enough for any 8051? How difficult will it be to tell it how much Flash/SRAM/XRAM the target has?

author: ebclr
author_rank: Super Contributor
timestamp: June 03, 2021, 05:38:46 pm
content: Do you really need to use AT89LP51, Maybe it's a good option to put this reliquie on the trash CanWhy not CH552 CH 554It's extremely cheap, has a USB very easy to programhttps://www.electrodragon.com/product/ch552-ch554-mini-dev-board-ch55x-series/

author: igendel
author_rank: Frequent Contributor
timestamp: June 03, 2021, 07:01:12 pm
content: Quote from: ebclr on June 03, 2021, 05:38:46 pmThank heavens, noBut I received over ten boards that have them, and they looked like they might be fun to play with.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 03, 2021, 08:46:45 pm
content: QuoteI found FLIP 3.4.7 on a backup drive, and that launches ok, on Win10, and connects to COM57 ok, and gives timeout messages as there is no connected MCU.I selected ISPHW controlled by FLIP (RTS connects to PSEN via 1k, DTR to RESET ), then manual sync on connect, so it does not timeout immediately.I see ~130ms pulses on RTS and ~30ms pulses on DTR on connect, so that looks as I'd expect.I also find this has a 2020 release,https://sourceforge.net/projects/mcu8051ide/files/mcu8051ide/1.4.9/so I should refresh my old copy and try that too..addit: If your FLIP refuses to run, I see there is also this website alive againhttp://turbo51studio.orgfree.com/downloads/tsim51-latest-setup.zipThat has an ISP bootloader included.

author: igendel
author_rank: Frequent Contributor
timestamp: June 05, 2021, 12:01:43 am
content: Quote from: PCB.Wiz on June 03, 2021, 08:46:45 pmAfter a few uninstall-reinstall cycles, I somehow got FLIP to run, and output the same signals as you described from a USB-to-UART adapter.I pulled one MCU out from its original board and put it on a breakout pcb, together with the original crystal and its capacitors. The scope shows clean, stable waveform (22.1MHz) on the crystal, so I guess I got that and the power rail pins right... but FLIP times out when trying to connect either manually or automatically, no matter what baudrate I select.I tried the "OCD TX/RX" pins because there's one connector on the original board that has them, plus RST, PSEN, GND, and VCC; It makes sense that it was the connector used for programming. Tomorrow (local time) I'll try to connect to an original board, see if it responds.Update:No luck with the original board, I can see the hardware being reset when I click "connect" in FLIP, but the software still reports Timeout, no matter what options I try. I'll have to dig for more backstory on those boards...

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 05, 2021, 08:48:07 pm
content: Quote from: igendel on June 05, 2021, 12:01:43 amDid you connect both the PSEN and RST lines ? RST on those older parts is positive going.RST ______/=====\____________________PSEN.1k ===\______________________/====Or, you could just jumper PSEN to GND with 1k, for first tests, and that will go into boot and stay there until reset with jumper removed.

author: igendel
author_rank: Frequent Contributor
timestamp: June 06, 2021, 10:55:14 am
content: Quote from: PCB.Wiz on June 05, 2021, 08:48:07 pmBoth lines are connected, but apparently my USB-to-UART module DTR output is active-low, no matter what I request in FLIPI see this will take some time...

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 06, 2021, 09:17:06 pm
content: Quote from: igendel on June 06, 2021, 10:55:14 amresponds ok here. Attached is the direct-ttl-connect form, with active lows on both - ie PSEN is pulled low via 1k while reset deactivates, and on reset exit, the device sees PSEN = L and enters boot mode.Not sure I agree with their terminology 'active low', but that may be UART DTR relative not RESET PIN relative... - I think the scope form is what the chip needs.

author: igendel
author_rank: Frequent Contributor
timestamp: June 06, 2021, 10:15:16 pm
content: Quote from: PCB.Wiz on June 06, 2021, 09:17:06 pmSorry I can't make my experiments faster, timezone differences and all thatbut I really appreciate your help, updates will arrive... eventually.

author: igendel
author_rank: Frequent Contributor
timestamp: March 09, 2022, 06:08:18 pm
content: Just to put a gloom closure to this thread, in case anyone digs it up and wonders what happened: After looking carefully at all the options, incompatibilities, limitations etc., I decided that this takes too much of my time and effort, so even if it works eventually it's not worth it. I'll hold on to the MCUs in case something else comes up in the future. Thanks for trying to help.