An introduction to the physics of semiconductor devices