Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to generate pulse waveform.
Write 8085 Assembly language program to generate continuous square wave.
To generate square wave with 8085, we will rotate 10101010 (AAH) continuously. We have to send D0 as output. We will mask the accumulator content by 01H. If this is 0, then output will be 0, if it is 1, output will be 1, thus the pulse will be generated.
No input is given in this case
|8000||16, AA|| ||MVI D,AAH||Load 10101010 into D|
|8002||7A||ROTATE||MOV A,D||Load D to A|
|8003||07|| ||RLC||Rotate A to the left|
|8004||57|| ||MOV D,A||Store A into D again|
|8005||E6, 01|| ||ANI 01H||Mask A with 01H|
|8007||D3, 10|| ||OUT 10H||Send output to port 10|
|8009||C3, 02, 80|| ||JMP ROTATE||Jump to ROTATE for next phase|
Square wave is generated as output at the output port.