You are on page 1of 2

CONTADOR flip-flop

OBJETIVO
REALIZAR UN CONTADOR EN LENGUAJE C QUE FUNCIONE COMO SI FUERA UN
FLIP-FLOP Y QUE FUNCIONE ACENDENTE Y DECENDENTE

DIAGRAMA DE ESTADO

PROGRAMA
Name
PartNo
Date
Revision
Designer
Company
Assembly
Location
Device

COUNT;
01;
21/03/2013 ;
01 ;
Engineer ;
UTT;
GREENHOD;
;
g22v10 ;

/* *************** INPUT PINS *********************/


PIN 1
= clk
; /*
PIN 2
= ud
; /*
/* *************** OUTPUT PINS *********************/
PIN 15
= q0
; /*
PIN 16
= q1
; /*
PIN 17
= q2
; /*
PIN 18
= q3
; /*
PIN 19
= q4
; /*
PIN 20
= q5
; /*
PIN 21
= q6
; /*
field estados = [q0,q1,q2,q3,q4,q5,q6];
sequence estados{
present 'b' 0111111
if ud next 'b' 0000110;
if !ud next 'b' 1100111;
present'b'0000110
if ud next 'b' 1011011;
if !ud next 'b' 0111111;
present 'b' 1011011
if ud next 'b' 1001111;
if !ud next 'b' 0000110;
present 'b' 1001111
if ud next 'b' 1100110;
if !ud next 'b' 1011011;
present 'b' 1100110
if ud next 'b' 1101101;
if !ud next 'b' 1001111;
present 'b' 1101101
if ud next 'b' 1111101;
if !ud next 'b' 1100110;
present 'b' 1111101
if ud next 'b' 0000111;
if !ud next 'b' 1101101;
present 'b' 0000111
if ud next 'b' 1111111;
if !ud next 'b' 1111101;
present 'b' 1111111
if ud next 'b' 1100111;
if !ud next 'b' 0000111;
present 'b' 1100111
if ud next 'b' 0111111;
if !ud next 'b' 1111111;
present 'b' 0000000
if ud next 'b' 0111111;
if !ud next 'b' 1100111;
}

*/
*/
*/
*/
*/
*/
*/
*/
*/