Este documento describe dos programas para un microcontrolador que usan puertos paralelos para leer sensores ópticos reflectivos. El primer programa indica cual sensor está reflejando la luz mediante LEDs conectados a un puerto. El segundo programa controla los motores de un robot según la entrada de los sensores, siguiendo las instrucciones de tablas provistas. El objetivo es demostrar el uso de puertos paralelos para controlar dispositivos externos basado en sensores.
ppt on flip flops
contents :
Made by : Dhanesh RK Nair
WHAT IS FLIP FLOP?
In digital circuits, the flip-flop, is a kind of bistable multivibrator.
It is a Sequential Circuits / an electronic circuit which has two stable states and thereby is capable of serving as one bit of memory , bit 1 or bit 0.
TYPES OF FLIP FLOPS:
1. SR Flip Flop
2. Clocked SR Flip Flop
3. JK Flip Flop
4. JK Flip Flop With Preset And Clear
5. T Flip Flop
6. D Flip Flop
USES OF FLIP FLOPS:
For Memory circuits
For Logic Control Devices
For Counter Devices
For Register Devices
SR FLIP FLOP
The most basic Flip Flop is called SR Flip Flop.
The basic RS flip flop is an asynchronous device.
In asynchronous device, the outputs is immediately changed anytime one or more of the inputs change just as in combinational logic circuits.
It does not operate in step with a clock or timing.
CLOCKED SR FLIP FLOP
Additional clock input is added to change the SR flipflop from an element used in asynchronous sequential circuits to one, which can be used in synchronous circuits.
The clocked SR flip flop logic symbol that is triggered by the PGT
Its means that the flip flop can change the output states only when clock signal makes a transition from LOW to HIGH.
JK FLIP FLOP
Another types of Flip flop is JK flip flop.
It differs from the RS flip flops when J=K=1 condition is not indeterminate but it is defined to give a very useful changeover (toggle) action.
Toggle means that Q and Q(compliment) will switch to their opposite states.
The JK Flip flop has clock input Cp and two control inputs J and K.
Operation of Jk Flip Flop is completely described by truth table
T FLIP FLOP
The T flip flop has only the Toggle and Hold Operation.
If Toggle mode operation. The output will toggle from 1 to 0 or vice versa.
D FLIP FLOP
Also Known as Data Flip flop
Can be constructed from RS Flip Flop or JK Flip flop by addition of an inverter.
Inverter is connected so that the R input is always the inverse of S (or J input is always complementary of K).
The D flip flop will act as a storage element for a single binary digit (Bit).
THANKS....!!!!
SOME MORE CONTENTS :
In electronics, a flip-flop or latch is a circuit that has two stable states and can be used to store state information. A flip-flop is a bistable multivibrator. The circuit can be made to change state by signals applied to one or more control inputs and will have one or two outputs. It is the basic storage element in sequential logic. Flip-flops and latches are fundamental building blocks of digital electronics systems used in computers, communications, and many other types of systems.
Flip-flops and latches are used as data storage elements. A flip-flop stores a single bit (binary digit) of data; one of its two states represents a "one" and the other represents a "zero". Such data storage can be used for storage of state, and such a circuit is described as sequential logic.
THANKS!!!!!!!!!!!
ppt on flip flops
contents :
Made by : Dhanesh RK Nair
WHAT IS FLIP FLOP?
In digital circuits, the flip-flop, is a kind of bistable multivibrator.
It is a Sequential Circuits / an electronic circuit which has two stable states and thereby is capable of serving as one bit of memory , bit 1 or bit 0.
TYPES OF FLIP FLOPS:
1. SR Flip Flop
2. Clocked SR Flip Flop
3. JK Flip Flop
4. JK Flip Flop With Preset And Clear
5. T Flip Flop
6. D Flip Flop
USES OF FLIP FLOPS:
For Memory circuits
For Logic Control Devices
For Counter Devices
For Register Devices
SR FLIP FLOP
The most basic Flip Flop is called SR Flip Flop.
The basic RS flip flop is an asynchronous device.
In asynchronous device, the outputs is immediately changed anytime one or more of the inputs change just as in combinational logic circuits.
It does not operate in step with a clock or timing.
CLOCKED SR FLIP FLOP
Additional clock input is added to change the SR flipflop from an element used in asynchronous sequential circuits to one, which can be used in synchronous circuits.
The clocked SR flip flop logic symbol that is triggered by the PGT
Its means that the flip flop can change the output states only when clock signal makes a transition from LOW to HIGH.
JK FLIP FLOP
Another types of Flip flop is JK flip flop.
It differs from the RS flip flops when J=K=1 condition is not indeterminate but it is defined to give a very useful changeover (toggle) action.
Toggle means that Q and Q(compliment) will switch to their opposite states.
The JK Flip flop has clock input Cp and two control inputs J and K.
Operation of Jk Flip Flop is completely described by truth table
T FLIP FLOP
The T flip flop has only the Toggle and Hold Operation.
If Toggle mode operation. The output will toggle from 1 to 0 or vice versa.
D FLIP FLOP
Also Known as Data Flip flop
Can be constructed from RS Flip Flop or JK Flip flop by addition of an inverter.
Inverter is connected so that the R input is always the inverse of S (or J input is always complementary of K).
The D flip flop will act as a storage element for a single binary digit (Bit).
THANKS....!!!!
SOME MORE CONTENTS :
In electronics, a flip-flop or latch is a circuit that has two stable states and can be used to store state information. A flip-flop is a bistable multivibrator. The circuit can be made to change state by signals applied to one or more control inputs and will have one or two outputs. It is the basic storage element in sequential logic. Flip-flops and latches are fundamental building blocks of digital electronics systems used in computers, communications, and many other types of systems.
Flip-flops and latches are used as data storage elements. A flip-flop stores a single bit (binary digit) of data; one of its two states represents a "one" and the other represents a "zero". Such data storage can be used for storage of state, and such a circuit is described as sequential logic.
THANKS!!!!!!!!!!!
Sistema de Acceso, el
cual recibirá la clave del usuario mediante el teclado matricial. La clave será
transmitida a un Computador mediante el Puerto Serial, el cual establecerá si la
clave es correcta (1) o incorrecta (0).
El objetivo del Proyecto Integrador es generar una propuesta de diseño de arquitectura empresarial a partir del
diagnóstico de una organización y sus necesidades, lo que permitirá la optimización de sus procesos y su eficiencia.
Criterios de la primera y segunda derivadaYoverOlivares
Criterios de la primera derivada.
Criterios de la segunda derivada.
Función creciente y decreciente.
Puntos máximos y mínimos.
Puntos de inflexión.
3 Ejemplos para graficar funciones utilizando los criterios de la primera y segunda derivada.
libro conabilidad financiera, 5ta edicion.pdfMiriamAquino27
LIBRO DE CONTABILIDAD FINANCIERA, ESTE TE AYUDARA PARA EL AVANCE DE TU CARRERA EN LA CONTABILIDAD FINANCIERA.
SI ERES INGENIERO EN GESTION ESTE LIBRO TE AYUDARA A COMPRENDER MEJOR EL FUNCIONAMIENTO DE LA CONTABLIDAD FINANCIERA, EN AREAS ADMINISTRATIVAS ENLA CARREARA DE INGENERIA EN GESTION EMPRESARIAL, ESTE LIBRO FUE UTILIZADO PARA ALUMNOS DE SEGUNDO SEMESTRE
1. Laboratorio de Microcomputadoras
Facultad de
Ingeniería
Práctica 05
Ortiz Gómez Cristian
Teoría: Grupo 1
Sánchez Segovia Diego Armando
Teoría: Grupo 3
Puertos Paralelos IV
(Lectura de sensores ópticos)
2. Puertos paralelos IV (Lectura de sensores ópticos)
Objetivo
• Emplear los puertos paralelos que contiene un microcontrolador, para hacer lecturas de señales externas (sensores
reflectivos) y realizar operaciones de acuerdo a los valores recibidos.
Desarrollo
Realizar los apartados siguientes.
1. Conectar la tarjeta de sensores reflectivos al puerto A y la tarjeta de leds al puerto B.
2. Realizar un programa, de tal forma que indique cual sensor refleja la luz infra-roja mediante el equivalente
despliegue al puerto B, representado mediante la siguiente tabla.
1
PuertosparalelosIV(Lecturadesensoresópticos)
processor 16f877
include <p16f877.inc>
; Variables para el DELAY
valor1 equ h'21'
valor2 equ h'22'
valor3 equ h'23'
cte1 equ 10h
cte2 equ 50h
cte3 equ 60h
1
2
3
4
5
6
7
8
9
10
11
Tabla 5.1 N = 0 B = 1
ENTRADAS
Sensor
Izquierdo
PA2
Sensor
Central
PA1
Sensor
Derecho
PA0
N N N
N N B
N B N
N B B
B N N
B N B
B B N
B B B
Salidas
PB3 PB2 PB1 PB0
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
3. 2
PuertosparalelosIV(Lecturadesensoresópticos)
; Variables a utilizar para comparar las entradas a través del puerto A
v0 equ h'24'
v1 equ h'25'
v2 equ h'26'
v3 equ h'27'
v4 equ h'28'
v5 equ h'29'
v6 equ h'30'
v7 equ h'31'
org 0
goto BEGIN
org 5
BEGIN
clrf PORTA
clrf PORTB
bsf STATUS, RP0 ; Cambia la banco 1
bcf STATUS, RP1
clrf TRISB ; Configura puerto B como salida
movlw 06h ; Configura puertos A y E como digitales
movwf ADCON1
movlw 3Fh ; Configura el puerto A como entrada
movwf TRISA
bcf STATUS, RP0 ; Regresa al banco 0
LOOP
movlw 0
movwf v0
movfw PORTA ; Mueve lo que hay en PORTA a W
andlw b'000111' ; Enmascara los 3 primeros bits
xorwf v0, W ; Verifica si la entrada es $00
btfsc STATUS, Z ; Z == 0?
goto ZERO ; NO, entonces v0 == W
; SI, entonces v0 != W
movlw 1
movwf v1
movfw PORTA
andlw b'000111'
xorwf v1, W ; Verifica si la entrada es $01
btfsc STATUS, Z
goto ONE
movlw 02h
movwf v2
movfw PORTA
andlw b'000111'
xorwf v2, W ; Verifica si la entrada es $02
btfsc STATUS, Z
goto TWO
movlw 03h
movwf v3
movfw PORTA
andlw b'000111'
xorwf v0, W ; Verifica si la entrada es $03
btfsc STATUS, Z
goto THREE
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
4. 3
PuertosparalelosIV(Lecturadesensoresópticos)
movlw 04h
movwf v4
movfw PORTA
andlw b'000111'
xorwf v4, W ; Verifica si la entrada es $04
btfsc STATUS, Z
goto FOUR
movlw 05h
movwf v5
movfw PORTA
andlw b'000111'
xorwf v5, W ; Verifica si la entrada es $05
btfsc STATUS, Z
goto FIVR
movlw 06h
movwf v6
movfw PORTA
andlw b'000111'
xorwf v6, W ; Verifica si la entrada es $06
btfsc STATUS, Z
goto SIX
movlw 07h
movwf v7
movfw PORTA
andlw b'000111'
xorwf v7, W ; Verifica si la entrada es $07
btfsc STATUS, Z
goto SEVEN
ZERO
movlw 0
movwf PORTB
goto LOOP
ONE
movlw 1
goto MOV_PORTB
TWO
movlw b'0010'
goto MOV_PORTB
THREE
movlw b'0011'
goto MOV_PORTB
FOUR
movlw b'0100'
goto MOV_PORTB
FIVE
movlw b'0101'
goto MOV_PORTB
SIX
movlw b'0110'
goto MOV_PORTB
SEVEN
movlw b'0111'
goto MOV_PORTB
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
5. 4
PuertosparalelosIV(Lecturadesensoresópticos)
MOV_PORTB
movwf PORTB
call DELAY
goto LOOP
DELAY ; Rutina que genera un RETARDO
movlw cte1
movwf valor1
D_THREE
movwf cte2
movwf valor2
D_TWO
movlw cte3
movwf valor3
D_ONE
decfsz valor3
goto D_ONE
decfsz valor2
goto D_TWO
decfsz valor1
goto D_THREE
return
END
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
3. Realizar un programa que de acuerdo a la entrada generada por los sensores, se controle la operación de los
motores, tal como se muestra en la siguiente tabla.
Tabla 5.2
ENTRADAS
Sensor
Izquierdo
Sensor
Central
Sensor
Derecho
B N N
N B N
N N B
N N N
ACCION
Motor
Izquierdo
Motor
Derecho
ATRÁS ADELANTE
ADELANTE ADELANTE
ADELANTE ATRAS
PARO PARO
processor 16f877
include <p16f877.inc>
; Variables para el DELAY
valor1 equ h'21'
valor2 equ h'22'
valor3 equ h'23'
cte1 equ 10h
cte2 equ 50h
cte3 equ 60h
1
2
3
4
5
6
7
8
9
10
11
6. 5
PuertosparalelosIV(Lecturadesensoresópticos)
; Variables a utilizar para comparar las entradas a través del puerto A
v0 equ h'24'
v1 equ h'25'
v2 equ h'26'
v4 equ h'27‘
org 0
goto BEGIN
org 5
BEGIN
clrf PORTA
clrf PORTB
bsf STATUS, RP0 ; Cambia la banco 1
bcf STATUS, RP1
clrf TRISB ; Configura puerto B como salida
movlw 06h ; Configura puertos A y E como digitales
movwf ADCON1
movlw 3Fh ; Configura el puerto A como entrada
movwf TRISA
bcf STATUS, RP0 ; Regresa al banco 0
LOOP
movlw 0
movwf v0
movfw PORTA ; Mueve lo que hay en PORTA a W
andlw b'000111' ; Enmascara los 3 primeros bits
xorwf v0, W ; Verifica si la entrada es $00
btfsc STATUS, Z ; Z == 0?
goto STOP ; PARO
movlw 1
movwf v1
movfw PORTA
andlw b'000111'
xorwf v1, W ; Verifica si la entrada es $01
btfsc STATUS, Z
goto RIGHT ; Gira a la Derecha
movlw 02h
movwf v2
movfw PORTA
andlw b'000111'
xorwf v2, W ; Verifica si la entrada es $02
btfsc STATUS, Z
goto GO_ON ; Avanza
movlw 04h
movwf v4
movfw PORTA
andlw b'000111'
xorwf v4, W ; Verifica si la entrada es $04
btfsc STATUS, Z
goto LEFT ; Gira a la Izquierda
MOV_PORTB
movwf PORTB
call DELAY
goto LOOP
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
7. 6
PuertosparalelosIV(Lecturadesensoresópticos)
STOP
movlw 0
movwf PORTB
goto LOOP
LEFT
movlw b'1111'
goto MOV_PORTB
GO_ON
movlw b'1011'
goto MOV_PORTB
RIGHT
movlw b'1010'
goto MOV_PORTB
DELAY ; Rutina que genera un RETARDO
movlw cte1
movwf valor1
THREE
movwf cte2
movwf valor2
TWO
movlw cte3
movwf valor3
ONE
decfsz valor3
goto ONE
decfsz valor2
goto TWO
decfsz valor1
goto THREE
return
END
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Conlcusiones
Utilizamos los sensores ópticos para controlar el comportamiento de los motores, para esto primero verificamos su
funcionamiento utilizando los leds de la tarjeta, después conectamos el módulo de motores al Puerto B. El
comportamiento de los motores junto con los sensores es similar al de un robot seguidor de línea.