Tech Tips


Introduction

This page contains a selection of useful hints and tips for the technically minded. If you wish to contribute then please send an e-mail to phykjs who's at phyfsa.phy.hw.ac.uk.


Prime Number Fun

A piece of C code that will find all the prime numbers below 1000:

main()
{
  long i=9,j=9999;
  for (;--i;j%i ? 1: --i ? i=--j:printf("%ld\n",j));
}

Decoupling Capacitors

TTL and CMOS components generate current spikes in power lines since they have a transient state where both output transistors are on simultaneously. These current spikes propagate down the power-distribution system and can develop 10mV to 100mV spikes. The effects are additive and can cause 1ms to 2ms transients of up to 300mV to 500mV to develop on the power lines. Decoupling capacitors supply the transient current at the IC leads and therefore keep any transients out of the supply lines. The rule is to use one ceramic capacitor per digital chip (10nF to 100nF) and two ceramic capacitors per analogue chip (10nF to 100nF, one on each supply).

Smoothing of the power supply (removal of spikes) is done at point of entry to the circuit board. Use a large value high quality electrolytic or tantalum capacitor (10µF to 100µF) to handle bus transients. The bare minimum capacitor value is 1µF every eight ICs. This should be in parallel with a small value ceramic capacitor (10nF to 100nF) to handle high frequency transients.

Failure to use decoupling capacitors will at best result in spurious results and at worst complete failure of the circuit board.


Last Modified 29/07/03 11:13:41.