Skip to main content

Optimization techniques

To optimize the memory size of program(for microcontrollers)

    1. If you are working with 8 bit of data or no. between 0 to 255 then use char datatype.

    Example:
    int j = 0;
    for ( j =  0; j<=100 ; j++);

    Here instead of int use char. It will help u in optimizing program by a bunch of byte.



    2. Use just if rather than if-else or switch or array. It saves a lot of space.

    3. Design your own algorithm for any data (in which there are options to be selected) which can be obtainded by just subtracting or adding a no. or combination rather than using switch or if-else statements.

   4. Always try to design a nice logic, because you have brain.


more to come... till then enjoy programming..

Comments

Popular posts from this blog

Website is being updated with new UI!

Hi E veryone , Pardon me. It took me very long to get back on managing this website. You all during some part of a time in your life, you get so busy that you forget what you actually need to do to keep up. I am moving whole code database on Github so you all will never face any problem with finding codes. Feel free to follow me on Github for updates. My Github: https://github.com/prasadp4009   Stay tuned for updates. Thank you all.

Blu ShopMart

A Bluetooth and RFID based Shopping trolly concept designed for today's world. If any company wants to have this product, contact me on: prasadp4009@gmail.com

Home Automation using Android, Bluetooth, AVR.. I call it Jarvis Switch

Just completed the circuit for Wireless AC device interface to be controlled via bluetooth. Software part is yet to be ready. Will post the Video Soon.. Started feeling like Tony Stark..(a bit though..) Video is Online..!!.