Author Topic: Any Free IDE for AT89C51?  (Read 925 times)

0 Members and 1 Guest are viewing this topic.

Offline igendel

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: il
    • It's Every Bit For Itself (Programming & MCU blog)
Any Free IDE for AT89C51?
« on: June 02, 2021, 08:58:04 am »
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,

Maker projects, tutorials etc. on my Youtube channel: https://www.youtube.com/user/idogendel/
 

Offline retiredfeline

  • Regular Contributor
  • *
  • Posts: 208
  • Country: au
Re: Any Free IDE for AT89C51?
« Reply #1 on: June 02, 2021, 09:28:09 am »
You could use SDCC with an editor like codeblocks. Not as integrated as Keil but it will do the job.
 
The following users thanked this post: igendel

Offline PCB.Wiz

  • Frequent Contributor
  • **
  • Posts: 462
  • Country: au
Re: Any Free IDE for AT89C51?
« Reply #2 on: June 03, 2021, 12:06:11 am »
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.

A quick check on old links I have, shows these are still active
https://turbo51.com/8051-editor-ide

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

the last one includes the Turbo51 Pascal and sdcc supports, and mentions 2021 releases :)
It 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.txt

If those AT89C51RE2 are in sockets, you can also drop in AT89LP51rx2 parts, for  faster operation.



 
The following users thanked this post: igendel, DC1MC

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2256
  • Country: 00
 

Offline igendel

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: il
    • It's Every Bit For Itself (Programming & MCU blog)
Re: Any Free IDE for AT89C51?
« Reply #4 on: June 03, 2021, 12:51:45 pm »
the last one includes the Turbo51 Pascal and sdcc supports, and mentions 2021 releases :)

My teenage-years programming was all Turbo Pascal, it'll probably come back to me quickly if needed :)

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.txt

Yes, 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 version without Java Runtime said it needed Java Runtime, and the version with it 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.

If those AT89C51RE2 are in sockets, you can also drop in AT89LP51rx2 parts, for  faster operation.

Soldered, unfortunately, and I don't have any other AT89 of any kind.

https://www.silabs.com/developers/8-bit-8051-microcontroller-software-studio

I 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?
Maker projects, tutorials etc. on my Youtube channel: https://www.youtube.com/user/idogendel/
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2256
  • Country: 00
Re: Any Free IDE for AT89C51?
« Reply #5 on: June 03, 2021, 05:38:46 pm »
Do you really need to use AT89LP51, Maybe it's a good option to  put this reliquie on the trash Can

Why not CH552 CH 554

It's extremely cheap, has a USB very easy to program

https://www.electrodragon.com/product/ch552-ch554-mini-dev-board-ch55x-series/

 

Offline igendel

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: il
    • It's Every Bit For Itself (Programming & MCU blog)
Re: Any Free IDE for AT89C51?
« Reply #6 on: June 03, 2021, 07:01:12 pm »
Do you really need to use [...]

Thank heavens, no  :D
But I received over ten boards that have them, and they looked like they might be fun to play with.
Maker projects, tutorials etc. on my Youtube channel: https://www.youtube.com/user/idogendel/
 

Offline PCB.Wiz

  • Frequent Contributor
  • **
  • Posts: 462
  • Country: au
Re: Any Free IDE for AT89C51?
« Reply #7 on: June 03, 2021, 08:46:45 pm »
Quote
Yes, 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 version without Java Runtime said it needed Java Runtime, and the version with it 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.

I 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 again
http://turbo51studio.orgfree.com/downloads/tsim51-latest-setup.zip
That has an ISP bootloader included.

« Last Edit: June 04, 2021, 10:49:00 pm by PCB.Wiz »
 
The following users thanked this post: igendel

Offline igendel

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: il
    • It's Every Bit For Itself (Programming & MCU blog)
Re: Any Free IDE for AT89C51?
« Reply #8 on: June 05, 2021, 12:01:43 am »
I 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.

After 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...
« Last Edit: June 05, 2021, 06:05:43 pm by igendel »
Maker projects, tutorials etc. on my Youtube channel: https://www.youtube.com/user/idogendel/
 

Offline PCB.Wiz

  • Frequent Contributor
  • **
  • Posts: 462
  • Country: au
Re: Any Free IDE for AT89C51?
« Reply #9 on: June 05, 2021, 08:48:07 pm »
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...
Did 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.
 

Offline igendel

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: il
    • It's Every Bit For Itself (Programming & MCU blog)
Re: Any Free IDE for AT89C51?
« Reply #10 on: June 06, 2021, 10:55:14 am »
RST    ______/=====\____________________
PSEN.1k  ===\______________________/====


Both lines are connected, but apparently my USB-to-UART module DTR output is active-low, no matter what I request in FLIP  :palm:
I see this will take some time...
Maker projects, tutorials etc. on my Youtube channel: https://www.youtube.com/user/idogendel/
 

Offline PCB.Wiz

  • Frequent Contributor
  • **
  • Posts: 462
  • Country: au
Re: Any Free IDE for AT89C51?
« Reply #11 on: June 06, 2021, 09:17:06 pm »
RST    ______/=====\____________________
PSEN.1k  ===\______________________/====


Both lines are connected, but apparently my USB-to-UART module DTR output is active-low, no matter what I request in FLIP  :palm:
I see this will take some time...

responds 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.
« Last Edit: June 06, 2021, 09:19:13 pm by PCB.Wiz »
 
The following users thanked this post: igendel

Offline igendel

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: il
    • It's Every Bit For Itself (Programming & MCU blog)
Re: Any Free IDE for AT89C51?
« Reply #12 on: June 06, 2021, 10:15:16 pm »
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.

Sorry I can't make my experiments faster, timezone differences and all that :) but I really appreciate your help, updates will arrive... eventually.
Maker projects, tutorials etc. on my Youtube channel: https://www.youtube.com/user/idogendel/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf