Before jumping towards microcontrollers, there are a few things that should be kept in mind while developing something with it. So I will list a few things before posting any tutorials here. Remember the features of ATmega8 ? Microcontrollers don’t have so much processing power like your PC. So you have to be a little more cautious.
- Be patient.
- Keep your code clean and well structured. Don’t mess up with variable names, function names and macros. Follow a standard to name anything.
- Avoid using memory allocation functions like malloc , calloc. Use fixed width arrays.
- Do not create unnecessary functions. Avoid creating functions for small number of instructions.
- Avoid using floating point calculations unless your microcontroller has hardware support for it.
- DO NOT FORGET TO READ THE DATASHEET FIRST.
- If you are using EEPROM, try to use it as a circular buffer.
- Consider power consumption.
- DO NOT FORGET TO CHECK THE CONFIGURATIONS OF YOUR MICROCONTROLLER.
- Avoid using string related functions.
- Check for alternatives, some of them may render better solution to your problem.
These are just some notes to remembered while you are actually developing something. It is not complete. Feel free to suggest some more.