This paper discusses the programming aspects of a BLDc controller for a E-Bike. It addresses issues like Soft Start, Current limiting action at higher Loads and Battery Voltage dependent speed which are generally implemented for a E-Bike application. Generally such motors are Sensor based and have a PI based tarpezoidal speed control. The mechanism to measure speed from Hall signals and regulation is also discussed.