This page describes microcontroller programming, microcontroller C programming,devices,cross compiler etc.
This tutorial on microcontroller covers following:
• Microcontroller tutorial
• What is microcontroller
• 8051 Microcontroller Architecture
• Microcontroller hardware Interfacing
• Microcontroller Timers
• Microcontroller Interrupts
• Microcontroller Serial Communication
• Microcontroller Cross Compiler
• Microcontroller programming
• TI Microcontroller
• ATMEL Microcontroller
• ARM Microcontroller
• Microcontroller Kit Vendors
• Microcontroller versus Microprocessor
There are various ways one can do microcontroller programming, popularly C and assembly language is used. After the program is written for specific tasks either in C or assembly language, the same need to be converted to hexadecimal file will be burnt on microcontroller's internal ROM if the program is small or on external program memory if the program is large.
Microcontroller programmer, flash programmer or EPROM programmer are used for programming the device. Various such kits are available from the microcontroller device manufacturers themselves.
C Language Microcontroller programming Example
Following Microcontroller hardware circuit show interfacing of LED with port 1/pin no. 1. We will write C program to switch ON and OFF LED at some regular interval using delay routine.
As shown in the program above delay_1ms function introduces delay of about 1 ms which can be called in for loop to generate delay of your choice. hence delay_ms passed with argument 10 introduces 10ms of delay. P1^1=1 switches OFF LED and P1^1=0 switches ON LED. This instructions are put in while loop hence will continuously run till microcontroller circuit is powered ON. The example program also explains how to configure serial port to be used for interfacing external device to be used for serial communication at some baud rate.
Refer our Page on what a microcontroller does.
Refer our Page on microcontroller versus microprocessor which explains similarities and differences between both.
Refer our Page on microcontroller development kit manufacturers.
RS232 interface RS485 interface RS422 interface CAN interface SPI interface interface types and converters DigRF interface