You have no items in your shopping cart.

Subtotal: 0.00

User Manual for LED and Switch Interface

INTRODUCTION

PS-ADD-ON, LED & Switch Card has 8 nos. of Point LEDs, are the most commonly used components, usually for displaying Logical output of Device pin’s states also to visually indicate the state of each microcontroller/processor I/O pin. Slide Switches, to give a digital input to the devices to evaluate the pin states. All point LEDs, switch lines and power lines are terminated by the 20pin connector.

SPECIFICATIONS

  • Digital Inputs -8 Nos. of 5mm Point LED (Full RED)
  • Digital Outputs -8 Nos. of Slide switch (ON/OFF – Logic 1 and 0)
  • 20-pin Box Header -All LED and Switch | Power lines terminated at box connector
  • 20-pin FRC Cable -To connect host boards (Microcontroller/Processor/FPGA Kits)
 

CARD FEATURES

  • Digital Inputs - 8 Nos. of 5mm Point LED (RED)
  • Digital Outputs - 8 Nos. of Slide switch (ON/OFF – Logic 1 and 0)
  • 20-pin Box Connector

 

SLIDE SWITCH

  • Through Hole Mounting Type
  • SPDT Circuit
  • ON-OFF Function
  • PC Pin Termination Style
  • Vertical Orientation
  • Vertical actuation options

 

KIT INCLUDES

  • LED and Switch card
  • Interface Cable
  • Datasheets | App notes

 

HARDWARE DESCRIPTION OF LED AND SWITCH INTERAFCE CARD





a) WHAT IS A SWITCH

A switch is an electrical component that can break an electrical circuit, interrupting the current or diverting it from one conductor to another. A switch may be directly manipulated by a human as a control signal to a system, or to control power flow in a circuit.

b) INTERFACING SWITCH

Fig. 1 shows how to interface the switch to microcontroller. A simple switch has an open state and closed state. However, a microcontroller needs to see a definite high or low voltage level at a digital input. A switch requires a pull-up or pull-down resistor to produce a definite high or low voltage when it is open or closed. A resistor placed between a digital input and the supply voltage is called a "pull-up" resistor because it normally pulls the pin's voltage up to the supply.





Fig. 1 Interfacing switch to Microcontroller

c) LED (LIGHT EMITTING DIODE)

Light Emitting Diodes (LED) is the most commonly used components, usually for displaying pins digital states. Typical uses of LEDs include alarm devices, timers and confirmation of user input such as a mouse click or keystroke.

d) INTERFACING LED

Fig. 2 shows how to interface the LED to microcontroller. As you can see the Anode is connected through a resistor to GND & the Cathode is connected to the Microcontroller pin. So when the Port Pin is HIGH the LED is OFF & when the Port Pin is LOW the LED is turned ON.





Fig. 2 Interfacing LED to Microcontroller

HARDWARE DESCRIPTION OF LED & SWITCH WITH 8051/8086/8085





PROGRAMS ON PS-ADDON LED & SWITCH INTERFACE CARD

LED & SWITCH INTERFACING WITH 8086 TRAINER KIT

GPIO- I (8255) J1 Connector



PORTS

ADDRESS

Control REG

4003

PORT A

4000

PORT B

4001

PORT C

4002



AIM

Interface LED & Switch card with 8051 using 8255

PROGRAM:



MEMORY ADDRESS

OPCODE

MNEMONICS

8500

90 40 03

MOV DPTR, #4003

8503

74 90

MOV A, #90

8505

F0

MOVX @DPTR, A

8506

90 40 00

HERE: MOV DPTR, #4000

8509

E0

MOVX A,@DPTR

850A

90 40 01

MOV DPTR, #4001

850D

F0

MOVX @DPTR, A

850E

80 FE

SJMP HERE



Connect the Switch LED interface card with 8051 Trainer kit in J1 Connector using 20 pin FRC cable

INPUT:

give the input through Slide switch

OUTPUT:

view the corresponding Digital output on LED

LED & SWITCH INTERFACING WITH 8051 TRAINER KIT

IN 8085 WE HAVE TWO 8255 IC’S

GPIO- I (8255) J1 Connector



PORTS

ADDRESS

Control port

23

PORT A

20

PORT B

21

PORT C

22



GPIO- I (8255) J4 Connector

AIM

Interface LED & Switch card with 8085 using 8255

PROGRAM



MEMORY ADDRESS

OPCODE

MNEMONICS

8500

3E 90

MVI A, 90

8502

D3 C6

OUT 023H

8504

DB C0

LOOP: IN 021H

8506

D3 C2

OUT 020H

8508

C3 04 85

JMP LOOP



INPUT:

give the input through Slide switch

OUTPUT:

view the corresponding Digital output on LED

LED & SWITCH INTERFACING WITH 8086 TRAINER KIT

IN 8086 WE HAVE TWO 8255 IC’S

GPIO- I (8255)



PORTS

ADDRESS

Control port

FF26

PORT A

FF20

PORT B

FF22

PORT C

FF24



GPIO- II (8255)

PORTS

ADDRESS

Control port

FF36

PORT A

FF30

PORT B

FF32

PORT C

FF34



AIM

Interface LED & Switch card with 8086 using 8255

PROGRAM:



MEMORY ADDRESS

OPCODE

MNEMONICS

1100

BA 56 FF

MOV DX,FF56

1103

EE

OUT DX,AL

1105

BA 50 FF

L1:MOV DX,FF50

1106

EC

IN AL,DX

1109

BA 52 FF

MOV DX,FF52

111C

EE

OUT DX,AL

111D

EB FD

JMP L1



INPUT:

give the input through Slide switch

OUTPUT:

view the corresponding Digital output on LED

LAB EXERCISES:

1) Interface the LED AND SWITCH INTERAFCE CARD and blink the LED’s

2) Interface the LED AND SWITCH INTERAFCE CARD, design the logic gates using the Switch and view the Logic output on LED

  • Design AND gate
  • Design OR gate
  • Design NOR gate
  • Design EXOR gate