Showing posts with label Counter. Show all posts
Showing posts with label Counter. Show all posts

Friday, August 10, 2012

Rangkaian Counter Up|Down Dengan seven segment

type='html'>Counter up/Down Dengan seven segment Desimal

This circuit can be used for many purposes. Applications ranging from simple bottles in the belt, display a number in the queue physician practices, the timer display for competition pool, until a little complicated to show the amount of rotation in one minute lap machine.


Important components in the Circuit is the following simple counter 74LS192, and have display driver IC 74LS47 (BCD to 7 segment driver) and the indicator 7 segment LED display common anode. In fact there are other census, such as 4-bit binary counter which can be up to 16 tattoo, but here is the census that is used 10 (decade counter) would be made because the tool is the census decimal.

Main component is an IC 74LS192 up / down decade counter, which is a component that can make a census to 10 (0 to 9) up and down. Component 16 is quite a lot of pins can be found in electronics parts stores. 74LS192 built with some of JK flip-flop and gate-gate logic. Logic transition from 0 to 1 (Low to High) at the UP pin (pin 14), the output BCD (binary code decimal) QA, QB, QC and QD Ascending 1 digits.

Similarly if there is a logic transition on the 0 to 1 DN pin (pin 4), the BCD output down 1 digit. It is a good idea if you explained a little about the rules of the BCD, as there is on the table. This is shown in the table 4-bit binary code QD .. QA-me representasikan code decimal from 0 to 9.

So that can be understood by those who view it, binary code is converted to a 7-segment LED drive by using the IC 74LS47 component. Thus, this Circuit can display the corresponding decimal number. This Circuit is used in the 7 segment LED Anoda Common, where all anoda of each LED segment is connected to one and the Vcc supply. To turn one segment, 7 segment LED pins that must be sinks (short) to ground through a resistor. Resistor that is used is 100 Ohm, and this is enough light to light this LED segment.
Counter Up|Down CircuitSkema Rangkaian Counter up/Down 7 segment Desimal


IC 74LS192 also equipped with a CO output pin (Carry Out) and BO (borrow Out) that each is normally high and work separately. Decimal output transition from 0 to 9 (counting up) will trigger pin CO-issued credit 0 to 1 (Low to High). On the transition from decimal 0 to 9 (counting down), a trigger pin BO-issued credit 0 to 1. Thus, the two outputs can be used as a clock trigger level for the next census. As an example in the Circuit-1 below, 2 units in the IC 74LS192-Cascade to make a census of tens of value and unit. Readers can easily stay on if the census level necessary to create value for the next hundreds, thousands and so on.

Rangkaian Couter Desimal of census work if akan CLR pin = 0 (low). For the input port RESET must be given in the ground or logic 0 in normal circumstances. Reset (display shows the decimal number 0) applies if the CLR pin (pin 14) is a transition from logic 0 to 1. Similarly with the pin and pin UP DN, akan work (counter rise / down) only if there is a transition from 0 to 1 on this pin. Readers need to add aCircuit of switch (key) to a trigger-counter (up / down) and Reset.

Tuesday, August 7, 2012

Rangkaian Frekuensi Counter Digital

type='html'>With a microcontroller system AT89c2051 and an LCD display we can create a digital frequency counter which can measure frequencies up to 250KHz. LCD is used LM16200.

LCD LM16200LM16200 LDC Pic
Table LM16200.Pin LCD LM16200

Scheme of frequency counter digital using AT89c2051 are as follows:
Frekuensi Counter DigitalSkema Rangkaian Frekuensi Counter Digutal

AT89c2051 to program, we use the Bascom 8051, the following programs Frequency caunter Digital Using AT89c2051:


'--------------------------------------------------------
' file: efy20fm24.BAS 25-12-05
' Frequency Meter Program using AT89c2051 micro controller
' written using bascom-51 from www.mcselec.com holland
' an embedded visual basic compiler for 8051 micro
' controllers
' by K.S.Sankar Web: www.mostek.biz
'------------------------------------------------------
' Connect the timer0 input P3.4 to a frequency generator
' with 24 mhz xtal accuracy ok upto 250khz
' define crystal speed and include file
$regfile = "89c2051.dat"
$crystal = 24000000
' define variables used
Dim A As Byte
Dim C As Long , D As Long
Dim Count As Word
Dim T0ic As Long
Dim Delayword As Word

' Initialize variables
Count = 0
T0ic = 0
D = 0
' initialize ports
P1 = 0
P3 = 255
' configure lcd display
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = P1.4 , Db5 = P1.5 , Db6 = P1.6 , Db7 = P1.7 , E = P1.3 , Rs = P1.2
Cls
'clear the LCD display
Lcd " EFY Freq Meter "
' define timer0
Config Timer0 = Counter , Gate = Internal , Mode = 1
'Timer0 = counter : timer0 operates as a counter
'Gate = Internal : no external gate control
'Mode = 1 : 16-bit counter
' set t0 internal interrupt
On Timer0 Timer_0_overflow_int
' interrupt will be generated on every 65536 count
Priority Set Timer0
Enable Interrupts
Enable Timer0

Counter0 = 0
'clear counter
Start Counter0
'enable the counter to count
Do
'set up a 1 sec accurate DO NOTHING loop
Enable Interrupts
'wait 1 as per BASCOM-51 is not accurate
For Delayword = 1 To 45440
Next Delayword
Disable Interrupts
C = Counter0
'get counter value
D = T0ic * 65536
Lowerline
C = C + D
T0ic = 0
Lcd " "
Lowerline
' show the frequency
Lcd "f=" ; C ; " Hz"
Waitms 255
Waitms 255
C = 0
Counter0 = 0
Start Counter0
're-start it because it was stopped by accessing the COUNTER
Loop

' timer0 int subroutine
Timer_0_overflow_int:
Rem timer0 overflow ( 65535 ) interrupt comes here
' increment the variable
Incr T0ic
Return
End
' end of program
' uses 1106 bytes of program memory