How are dopants chosen for producing semiconductor devices? I've heard that boron and phosphorus are some common dopant elements, but you'd want different ones for different semiconductors, right? They need to be compatible with the crystal structure. Could you dope a compound semiconductor by altering the ratio of its component elements?
Is there any advantage to using different dopants, in different devices or within the same device? What if, for example, you made a silicon BJT where the collector was doped with nitrogen, the base doped with boron, and the emitter doped with phosphorus? Would that have significantly different properties to a device using phosphorus on both the emitter and collector?