Replacing AT89S52 with something handling larger code size

Thread Starter

mike_canada

Joined Feb 21, 2020
56
Until now, I've been using Microchip's AT89LP52 and AT89S52 40-pin DIP IC's as my main microcontrollers (that I plug into DIP sockets). While they have been excellent for my needs in the past, they now lack one thing: Storage. They can only handle 8KB, but now I need something at least 10-12KB that can be programmed in a simple way via ISP. In my case, I use the serial mode. (making connections to MISO, MOSI, SCK and RST). In that setup, I have a 22.1184Mhz crystal attached with 33pF caps connected between each crystal pin and ground.

So now I tried AT89S8253. Its now a pain because in the programming stage I had to issue the erase command TWICE in order to make the erase function work, and the microchip support team couldn't figure this out. Then when I executed the code in compatibility mode (I did not enable X2), the result was incorrect.

Then I go order AT89LP51ED2. Due to datasheet and microchip support requirements, I changed my crystal to 11.0592Mhz and the caps to 15pF each. I can program this chip and verify the data fine but the code won't execute AT ALL despite me setting it up also in compatibility mode!

I contacted microchip support with my issues and they could not help me.

Is there an 8052-like chip in 40-DIP format that's easy to program and that can execute code correctly without the need of odd voltages and that has larger storage capacity than 8KB that can handle?

I have a parallel port on my PC and I am willing to make a mini programmer circuit and buy a new micro with bigger storage as long as its easy enough to program without the need of strange voltages. I currently have access to 5VDC and 12VDC. I also do not want to buy a commercial programmer since I already wasted $50 on now useless chips.
 

MrChips

Joined Oct 2, 2009
26,099
Don't get hung up on one particular MCU.
There are thousands to choose from. It would be beneficial for present and future needs to widen your options to include other manufacturers and MCU families.
 

Papabravo

Joined Feb 24, 2006
18,422
I believe that your problems are solvable, but it may take some work and sleuthing through the datasheets, errata, programming procedures, and so forth. How much time and energy do you have available to search for a solution. Digging deeper into the chips which are already a sunk cost might be the easiest thing to do.

My first observation is that you are throwing too many constraints on the potential solutions. Your primary purpose is to expand the code space and preserve your existing investment in your firmware base and their development tools. Is that correct?

Maybe @cmartinez will have a helpful suggestion since he has a good deal of 8051 experience
 
Last edited:

Papabravo

Joined Feb 24, 2006
18,422
Don't get hung up on one particular MCU.
There are thousands to choose from. It would be beneficial for present and future needs to widen your options to include other manufacturers and MCU families.
He may or may not be able to easily port his firmware base.
 

MrChips

Joined Oct 2, 2009
26,099
When is the best time to stop using old code? Answer: 20 years ago.
When is the second best time to stop using old code? Answer: Now.
 

Papabravo

Joined Feb 24, 2006
18,422
I looked up the datasheets and availability for those parts. What I see makes me want to shout:
DANGER Will Robinson DANDER - DANGER!

The datasheet for the AT89S8253 was last revised in 2010 -- 12 years ago. This product has to be "Not Recommended" for new designs and is probably close to EOL. Digikey has 1567 pieces left with all other varieties at 0

The datasheet for the AT89LP51ED2 was las revised in 2013 -- 9 years ago. This product also has to be in the "Not Recommended" for new designs and is probably close to EOL as well. Digikey has 22 pieces left with zero for the other varieties.

I would abandon all hope of finding what you want and can use in a 40 pin DIP.
I'm not sure where you go from here. A surface mount alternative will at least let you preserve your firmware base.
 

GetDeviceInfo

Joined Jun 7, 2009
2,095
Isn’t the whole at89 series based on an 8051 core. I had used at89C5131 for many projects back in the day. One day I asked myself, why not an AVR. Those at89s are in a box somewhere.
 

Papabravo

Joined Feb 24, 2006
18,422
Any ASM code can be ported to C.
We're not quite sure what we are dealing with. Considering the lengths, the TS has already gone to solve his problem he may not be amenable to alternate suggestions. Painful as that might be I'm coming around to the conclusion that he may have no choice.
 

Papabravo

Joined Feb 24, 2006
18,422
Isn’t the whole at89 series based on an 8051 core. I had used at89C5131 for many projects back in the day. One day I asked myself, why not an AVR. Those at89s are in a box somewhere.
Yes, they are, but Atmel was fond of offering upgrades on all their models before being acquired by Microchip. I'd be willing to guess that Microchip wants to retire these legacy products as fast as the corporate bean counters can force them to. I'm guessing it is one of those changes that is frustrating the TS, because it takes time to pour over a datasheet and read the errata. I used to make quite a good living doing this kind of forensic rescue, but fortunately I'm retired for the last 8 years.
 

GetDeviceInfo

Joined Jun 7, 2009
2,095
Yes, they are, but Atmel was fond of offering upgrades on all their models before being acquired by Microchip. I'd be willing to guess that Microchip wants to retire these legacy products as fast as the corporate bean counters can force them to. I'm guessing it is one of those changes that is frustrating the TS, because it takes time to pour over a datasheet and read the errata. I used to make quite a good living doing this kind of forensic rescue, but fortunately I'm retired for the last 8 years.
I never looked back at them assuming they would die shortly after the acquisition.
 

Papabravo

Joined Feb 24, 2006
18,422
I never looked back at them assuming they would die shortly after the acquisition.
Just like the "Man in Black", they're not all dead, they're just mostly dead.


Some indicators
  1. The top hit for datasheets is "alldatasheet.com"
  2. Digikey has limited stock and probably won't be ordering more
  3. Oldest datasheet for the 4 parts mentioned is from 2008
  4. Newest is from 2013
This looks like a Quixotic quest.
 

Thread Starter

mike_canada

Joined Feb 21, 2020
56
Well in that case I may have to waste more money to build yet ANOTHER programmer whilst figuring stuff out just to get more code space. My code is in hardcore assembly. Seems that alot of newer tech these days fail more often than older tech. The reason I need more code space is because while my project is near completion and involves communication to the PC via serial port, I want the messages passed to the PC to be more friendly so a user can debug the system easier, and those messages, depending on how helpful they are can take up alot of code space. Heck. this thread alone probably uses 64KB code space if stored on a chip.
 

Thread Starter

mike_canada

Joined Feb 21, 2020
56
I understand that the LP series of IC's have the EA pin replaced with the POL pin but according to the datasheet it can function the same way as EA since I'm using RST as active high.
 

Thread Starter

mike_canada

Joined Feb 21, 2020
56
Ontario. I have made a few programmers but for serial only and I also made a special programmer for the AT89C2051. Programming in parallel mode involves setting the correct bits for address and data
 

Papabravo

Joined Feb 24, 2006
18,422
I understand that the LP series of IC's have the EA pin replaced with the POL pin but according to the datasheet it can function the same way as EA since I'm using RST as active high.
On the AT89S8253 you have pin 5 P1.4(SS*) a new function for this pin when using the SPI interface
On the AT89LP52ED2 you have pins 2 thru 8, 18 & 19, and 23 thru 27 that have aditional function multiplexed on them. That's quite a few defaults and configurations to run down.
 

MrChips

Joined Oct 2, 2009
26,099
Let's get down to basics. What are your MCU requirements?

  1. Number of I/O pins
  2. Clock Speed
  3. RAM space
  4. Flash Memory space
  5. Voltage and power requirements
  6. Any device modules required
  7. Any special requirements

I have extensive experience working with the following:

  1. Atmel
  2. Microchip
  3. Motorola/Freescale/NXP
  4. Texas Instruments
  5. ST Microelectronics

I don't get attached to any single MCU or manufacturer. I select the best MCU to get the job done.
I can assist you in migrating to just about any MCU if you are willing to give up the past and move into the future.
 
Top