Published:2011/7/20 21:44:00 Author:Li xiao na From:SeekIC
By A. Rosenkranzer
Hands-on
This article and its follow-up does not concentrate too heavily on a theoretical textbook approach to the use of CPLDs in digital designs instead we use a practical hands-on method. Here we build a digital rev counter (tachometer) suitable for use in most cars or motorbikes.
The rev counter design is quite straightforward and should make a good introduction to the use of CPLD technology. This article takes you through the complete process of construction and programming and will give a good foundation and insights into the advantages of this type of technology.
The project is described using a top-down approach; first we will take a look at the block diagram and point out the features of the CPLD at the hardware level. Next we will consider the peripheral circuitry and finally (in the second part) the internal structure of the CPLD and the programming process is described.
Figure 1 shows the block diagram of the digital tachometer circuit. The central component is the CPLD 7128S from Altera, this chip does all the work and is surrounded by some peripheral circuitry.
An interface is required to convert the ignition pulse from the low-tension connection on the ignition coil to TTL levels and remove any noise spikes that may be present on this signal. The ’lighting’ input signal controls the light intensity of the LED column (the 12 V to 5 V interface is not shown on this diagram but can be seen in detail in Figure 2). Under daylight viewing the intensity can be at maximum but at night it needs to be dimmed to avoid dazzling.
The chip is programmed over the JTAG interface using a Byte Blaster interface adapter from Altera (or a ByteBlaster compatible interface) which connects to a PC parallel port.
A quartz crystal together with a few discrete components generates the chip clock. This clock is sufficiently accurate to ensure that the circuit will not require calibrating. The setting of three DIP switches allows the tachometer to be used on vehicles with different cylinder counts and ignition systems. Without reprogramming the circuit can be configured for one, two, three, four, six or eight cylinder engines using either single or double spark ignition. Three more DIP
switches are used to change the display mode. This allows the range of displayed revs to be changed to suit the performance of the vehicle engine:
1000 to 6000 rpm with a resolution of 3 LEDs per 1000 rpm.
750 to 4500 rpm with a resolution of 4 LEDs per 1000 rpm (Diesel mode).
2000 to 10000 rpm with a resolution of 2 LEDs per 1000 rpm (motorcycle engines).
4000 to 6000 rpm high resolution mode with 8 LEDs per 1000 rpm.
5000 to 7000 rpm (the so called ’Schumacher mode’).
Almost any type of display representation including non-linear can be programmed into the CPLD and selected by three DIP switches. To make programming easier there is an Excel spreadsheet available that calculates the frequency scaling necessary in the program given the oscillator frequency and the required display resolution.
The tachometer display consists of a single line of 16 LEDs. Each LED is driven by two outputs from the IC and through two series resistors. The reason for this is that the data sheet indicates that the maximum output current is limited to 12 mA; most standard LEDs require around twice this current if they are to be visible under daylight conditions. Low power LEDs could be used to solve the problem but here the use of two outputs to drive one LED gives us a simple method to indicate not just the rpm but also each 1000-rpm graduation that glow differently.
Reprinted Url Of This Article: http://www.seekic.com/blog/project_solutions/2011/07/20/Hands_on_CIPtLGJs:Hands_on.html
Print this Page | Comments | Reading(1396)
Author:Ecco Reading(32821)
Author:Ecco Reading(3526)
Author:Ecco Reading(3246)
Author:Ecco Reading(3801)
Author:Ecco Reading(5331)
Author:Ecco Reading(3315)
Author:Ecco Reading(3462)
Author:Ecco Reading(3604)
Author:Ecco Reading(4009)
Author:Ecco Reading(3807)
Author:Ecco Reading(3748)
Author:Ecco Reading(3780)
Author:Ecco Reading(6094)
Author:Ecco Reading(3764)
Author:Ecco Reading(4579)