With the application of a stimulus, a portion of the membrane becomes permeable to the depolarizing ions, sodium and calcium. The charge distribution about this section of membrane changes as the intracellular compartment becomes positive with respect to extracellular compartment. This change in electrical charge generates the upstroke (phases 0 and 1) of the action potential.