serial communication in 8085

8

Click here to load reader

Upload: nitin-ahire

Post on 24-May-2015

4.220 views

Category:

Technology


14 download

DESCRIPTION

Serial communication in 8085

TRANSCRIPT

Page 1: Serial communication in 8085

Microprocessor & Microcontroller - I

T.E Sem V (Rev)

Prof. Nitin Ahire

XIE, Mahim

Page 2: Serial communication in 8085

8085 serial I/O Data transmission

• Serial communication is useful for data transfer between two points serially.

• SID (serial input data) used to accept serial 1 bit data under software control when a RIM instruction is executed the SID pin data is loaded in bit D7 of Accumulator

• SOD (serial output data) used to transfer 1 bit data under software control when a SIM instruction is executed the SOD pin is set or reset depending on D7 and D6 bit of Accumulator

Page 3: Serial communication in 8085

8085 serial I/O Data transmission

SOD

GND GND

8085

Serial I/P

Serial

Device

SID Serial 0/P

Page 4: Serial communication in 8085

8085 serial I/O Data transmission

instruction SIM

• To do the data transmission (TXE) 8085 uses SIM instruction

• The SIM instruction uses the accumulator content as shown above

• The sequence of instructions required

• Logic 0 MVI A,40h

SIM

& for

Logic 1 MVI A, C0h

SIM

SOD SDE M’ 6.5M’ 7.5MSER 7.5X M’ 5.5

SOD pinSerial Data enable

Page 5: Serial communication in 8085

8085 serial I/O Data transmission

• Write a program to generate a square

wave of 1 KHZ using SOD pin of 8085.

Sol: Time period=1/f =1ms

Ton + Toff = 1ms ( Ton=0.5ms )

Delay required = 0.5ms

Page 6: Serial communication in 8085

8085 serial I/O Data transmission

• main program

UP: MVI A,C0H ; for logic 1

SIM

CALL DELAY ; (0.5MS)

MVI A,40H ; for logic 0

SIM

CALL DELAY ; (0.5 MS)

JMP UP

Page 7: Serial communication in 8085

8085 serial I/O Data transmission

• DELAY calculation considering 8 bit prog.• Td = [17+[ {count} X 14 ] -3] T0.5ms = [17+[{count}X14]-3] 0.33msSo count= (104)D=(68)hdelay program Delay Subroutine

LOOP: MVI C,68HDCR CJNZ LOOPRET

Page 8: Serial communication in 8085

8085 serial I/O Data transmission

SOD

GND GND

8085

Square Wave of 1KHZ Freq.