I have read the basics of how a digital camera works. As much as I have understood, the digital cameras have a device called a CCD on which photons coming from the lens are incident. The CCD then creates photoelectricity by gaining energy from the photons.
But then the cameras should not work at night (or other bad lighting conditions) since the photoelectric effect can only be seen for photons having higher than threshold energy. The only way I can think it works is that the CCD has a very low threshold. But that itself would require heavy quantizers for good lighting conditions (too much input) and would also be ultra sensitive to heat. I really think I am missing some key thing here. So how do digital cameras work?