serial communication in 8085
DESCRIPTION
Serial communication in 8085TRANSCRIPT
Microprocessor & Microcontroller - I
T.E Sem V (Rev)
Prof. Nitin Ahire
XIE, Mahim
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
8085 serial I/O Data transmission
SOD
GND GND
8085
Serial I/P
Serial
Device
SID Serial 0/P
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
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
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
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
8085 serial I/O Data transmission
SOD
GND GND
8085
Square Wave of 1KHZ Freq.