Microcanonical ensemble only deals with isolated systems, but a canonical ensemble deals will closed (energy exchange can happen).
A canonical ensemble is a collection of replicas of a system all having fixed number of particles (N), volume (V), and temperature (T).
Microcanonical ensemble has constant NVE. Grand canonical ensemble μVT, where μ is the chemical potential of the particle.

Ωi(E)=ΩR(EEi)Ω(E)=iΩi(E)=iΩi(EEi)

Boltzmann definition of entropy:

SR=kBlnΩR(EEi)kBlnΩR(E)E(kBlnΩR(E))Ei

where in the last step I used Taylor expansion. We know that 1T=SE

=kBlnΩR(E)EiT

Hence,

ΩR(EEi)=ΩR(E)eEi/kBT

Total number of microstates is the sum over i:

Ω(E)=ΩR(E)ieEi/kBTpieEi/kBT$$$$pi=eEi/kBTjeEj/kBT=eEi/kBTZ$$where$Z$iscalledthepartitionfunction:$Z=jeEj/kBT$