A microcontroller is a sequential device that can be considered as a small and low-cost microcomputer, which is designed to perform the specific tasks of embedded systems like displaying microwave’s information, receiving remote signals, etc.
The general microcontroller consists of the processor, the memory (RAM, ROM, EEPROM), Serial ports, peripherals (timers, counters), etc.
Features of a microcontroller:
Has onchip peripherals like timers, interrupts, ADCs, Comparator, PWM ports,etc.
Architecture varies greatly with respect to purpose from general to specific, and with respect to inside architecture, ROM, RAM or I/O functions.Example like Havard, Von Neumann, RISC,CISC, etc.
Has onchip communication protocols like USART, SPI, I2C, CAN, USB,etc.
Has onchip flash, SRAM, EEPROM.
Can perform various complex calculations, execution speed and accuracy depending on the architecture it uses.
Usually embedded in other equipment and are used to control features or actions of the equipment.It's like a standalone brain of a system.
Common microcontroller architectures are as follows:
Difference between 8051 and AVR MCUs
No on chip ADC
On chip ADC
Port0 needs external pullups
All ports have internal configurable pullups
No I2C, SPI
Has I2C, SPI
No lock bits, internal watchdog,fuse bit setting,JTAG
All these are present
No interal EEPROM
Has internal EEPROM
Has no dedicated PWM pins
Has dedicated PWM pins
It's better to switch to AVR studio for better understanding of microcontroller architectures and hardware understanding.There you can write actual embedded C code which will enable you to get more flexibility in using microcontroller's internal hardwares and peripherals. Furthurmore, assembly language, which is the base language of any microcontroller/processor should be learnt too. AVR studio also enables us to write assembly language.
Do you know?
After acquisition of ATMEL by Microchip, Microchip developed MPLAB along with XC8 compiler which enables us to write C codes for both AVR as well as PIC MCUs.
A full playlist of PIC,AVR and 8051 microcontroller theories and practicals.