Arduino Support for AT89S52

Can I have support of Arduino IDE for AT89S52? Like other ATmega's (32,16) has Arduino IDE support, is there nothing for AT89S52? I have 5 of them lying in my drawer :stuck_out_tongue:

Superfluous threads removed.

Can I have support of Arduino IDE for AT89S52?

No. It's an entirely different processor architecture that (among other problems) doesn't have a free C++ compiler.

westfw:
No. It's an entirely different processor architecture that (among other problems) doesn't have a free C++ compiler.

So it is not possible? and what are the other problems you mentioned?

I suppose that you could make a set of Arduino-like functions for it, but I don't know of anyone who has done so.

what are the other problems you mentioned?

In addition to no C++, the 8051 architecture doesn't support C very well, either. It's just sort of a "previous generation or two" chip.
The 89S52 specifically does not support a bootloader, and has rather limited memory by modern arduino standards (8k flash, 256bytes RAM; less overall memory than the original ATmega8 Arduino.)
No Analog input. (analogRead())
No PWM output. (analogWrite())
limited GPIO (Open collector outputs only. Some with internal pullups.)
Slow. While it will run at 32MHz (twice the clock rate of the AVR), each instruction takes at least 12 clock cycles, and many take 24. So it's equivalent to about a 2MHz AVR (compared to the usual 16MHz Uno.)

westfw:
I suppose that you could make a set of Arduino-like functions for it, but I don't know of anyone who has done so.
In addition to no C++, the 8051 architecture doesn't support C very well, either. It's just sort of a "previous generation or two" chip.
The 89S52 specifically does not support a bootloader, and has rather limited memory by modern arduino standards (8k flash, 256bytes RAM; less overall memory than the original ATmega8 Arduino.)
No Analog input. (analogRead())
No PWM output. (analogWrite())
limited GPIO (Open collector outputs only. Some with internal pullups.)
Slow. While it will run at 32MHz (twice the clock rate of the AVR), each instruction takes at least 12 clock cycles, and many take 24. So it's equivalent to about a 2MHz AVR (compared to the usual 16MHz Uno.)

So there is no internal ADC converter!!! No pulse width modulation! Then what the hell this 40 pin IC's used for -_-

4x8bit port = 32 pins; VCC, GND, XTAL, RST....
See the datasheet for details.
8)

Then what the hell this 40 pin IC's used for

The 8051/8052 was something like the 2nd microcontroller created, and dates back to 1980. The originals had mask-programmed ROM memory to hold the program, or used an external memory setup EPROM (UV-eraseable!) Eventually there were EPROM versions of the 8051 itself (selling for about $40 apiece (1980s dollars), just for the chip. Early "home automation" setups might have used a ~$250 system with an 8051, and external RAM chip, and an external EPROM (for which you'd need an EPROM programmer), and Intel BASIC-52 in the ROM. It gave you a system that could do things similar to the way an arduino is used, for much less than the several thousand $$ that personal computers cost in those days. The chips were widely used in all sorts of products - one example is that the keyboard and keyboard controller for the original IBM PC used this 'class' of chip.
The Atmel 89S52 is a somewhat modernized version of the 8052. It has flash memory and is programmable via a serial port, and it's modern CMOS logic - lower power and higher speed than the original chips. But it's very much a "legacy replacement" sort of thing. The 8051 architecture was licensed by Intel to various places, and then fell out of various IP protections, so you see a LOT of chips, even now, with that CPU, modernized, with added peripherals and more memory, sped up to 1 or two clocks per instruction instead of 12, special function units, etc. For example: https://www.silabs.com/products/mcu/8-bit/c8051f32x-f34x A lot of the "mp3 player" or "voice replay" chips will have an 8051 core.
But ... very much an architecture from the days that most serious programmers used assembly language.

So there is no internal ADC converter!!! No pulse width modulation! Then what the hell this 40 pin IC's used for -_-

For someone who wants to learn the very fundamentals of Microcontroller, he still leans to 89S52. The 89S52 chip is still popular to build low cost and secured embedded systems. It has the following built-in resources:

1. 8-Bit Processor along with 8-bit accumulator
2. 1-Bit Processor (the Boolean Processor) along with 1-bit accumulator.
3. Special Function Register
4. General Purpose Register Banks
5. Code Memory (flash) with Lock bits
6. EEPROM Data Memory (89S8252) with Lock Bits
7. Byte and Bit addressable RAM
8. Stack Space (part of RAM)
9. Parallel Ports
10. Serial Port
11. SPI Port
12. Counter
13. Timer
14. Interrupt Controller
15. In-system Programming Interface
16. Bus Interface Unit to access external code and data memory


Figure-1: Block Diagram showing the internal resources of 89S52 MCU


Figure-2: Functional level view for internal resources of 89S52/89S8252 MCU


Figure-3: Internal RAM and SFR Map of a typical 89S52 based Sytem



Figure-4: Port mode operational diagram of 89S52/89S8252


Figure-5: Mixed port operational diagram of 89S52/89S8252 MCU


Figure-6: Buse mode operation of 89S52 MCU


Figure-7: 89S52 based single chip Taxi Meter


Figure-8: 89S52 based Real Time Clock System


Fugure-9: 89S52 MCU and HSM-20G Based Temperature-Humidity Meter

The Chip is supported by:
MIDE-51 (free Assembler and Small Device C Compiler)

Mr. Golam Mostofa will you give me some tutorials to learn Basic programming of AT89S52?

Please click here for the Tutorial/Experiment Sheets on Basic Programming on AT89S52 CISC Microcontroller.

Can i upload code to AT89S52 using usb to serial converter? (RS232/CH340)