Professional Documents
Culture Documents
TECHNICAL SPECIFICATIONS
D Serial communication using 8251 Universal Synchronous/ Asynchronous Receiver Transmitter IC. D Output is provided on 9 pin D-Type connector. D Data lines from AD0 to AD7 are indicated by 3mm LED. D Chip Select, Read, Write, A0, A1, DTR, DSR, RTS, CTS, TXRDY , RXRDY are indicated by 3mm LED. D Hardware Single Step and Full Clock Execution modes are provided. D Single stepping can be performed using micro switch provided on board. D Using this study card all MODE experiment can be performed. D Interface 8085/8086/8051 Kit using 50 pin FRC Connector. D User s Manual with Sample Programs.
INTRODUCTION
In this study card 8251 is used for asynchronous transmission or reception of data. The 8251 is used as a peripheral device and is programmed by the CPU. The 8251 (USART) accepts data characters from the CPU in parallel format and then converts them into a continuous serial data stream for transmission. Simultaneously it can receive serial data streams and convert them into parallel data characters for the CPU.
The 8251 in a communication environment is an interface device which must convert parallel format system data into serial format and vice versa. It must also delete or insert bits or characters that are functionally unique to the communication technique. These features are simulated in the 8253/8251 study module and are done by using RxD, TxD, DTR, DSR, RTS etc. The Data Bus Buffer block is a 3 state, bidirectional buffer and is used to interface 8251 to the system data bus. It receives various signals like Reset, RD, WR CS, C/D, which decide the direction of the flow of data. C/D RD W R O O I O I O I O I I I O X I I X X X CS O O O O O I 8251 Data Data Bus= STATUS = Data Bus= Data Bus= Data Bus= = Data Bus 8251 Data Data Bus Control 3 state 3 state
The 8251 also has a set of control inputs like DSR, DTR, RTS, CTS and a transmitter buffer and a Receive Buffer. The data is xmitted on TxD pin and received on RxD pin, and TxC/RxC controls the rate at which the character is to be xmitted (Baud Rate).
D7 D6 D5 D4 D3 D2 D1 D0
SYNDET/ DSR FE OE PE TxEMPTY RxRDY TxRDY BRKDET Note 1 Same Definitions as I/O pins
Baud Rate Factor 00 DSYN Mode 01 DASYN X1 10 DASYN X16 11 DASYN X64 Character Length 00 D5 Bits 01 D6 Bits 10 D7 Bits 11 D 8 Bits Parity Control X0 DNo Parity 01 D Odd Parity 11 DEven Parity
D7
D6
D5
D4
D3
D2
D1
D0
Z The mode instruction should be given. Z The command instruction should be given.
Before starting data transmission or reception, the 8251 must be properly initialized by a set of control words generated by the CPU. These control words define the complete functional definition of the 8251.
Overrun Error The OE flag is set when the CPU does not read a character before the next one becomes available. It is reset by the ER bit of the Command instruction. OE does not inhibit operation of the 8251A; however, the previously overrun character is lost.
D7 D6 D5 D4 D3
Transmit Enable 1 = Enable 0 = Disable Receive Enable 1 = Enable 0 = Disable
D2 D1
D0
X IR X ER X RxE X TxEN
Framing Error (Async Only) The FE flag is set when a valid Stop bit is not detected at the end of every character, it is reset by the ER bit of the Command instruction. FE dose not inhibit the operation of the 8251A. Data Set Ready: Indicates that the DSR is at a zero level.
Note 1 : TxRDY status bit has different meanings from the TXRDY output pin. The former is not conditioned by CTS and TxEN; the latter is conditioned by both CTS and TxEN. I.e. TxRDY status bit = DB buffer Empty TxRDY pin out = DB Buffer Empty (CTS = 0) (TxEN = 1)
DESCRIPTION
D The study module card is connected to the 8085/8086 kit through a 50 pin FRC. Before making connection, check the polarity of the cable. D The module consists of an 8251, 74LS390, 74LS245 octal bus transceivers and NC1489 and NC1488, switches for single stepping. 74LS390 is use for generating baudrate. It also has tags which can be connected to either Vcc or GND and LEDs to display status. D The toggle switch (SW1) is for enabling single stepping. The Push to ON Switch (SW2) is form single stepping of every instruction. While single stepping with the help of SW2 each data transfer in an instruction will be displayed on the LEDs (Data Bus.) D Status of LEDs defined 0 as OFF and 1 as ON .
INSTALLATION
1. 2. 3. 4. 5. Connect the 8251 Study Card to the Kit by 50 pin FRC cable and check the polarity for proper communication between the card and the kit. Check the polarity of the cable for proper communication between kit and card. Keep the switch SW1 in OFF position to enable signal stepping. Connect the RS-232C cable in CN2 of 8251 Study Card & COM1/COM2 of PC. Switch ON the PC in Windows98/2000/NT/XP and run HYPERTERMINAL Software with having paramaters: Bits per second Data bits Parity Stop bit Flow Control 19200 8 None 1 XON/XOFF
NOTE : Baudrate for 8085 LED/LCD Kit, 8086 LED Kit is 19200bps & 8086 LCD Kit, 8051 LCD Kit is 9600bps. 6. 7. 8. Enter the program from Location 2000 for 8085 Kit / 0400 for 8086 Kit / 3000 for 8051 Kit and make sure that your program is entered properly before execution. Execute the program. Af ter Execution see the Steps (page no. 11 to 12 ) accordingly. Press switch SW2 for single stepping the program and see the result on LED.
SAMPLE PROGRAMS
PROGRAM FOR 8085 LED TRAINER KIT
Port Address
Data Word - 30H
Program
This Program is to Transmit the character from PC Keyboard to 8251 Study Card and the same data will Transmit from 8251 Study Card to the PC in 19200 Baudrate. Address Step-1 2000 2002 Step-2 2004 2006 Step-3 2008 200A 200C Step-4 200F 2011 2012 Step-5 2013 2015 2017 Step-6 201A 201B Step-7 201D Opcodes 3E 4E D3 33 3E 05 D3 33 DB 33 E6 02 CA 08 20 DB 30 57 00 DB 33 E6 01 CA 13 20 7A D3 30 C3 08 20 LP2: LP1: Mnemonics MVI A,4EH OUT 33H MVI A,05H OUT 33H IN ANI JZ IN 33H 02H LP1 30H ;CHECK UNTIL FLAG=1 ; R E A D T H E I N P U T D ATA (PRESSED KEY) ;STORE ACC DATA TO REG D Comments ;INIT MODE WORD FOR 8251 ;OUT ON MODE WORD ;MOVE ACC DATA 05H ;OUT AT COMMAND WORD ;CHECK RECIEVER RECIEVING FLAG
;CHECK TRANSMITTER RECIEVING FLAG ;CHECK UNTIL FLAG=1 ;MOV REG D DATA TO ACC ;OUT AT DATA WORD ;JUMP TO LOOP
Program
This Program is to Transmit the character from PC Keyboard to 8251 Study Card and the same data will Transmit from 8251 Study Card to the PC in 19200 Baudrate. Address Step-1 2000 2002 Step-2 2004 2006 Step-3 2008 200A 200C Step-4 200F 2011 2012 Step-5 2013 2015 2017 Step-6 201A 201B Step-7 201D C3 08 20 JMP LP1 ;JUMP TO LOOP Opcodes 3E 4E D3 2B 3E 05 D3 2B DB 33 E6 02 CA 08 20 DB 28 57 00 DB 2B E6 01 CA 13 20 7A D3 28 LP2: LP1: Mnemonics MVI OUT MVI OUT IN ANI JZ IN MOV NOP IN ANI JZ MOV OUT 2BH 01H LP2 A,D 28H ;CHECK UNTIL FLAG=1 ;MOV REG D DATA TO ACC ;OUT AT DATA WORD ;CHECK TRANSMITTER RECIEVING FLAG A,4EH 2BH A,05H 2BH 33H 02H LP1 28H D,A ;CHECK UNTIL FLAG=1 ;READ THE INPUT DATA(PRESSED KEY)
;STORE ACC DATA TO REG D
Comments ;INIT MODE WORD FOR 8251 ;OUT ON MODE WORD ;MOVE ACC DATA 05H ;OUT AT COMMAND WORD ;CHECK RECIEVER RECIEVING FLAG
Program
This Program is to Transmit the character from PC Keyboard to 8251 Study Card and the same data will Transmit from 8251 Study Card to the PC in 19200 Baudrate. Address Opcodes Step-1 0400 0402 0405 Step-2 0406 0408 Step-3 0409 040A 040C Step-4 040E 0411 0412 0414 Step-5 0415 0418 0419 041B Step-6 041D 041F 0422 Step-7 0423 B0 4E BA 06 FF EE B0 05 EE START: Mnemonics MOV MOV OUT MOV OUT AL,4EH DX,0FF06H DX,AL AL,05H DX,AL Comments ;INIT MODE WORD FOR 8251 ;OUT ON MODE WORD ;MOVE ACC DATA 05H ; O U T AT C O M M A N D WORD
EC 24 02 74 FB BA 00 FF EC 88 C3 90 BA 06 FF EC 24 01 74 F8 88 D8 BA 00 FF EE EB E4
LP1:
LP2:
;CHECK TRANSMITTER RECIEVING FLAG ;CHECK UNTIL FLAG=1 ;MOV REG BL DATA TO AL ;OUT AT DATA WORD
10
Program
This Program is to Transmit the character from PC Keyboard to 8251 Study Card and the same data will Transmit from 8251 Study Card to the PC in 9600 Baudrate. The Baudrate is generated using 8253. Address Opcodes Step-1 0400 0402 0404 0406 0408 040A 040C 040E Step-2 0410 0412 Step-3 0414 0416 0418 Step-4 041A 041C 041E Step-5 041F 0421 0423 Step-6 0425 0427 Step-7 0429 B0 B6 E6 06 B0 E6 B0 E6 B0 07 04 00 04 4E Mnemonics MOV OUT MOV OUT MOV OUT MOV OUT MOV OUT LP2: IN AND JZ IN MOV NOP LP1: IN AND JZ MOV OUT JMP AL,0B6H 06H,AL AL,07H 04H,AL AL,00H 04H,AL AL,4EH 66H,AL AL,05H 66H,AL AL,66H AL,02H LP2 AL,60H BL,AL Comments ;INIT 8253 CWR ;FOR BAUD RATE GENERATION ;LOAD LSB COUNT ;LOAD MSB COUNT ;INIT MODE WORD FOR 8251 ;OUT ON MODE WORD ;MOVE ACC DATA 05H ;OUT AT COMMAND WORD
E6 66 B0 05 E6 66 E4 66 24 02 74 FA E4 60 88 C3 90 E4 66 24 01 74 FA 88 D8 E6 60 EB E9
;CHECK RECIEVER RECIEVING FLAG ;CHECK UNTIL FLAG=1 ; R E A D T H E I N P U T D ATA (PRESSED KEY) ;MOV REG AL DATA TO BL
;CHECK TRANSMITTER RECIEVING FLAG ;CHECK UNTIL FLAG=1 ;MOV REG BL DATA TO AL ;OUT AT DATA WORD ;JUMP TO LP2
11
Program
This Program is to Transmit the character from PC Keyboard to 8251 Study Card and the same data will Transmit from 8251 Study Card to the PC in 9600 Baudrate. The Baudrate is generated using 8253. Address Opcodes 3000 3003 3005 3006 3009 300B 300C 300E 300F 3012 3014 3015 3017 3018 3019 301B 301D 3020 90 FF 0F 74 36 F0 90 FF 0C 74 09 F0 74 00 F0 90 FF 23 74 4E F0 74 05 F0 E0 54 01 60 FB 90 FF 20 E0 LP1: Mnemonics MOV MOV DPTR,#0FF0FH A,#36H ;FOR BAUD RATE GENERATION Comments ;INIT 8253 CWR
;INIT MODE WORD FOR 8251 ;OUT ON MODE WORD ;MOVE ACC DATA 05H ; O U T AT WORD COMMAND
MOVX A,@DPTR
12
13
14
15
+5V CN3
U5
U6 U7 U2
M85-XX=1A to 1B M86-01=2A to 2B M86-02=3A to 3B A B 1 2 3 JP1 1
U8
-12V
+12V
GND
C3
+5V
7474 74390
SW2 ON
D0 D1
RS-232 CONNECTOR
D6
D7
74245
U3 U10
RD DTR DSR CTS RX RDY A1 RTS TX RDY WR
U11
C2
8251
C1
1488
A0
1489
R3 R2
R11 R10 R9 R8 R7 R6 R5 R4
74245
GND
CN1
CN2
R20
U4
SW1
D2 D4 D5 D3
U1
16
Warranty
1. 2. We guarantee the product against all manufacturing defects for 12 months from the date of sale by us or through our dealers. Consumables like dry cell etc. are not covered under warranty. The guarantee will become void, if a) The product is not operated as per the instruction given in the operating manual. b) The agreed payment terms and other conditions of sale are not followed. c) The customer resells the instrument to another party. d) Any attempt is made to service and modify the instrument. The non-working of the product is to be communicated to us immediately giving full details of the complaints and defects noticed specifically mentioning the type, serial number of the product and date of purchase etc. The repair work will be carried out, provided the product is dispatched securely
3. 4.
1 2
17