Skip to main content

program to generate triangular wave in 8086

program to generate triangular wave in 8086


Program 1 


TRIANGULAR WAVE GENERATOR with 8086 using 8255

MODEL SMALL
.STACK 100
.DATA
CONTROL EQU 0FFC6H ; Control port address for 8255
PORTA EQU 0FFC0H ; Port A address for 8255
PORTB EQU 0FFC2H ; Port B address for 8255
PORTC EQU 0FFC4H ; Port C address for 8255

.CODE
START:
MOV DX,CONTROL
MOV AL,80H ; Initialize all ports as output
OUT DX,AL ; Ports

BEGIN:
MOV DX,PORTB
MOV AL,00H ; Output 00 for 0V level
UP: CALL OUTPUT
INC AL ; To raise wave from 0V to 5V increment AL
CMP AL,00H
JNZ UP ; Jump UP till rising edge is reached i.e. 5V

MOV AL,0FFH
UP1: CALL OUTPUT
DEC AL ; To fall wave from 5V to 0V decrement AL
CMP AL,0FFH
JNZ UP1 ; Jump UP till falling edge is reached i.e. 0V
JMP BEGIN

OUTPUT:
OUT DX,AL
CALL DELAY
INT 21H

DELAY:
MOV CX,07H ;To vary the frequency alter the delay count
LUP1:LOOP LUP1
INT 21H

END START

Program 2


DA00: MOV DX, PORTB
      MOV AL, 00H    ;outport 00 for 0V level
UP: CALL OUTPUT
    INC AL
    CMP AL, 00H
    JNZ UP
    MOV AL, 0FFH       ;to change amplitude change count
UP1: CALL OUTPUT
     DEC AL
     CMP AL, 0FFH
     JNZ UP1   
     JMP DA00
;routine to output digital value
OUTPUT:    OUT DX, AL
    CALL DELAY
        RET
DELAY: MOV CX, 07H    ;to vary the frequency alter the delay count
LUP1: LOOP LUP1
      RET 

Comments

Popular posts from this blog

Short Speech on Independence Day in Malayalam

Short Speech on Independence Day in Malayalam

Independence Day speech in Malayalam language is very much helpful for students who prepared to speak in on assembly that's day. So here we try to show some short speech on Independence Day in Malayalam.Here We also give solution for the following queries Short Speech on Independence Day in Malayalam,Independence Day Speech in Malayalam,Short Speech on Independence Day in Malayalam,Malayalam Essay on Independence Day.

Independence Day Speech in Malayalam





Short Speech on Independence Day in Malayalam

















Malayalam Essay on Independence Day


















We are assembled here to celebrate nth freedom day of our country. ... We observe Independence day consistently on fifteenth of August since India got opportunity the evening of fourteenth of August in 1947. Soon after the autonomy of India, Pandit Jawaharlal Nehru had given a discourse on the Independence day in New Delhi.

Meenkulathi Bhagavathi Amman Temple Timing

Meenkulathi Bhagavathi Amman Temple Timing Details Given Below
Meenkulathi Bhagavathi Amman Temple Timing is different for different days. The detailed timing for each day is described below.
Monday:  5.30 AM to 11 AM (Morning) 5.30 PM to 8.00 PM (Evening)
Tuesday: 5.30 AM to 12 AM (Morning) 5.30 PM to 8.00 PM (Evening)

Wednesday:  5.30 AM to 11 AM (Morning) 5.30 PM to 8.00 PM (Evening)
Thursday:  5.30 AM to 11 AM (Morning) 5.30 PM to 8.00 PM (Evening)

Friday:  5.30 AM to 12 AM (Morning) 5.30 PM to 8.00 PM (Evening)
Saturday:  5.30 AM to 11 AM (Morning) 5.30 PM to 8.00 PM (Evening)
Sunday:  5.30 AM to 12 AM (Morning) 5.30 PM to 8.00 PM (Evening)







Meenkulathi Bhagavathi Amman Temple Pooja Timings Monday:  5.30 AM to 11 AM (Morning) 5.30 PM to 8.00 PM (Evening)
Tuesday:

Malayalam Mazha Kavithakal Lyrics

Malayalam Mazha Kavithakal Lyrics
Here in this post we try to say about mazha through Malayalam mazha kavithakal lyrics by famous Malayalam authors. Below we list out some mazhakavithakal for readers. Hope you enjoy.