Microcontroller Articles

Page 14 of 33

8085 programs to find 2’s compliment with carry | Set 2

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 1K+ Views

Here we will see how to find 2’s complement with carry.Problem StatementWrite 8085 Assembly language program to find 2’s complement of a number stored in F100 with the carry, and store at F150 and F151.DiscussionIn 8085, there is CMA instruction to complement a number. Then we can add 01 with it to make it 2’s complement. While adding 01 with it, the carry may generate. We will store it to F151, and the actual complemented value will be at F150.InputAddressData……F10008…… Flow Diagram ProgramAddressHEX CodesLabelsMnemonicsCommentsF0003A, 00, F1 LDA F100Hget number from memory to AF0032F CMAget 1's complementF004C6, 01 ADI 01Increase it by 1F0066F MOV L, AStore A ...

Read More

8254 Control Word and Operating modes

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 8K+ Views

Here we will see the control words and the operation modes of the 8254 programmable interval timer chip.Before discussing its operating modes and control word properties, we should know about some important facts of this chip.When the chip is powering up, the state is undefined. The mode, count value, and outputs are undefined in that time.Each counter must be programmed before it is used. We do not need to program some unused counters.Counters are programmed by writing the control words and then one initial count.The structure of the counter is like this -76543210SC1SC0RW1RW2M2M1M0BCD/Binary We can select the counter by the SC1 ...

Read More

8259 PIC Microprocessor

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 29K+ Views

The 8259 is known as the Programmable Interrupt Controller (PIC) microprocessor. In 8085 and 8086 there are five hardware interrupts and two hardware interrupts respectively. Bu adding 8259, we can increase the interrupt handling capability. This chip combines the multi-interrupt input source to single interrupt output. This provides 8-interrupts from IR0 to IR7. Let us see some features of this microprocessor.This chip is designed for 8085 and 8086.It can be programmed either in edge triggered, or in level triggered modeWe can mask individual bits of Interrupt Request Register.By cascading 8259 chips, we can increase interrupts up to 64 interrupt linesClock ...

Read More

8085 program to add even parity to a string of 7 bit ASCII characters.

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 757 Views

Here we will see how to add even parity to 7-bit ASCII string using 8085.Problem StatementWrite a program to add even parity to a string of 7 bit ASCII characters. The length of the string is in memory location 8040 H and the string itself begins at memory location 8041 H. Place even parity in the most significant bit of each character.Discussion8085 has parity flat. that flag will be used to check and assign parity with each ASCII character. At first we will clear the most significant bit by masking the number with 7FH. Then use OR instruction, as this ...

Read More

8085 program to perform ON/OFF desired output LEDs connected at the output port B.

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 5K+ Views

Here we will see how to interface PORT IC with 8085.Problem StatementON/OFF desired output LEDs connected at the output port B.DiscussionHere we will see how to On/Off LEDs at port B. We are using 8255 IC for ports. The J1 and J2 connectors to connect the 8085 and 8255. The connector pin descriptions are given below. For controlling pin, we have to set the control word, that will be used in the program.Pin no. on J1/J28255 PinFunction113PC4212PC5316PC2417PC3514PC0615PC1724PB6825PB7922PB41023PB51120PB21221PB31318PB01419PB11538PA61637PA71740PA41839PA5192PA2201PA3214PA0223PA12311PC62410PC72526+5V267GND  Group A and B will operate in mode 0.Using port A as input port and port B as output port. The operation mode of ...

Read More

8085 program for running light with delays using lookup table.

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 1K+ Views

Here we will see how we can implement running light with some delays using 8085.Problem StatementWrite 8085 program to implement running light display with appropriate delays using lookup table stored from memory location 8100H on words.DiscussionThe patterns are stored at location 8100 onwards. We are using 8255 port IC to display the content in LED displays. After displaying, it calls the delay to wait for some time and call the next byte from memory to display. So the display pattern will be like below - ProgramAddressHEX CodesLabelsMnemonicsComments800031, 00, 82START:LXI SP, 8200 HInitializing the SP80030E, 15 MVI C, 14 HInitializing the counter800521, 00, ...

Read More

8085 program to transfer a block in reverse order

George John
George John
Updated on 30-Jul-2019 9K+ Views

Here we will see how we transfer a block of data in reverse order using 8085.Problem StatementWrite 8085 program to transfer a block of N-bytes in reverse order. The block is stored at location 8001 onwards, the size of the block is stored at 8000. The block will be moved at location 9000 onwards.DiscussionTo solve this problem, we are taking the size of the block at first. The DE register pair is set to point at destination address 9000H. The HL pair is set to point to the last element of the block. If the block size is 0A, then ...

Read More

8085 program to unpack 16-bit BCD, and store consecutive locations

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 1K+ Views

Here we will see we can take 16-bit BCD data from memory and unpack it, then store into memory using 8085.Problem StatementWrite 8085 program to take 16-bit BCD number from memory then store each digit by unpacking into different locations.DiscussionTo solve this problem, we will create one subroutine, that can unpack 1-byte BCD number and store into memory, then we will use that subroutine for two times to store 16-bit data. The subroutine will cut the numbers by masking upper nibble and lower nibble, and store into memory.Input1234 in the DE register pairFlow Diagram ProgramAddressHEX CodesLabelsMnemonicsCommentsF00031, 00, FC LXI SP, FC00Initialize stack ...

Read More

8085 program to take all data except 00H from an array

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 655 Views

Here we will see we can take all numbers which are not 00H from an array using 8085.Problem StatementWrite 8085 program to take all numbers which are not 00H from array, and store them into different location. Numbers are stored at 8001 onwards, 8000 is holding the size of array, the results will be stored from 9000.DiscussionTo solve this problem, we are taking the number from memory, then perform OR operation on the number and 00H. If the zero flag is enabled, then we can understand that the number was 00, so we just ignore that. Otherwise we just store ...

Read More

8085 program to add two consecutive bytes of an array

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 889 Views

Here we will see how we can add two consecutive elements in an array using 8085.Problem StatementWrite 8085 program to add two consecutive elements of an array and store them in the same location. The carry will be placed at bottom of the other byte. The numbers are stored from location 8001. The size of array is stored at 8000.DiscussionHere we will solve this problem by using one subroutine. That will add two consecutive numbers and stored them into correct position. That subroutine will be called multiple times to add all consecutive pairs. The task will be followed half of ...

Read More
Showing 131–140 of 321 articles
« Prev 1 12 13 14 15 16 33 Next »
Advertisements