Skip to main content

Posts

Showing posts with the label Technology

The future of AI in business and its potential to transform industries

What is USART in the PIC18 microcontroller?

 What is USART in the PIC18 microcontroller? Before we understand what is UART first let us understand the basic communication concept and its classification  The computer transfers the data in two ways, serial and parallel . Serial communication is effective for long-distance communication while parallel communication is effective for short-distance communication. When a microcontroller communicates with the outside world it provides the data in bite-sized chunks. Now the serial data communication also classified into two methods- 1. Synchronous 2. Asynchronous The synchronous method transfers a block of data at a time, while the Asynchronous method transfers a single byte of data at a time.  It is possible to write software to use either of these methods, but the program can be tedious and long.  For this reason, special IC chips are made by many manufacturers for serial data communications. These chips are commonly referred to as  1. UART (Universal asy...

PIC18 Timer programming in C

The PIC18 timer is divided into 4 types Timer 0 Timer 1 Timer 2 Timer 3 PIC18 timers can be used to generate a time delay or as a counter to count external event happening outside the microcontroller. In this article, we will see how to generate a time delay by programming the PIC18 timer. Timer 0 The timer 0 module has the following features Software is scalable as an 8 bit or 16-bit timer/counter. Readable and writable Dedicated 8 bit software programmable Prescaler Clock source selectable to be internal or external Edge select for external clock Register required for Timer 0 Control register Each timer has a control register called TCON to set the various timer operation modes. T0CON is an 8-bit register used for control of timer 0. TOCON TMR0ON (Timer0 on/off control bit)                                       1 = Enable timer 0                ...

What is the Internal ADC pic18f chips?

Hello... In today's article, we will talk about the internal ADC pic18f.   We will cover the article on the following points: What is ADC? Characteristics of ADC Features of ADC ADCON0 register ADCON1 and ADCON2 register Calculating Analog to Digital conversion time Steps to program A/D converter What is ADC? ADC stands for Analog to Digital converter. ADC devices are the most widely used devices for data acquisition. The computer understands the binary values but in the real world, everything is available in analogue values. Temperature, pressure, humidity, velocity etc are few examples of physical quantities that we deal with in everyday life. Therefore. we need an Analog-to-digital converter to translate the Analog signal to digital numbers so that the microcontroller can read and process them. The ADC is widely used in data acquisition, in recent years an increasing number of microcontrollers have an on-chip ADC peripheral just like timer and USART . An on-chip ADC eliminates ...

Interface relay with PIC18 microcontroller

Hi... today we will talk about another important component used in the embedded domain called a relay. Relays are electric switch which uses electromagnetism to either form or breaks the existing circuits. With the help of a relay, you can trigger a high voltage operation by a low voltage input signal. Relay is a highly versatile component that is as effective in a complex circuit as in a simple circuit. In this article, we will talk about how to interface relay with PIC18 controller. We will cover the topics in the following points: About the interfacing task Software tools used Required components Circuit diagram Code for controller Upload the HEX file Run simulation About the interfacing task In the interface relay task, with the help of a push-button, we will trigger the relay to control the lighting of the bulb which is of higher voltage. When we press the push button the microcontroller will trigger the relay to change its state, when the relay changes its state from normally clo...

Interfacing of DC motor with PIC18 controller

DC motors are rotary motors that convert electrical signals into mechanical motion. DC motors are also one of the most useful peripheral devices in the embedded domain, we can use the DC motors from our academic projects to toys and gadgets sold in the market. In this article, we will talk about the interfacing of  DC motor to the PIC18F4520 controller. We will cover the topics in the following ways:- About the Task Required components software tools circuit diagram writing code for the controller uploading the hex file to the controller Simulating the project About the project In this interfacing task, we will control the rotation of the DC motor with a push button. When the push button is pressed the motor will rotate in a clockwise direction otherwise it will rotate in an antilock wise direction. Required components For the simulation, the components which are required are:- PIC18F4520 controller L293D (motor driver) DC motor Software tools The software tools required for ...

Interfacing 16x2 LCD display with PIC18F4520 controller

Interfacing 16x2 LCD display with PIC18F4520 controller The LCD display is also one of the most important and most used peripheral devices in embedded systems. Whenever we required to display some information or some status we usually prefer an LCD display. In this article, we will talk about how to interface a 16x2 LCD display to the PIC18F4520 controller. We will cover this article in the following steps:- About the project Required components Software tools Circuit diagram Writing code for the controller Upload the Hex file to the controller Simulating the project About the project This would be a simple LCD interfacing task. In this LCD interfacing project, we will display the reverse count from 3 to 1 and then display the "Code Somenplus" text (name of this blog page) on the LCD display.  Required components The required components for the simulations are PIC18F4520 controller LM016L (16x2 LCD display) Software tools The software tools that require are Proteus 8 professi...

Interfacing 4x3 Keypad with PIC18F4520 controller

Interfacing 4x3 Keypad with PIC18F4520 controller The keypad is one of the most widely used peripheral devices, from our academics projects to industrial use whenever user interface is required we remember the keypad for our embedded systems. Hence learning how to interface keypad to different-different controllers becomes important. In this article, we will see how to interface a 4x3 keypad to the PIC18F4520 controller. We will cover the topics on the following points:- About the project Selecting the required components Circuit diagram Writing the code for the controller Uploading the HEX file to the controller Simulating the project About the project In this project, the keypad is connected to Port B and the data pins are connected to the Port D of the PIC controller. Data controlling pin of the LCD are connected to pin 3.0, pin 3.1, pin 3.2 of port C. In this simple project initially, the LCD display will print the name of this blog page "Code somenplus" and then it will ...

Home automation via Bluetooth

Home automation via Bluetooth  Hi, in this project we will talk about home automation via Bluetooth connection. Automation via Bluetooth makes our life much easier, it can provide ease of access or automate our day to day tasks. In this, we will try to control our day to day tasks like turning on and off the light bulb. controlling the fan and also controlling the water pump via a Bluetooth connected terminal. Working principle This project is based on the Bluetooth serial communication, we are using two Bluetooth module one is connected with the virtual terminal which will work transmitting the commands (this transmission side will work as a handheld device or mobile phone), and another module is connected to the microcontroller which will control the light bulb, fan and pump. when we transmit 'a' through the virtual terminal the controller will turn on the bulb, and on transmitting 'b' it will turn off the light. 'a' -  turn on light 'b' - turn off lig...