The muon lifetime experiment
PART V: Four different versions of the experiment

Microcontroller version

TAC and MCA replaced by a single TDC implemented with LPC1769 microcontroller from NXP, formerly known as Philips Semiconductors (Datasheet).

General description
The LPC1769 is an ARM Cortex-M3 based microcontrollers for embedded applications featuring a high level of integration and low power consumption. The ARM Cortex-M3 is a next generation core that offers system enhancements such as enhanced debug features and a higher level of support block integration. The LPC1769 operates at CPU frequencies of up to 120 MHz. The ARM Cortex-M3 CPU incorporates a 3-stage pipeline and uses a Harvard architecture with separate local instruction and data buses as well as a third bus for peripherals. The ARM Cortex-M3 CPU also includes an internal prefetch unit that supports speculative branching.

The peripheral complement of the LPC1769 includes up to 512 kB of flash memory, up to 64 kB of data memory, Ethernet MAC, USB Device/Host/OTG interface, 8-channel general purpose DMA controller, 4 UARTs, 2 CAN channels, 2 SSP controllers, SPI interface, 3 I2C-bus interfaces, 2-input plus 2-output I2S-bus interface, 8-channel 12-bit ADC, 10-bit DAC, motor control PWM, Quadrature Encoder interface, four general purpose timers, 6-output general purpose PWM, ultra-low power Real-Time Clock (RTC) with separate battery supply, and up to 70 general purpose I/O pins.

General purpose 32-bit timers/external event counters
The LPC1769 includes four 32-bit timer/counters. The timer/counter is designed to count cycles of the system derived clock or an externally-supplied clock. It can optionally generate interrupts, generate timed DMA requests, or perform other actions at specified timer values, based on four match registers. Each timer/counter also includes two capture inputs to trap the timer value when an input signal transitions, optionally generating an interrupt.
Features: A 32-bit timer/counter with a programmable 32-bit prescaler. . Counter or timer operation. . Two 32-bit capture channels per timer, that can take a snapshot of the timer value when an input signal transitions. A capture event may also generate an interrupt. . Four 32-bit match registers that allow: . Continuous operation with optional interrupt generation on match. . Stop timer on match with optional interrupt generation. . Reset timer on match with optional interrupt generation. . Up to four external outputs corresponding to match registers, with the following capabilities: . Set LOW on match. . Set HIGH on match. . Toggle on match. . Do nothing on match. . Up to two match registers can be used to generate timed DMA requests.

LPCXpresso development kit
LPCXpresso Web Site
USB powered, LED, oscilator included, .1 step, all pins available, cheap (40 euros). Removable USB/JTAG programming and debugging interface. Gcc/Eclipse tools.

TDC configuration
Time to digital conversion is achieved with 32-bit Timer1 counting 120 MHz clock periods (8.3 ns) in free mode. Timer capture and IRQ are triggered on each event. Inside interrupt service routine, timer value is substracted from previous value and pointed bin is incremented in 32-bit 1024-channel histogram located in RAM. If pointer > 1023, an 'over' counter is incremented. A pointer divisor (K) can be applied (counts/2^K). Spectrum, over and live time can be requested by UART (RS232 or USB) as well as start, stop, clear, etc.

Time resolution: 8.3 ns
Minimum time: 500 ns (interrupt latency)
Maximum time: 30 s (2^32*8.3 ns)

Experiments with BIG scintillator
XP2020Q on BIG scintillator (second mounting) with Ortec 269 base assembly, 456 HV supply and 436 discriminator.

K=0, HV=2300V, discriminator 10 Hz. 13 days.

K=1, HV=2300V, discriminator 20 Hz. 9 days.

Calculo del fondo SECOND [FIRST] run
Tasa a la salida del discriminador: L=25c/s [10]
Ventana del TDC para K=1 [0]: T = 1024*2K/120MHz = 16.7us [8.3]
Probabilidad de 1 o mas eventos en la ventana T: P=1-P(0,L)=1-exp(-L*T)=0.000425 [0.00017]
La ventana se abre L veces por segundo. Por dia: n=L*60*60*24=2160000 [864000]
Conteo por dia por canal (fondo): f = n*P/1024 = 0.9 c/dia [0.14]

Pendiente del fondo
Cuanto cae una exponencial de constante de tiempo 1/L en T?
p=exp(-L*T)=0.9996 [0.9998]

Espectro registrado en el osciloscopio