Ankith Reddy

Ankith Reddy

730 Articles Published

Articles by Ankith Reddy

Page 35 of 73

Timers of 8051

Ankith Reddy
Ankith Reddy
Updated on 31-Oct-2023 85K+ Views

In Intel 8051, there are two 16-bit timer registers. These registers are known as Timer0 andTimer1. The timer registers can be used in two modes. These modes areTimer mode and the Counter mode. The only difference between these two modes is the source for incrementing the timer registers. Timer ModeIn the timer mode, the internal machine cycles are counted. So this register is incremented in each machine cycle. So when the clock frequency is 12MHz, then the timer register is incremented in each millisecond. In this mode it ignores the external timer input pin.Counter ModeIn the counter mode, the external events ...

Read More

Interfacing Stepper Motor with 8051Microcontroller

Ankith Reddy
Ankith Reddy
Updated on 31-Oct-2023 96K+ Views

In this section, we will see how to connect a stepper motor with Intel 8051 Microcontroller. Before discussing the interfacing techniques, we will see what are the stepper motors and how they work.Stepper MotorStepper motors are used to translate electrical pulses into mechanical movements. In some disk drives, dot matrix printers, and some other different places the stepper motors are used. The main advantage of using the stepper motor is the position control. Stepper motors generally have a permanent magnet shaft (rotor), and it is surrounded by a stator. Normal motor shafts can move freely but the stepper motor shafts move ...

Read More

SELECT where row value contains string in MySQL?

Ankith Reddy
Ankith Reddy
Updated on 05-Oct-2023 41K+ Views

To select the row value containing string in MySQL, use the following syntax.SELECT *FROM yourTableName where yourColumnName like ‘%yourPattern%’;To understand the above syntax, let us first create a table. The query to create a table is as follows.mysql> create table PatternDemo -> ( -> Id int, -> Name varchar(100), -> Age int -> ); Query OK, 0 rows affected (0.97 sec)Insert records in the table using insert command. The query is as follows.mysql> insert into PatternDemo values(1, 'James', 23); Query OK, 1 row affected (0.11 sec) mysql> insert into PatternDemo values(2, 'Joseph', 21); Query OK, 1 row affected (0.18 ...

Read More

Stack and the stack pointer in 8085 Microprocessor

Ankith Reddy
Ankith Reddy
Updated on 04-Oct-2023 37K+ Views

The stack is a LIFO (last in, first out) data structure implemented in the RAM area and is used to store addresses and data when the microprocessor branches to a subroutine. Then the return address used to get pushed on this stack. Also to swap values of two registers and register pairs we use the stack as well.In the programmer‘s view of 8085, only the general purpose registers A, B, C, D, E, H, and L, and the Flags registers were discussed so far. But in the complete programmer’s view of 8085, there are two more special purpose registers, each ...

Read More

Best way to test if a row exists in a MySQL table

Ankith Reddy
Ankith Reddy
Updated on 06-Sep-2023 47K+ Views

To test whether a row exists in a MySQL table or not, use exists condition. The exists condition can be used with subquery. It returns true when row exists in the table, otherwise false is returned. True is represented in the form of 1 and false is represented as 0.For better understanding, firstly we will create a table with the help of CREATE command. The following is the query to create a table −mysql> CREATE table ExistsRowDemo -> ( -> ExistId int, -> Name varchar(100) -> ); Query OK, 0 rows affected (0.53 sec)After creating the table successfully, we will ...

Read More

C++ Program to Implement Stack using array

Ankith Reddy
Ankith Reddy
Updated on 31-Aug-2023 178K+ Views

A stack is an abstract data structure that contains a collection of elements. Stack implements the LIFO mechanism i.e. the element that is pushed at the end is popped out first. Some of the principle operations in the stack are −Push - This adds a data value to the top of the stack.Pop - This removes the data value on top of the stackPeek - This returns the top data value of the stackA program that implements a stack using array is given as follows.Example#include using namespace std; int stack[100], n=100, top=-1; void push(int val) {    if(top>=n-1)   ...

Read More

What would happen if there were no Moon?

Ankith Reddy
Ankith Reddy
Updated on 27-Apr-2022 864 Views

We cannot imagine our night sky without the bright moon. It adds the whole lot of beauty to the nights and has been the main subject for romantic poets for ages.Coming to the science, without the Moon, Earth will not have the steady tilt and scientists say that life on earth might not have evolved the way it is now. Here are the top five things that would happen without a moon.Nights will be much darker. The way the Moon lights up the night sky, cannot be done by all the stars put together.We know that days and nights are ...

Read More

C++ equivalent of instanceof

Ankith Reddy
Ankith Reddy
Updated on 16-Feb-2022 18K+ Views

C++ has no direct method to check one object is an instance of some class type or not. In Java, we can get this kind of facility.In C++11, we can find one item called is_base_of. This will check if the given class is a base of the given object or not. But, this does not verify whether the given class instance uses that function. The nearest possible functionality similar to "instanceof" can be achieved using dynamic_cast (expression). This tries to covert the given value into the specified type and returns the result. if the cast is unsuccessful this returns a null ...

Read More

8085 Program for subtraction of multi-Byte BCD numbers

Ankith Reddy
Ankith Reddy
Updated on 30-Jun-2020 733 Views

Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to subtract multi-Byte BCD numbers.Problem StatementWrite 8085 Assembly language program to subtract two multi-Byte BCD numbers.DiscussionThe numbers are stored into memory, and one additional information is stored. It will show us the Byte count of the multi-Byte BCD number. Here we are choosing 3-Byte BCD numbers. They are stored at location 8001H to 8003H, and another number is stored at location 8004H to 8006H. The location 8000H is holding the Byte count. In this case the Byte count is 03H.For the subtraction we ...

Read More

How to open MySQL command line on Windows10?

Ankith Reddy
Ankith Reddy
Updated on 30-Jun-2020 24K+ Views

To open the MySQL command line from cmd, you need to use username root with your password.Follow the below given steps. The syntax is as follows −cd \> press enter key cd Program Files\MySQL\MySQL Server 8.0\bin> press enter key C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -uroot -p press enter key Enter password: ******Here is the step by step instruction to open MySQL command line. First, Go to START > RUN or Open Run using Windows+R command −Type CMD and hit OK button −After pressing OK button, the CMD will open −Now you need to follow the above instruction. First reach your bin ...

Read More
Showing 341–350 of 730 articles
« Prev 1 33 34 35 36 37 73 Next »
Advertisements