X-ray fluorescence (XRF) allows imaging of the chemical composition of a specimen. We developed a 2nd generation prototype laboratory system that can produce 3D chemical maps using microXRF as well as volumetric microCT images. The latter can be used to overlay morphological information on top of the XRF image for co-registration. It is also employed for attenuation correction during the tomographic reconstruction of the XRF images. The new system has various hardware and software changes to improve the performance, stability and flexibility. A deep depleted CCD was employed to improve the detection efficiency for high-energy fluorescence X rays. The use of a deep depleted CCD requires signal-clustering techniques to correct for charge diffusion in the CCD to obtain the correct energy of the fluorescence x rays. Furthermore, energy drift correction techniques were put in place to ensure stability of energy measurement during very long scan times. To minimize the contribution of the long CCD readout times to the total scan time, the exposure frames are dynamically adjust during the scan to the maximum time allowed for operation under photon counting mode. The XRF component has a spatial resolution of 70 μm and an energy resolution of 180 eV at 6.4 keV.© (2010) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.