ALP to interface 8086 processor with 8255 PPI to generate the triangular wave.

; Assume the interface is connected over J4 of trainer
; This program generates a Square or Triangular wave at Xout or Yout
; The program can be executed in Stand alone or Serial mode
; Execute the program from memory location 2000H

                OUTPUT 2500AD
                ORG 2000H
                MOV AX,0000H
                MOV CS,AX
                MOV ES,AX
                MOV DX,0FFE6H           ;Initialise all 8255
                MOV AL,80H              ;ports as O/P ports
                OUT DX,AL

      START:    MOV CX,0FFH             ;set count
                MOV AL,00H              ;start from 0
         UP:    INC AL                  ;increment data for
                MOV DX,0FFE0H           ;+ive going slope and      
                OUT DX,AL               ;output at port A & B
                MOV DX,0FFE2H
                OUT DX,AL
                LOOP UP
                MOV CX,0FFH             ;set count
                MOV AX,CX               ;start from FFh
       DOWN:    DEC AL                  ;decrement data for
                MOV DX,0FFE0H           ;-ive going slope at
                OUT DX,AL               ;port A & B
                MOV DX,0FFE2H
                OUT DX,AL
                LOOP DOWN
                JMP SHORT START              ;repeat continuously

                END
SHARE

Rishabh Chatterjee

Hi. I’m Engineering Student. I’m YouTuber. I’m Trying to find my passion.Sharing my life experiences with the world.

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Featured post

BENGALURU TO KANNUR

Welcome to Part 1 Of My Bengaluru To Kannur Trip.After almost 6 months finally im going on a road trip.I Hope you all enjoy this video.