Skip to main content

Posts

Featured Post

Program to create Up counter on three 7-Segment LED display

7-Segment LED display is the combination of 8 LEDs in a special digital display format. I have explained the 7-segement LED displays in earlier post and simple digit display on it. Now, i want to discuss the interfacing of different 7-segment displays with 8051 microcontroller. Interfacing: - As you can see above circuit diagram in which three 7-segments are connected to port P1, P2, P3 and the common cathode are connected to the port P0.1, P0.2 and P0.3. Now, we have to run a counter from 0-999. So, the basic concept is that you implement binary to hexadecimal conversion code in which MSB and LSB are extracted. Now, take MSB as hundredth digit and LSB as ones place digit. Code: #include"REGx52.h" #define seg_data P1 #define seg_data1 P2 #define seg_data2 P3 sbit seg1=P0^1; sbit seg2=P0^2; sbit seg3=P0^3; int num=0; int ones=0,tens=0,hundreds=0; void display_digit(int ); void delay(); void display_digit1(int ); void display_digit2(int ); void main() {
Recent posts

Program to interface Relay with LPC2148 microcontroller

A relay is an electrically operated switch or an electro-mechanical switch. Relays are used where it is necessary to control an electronic circuit by a low-power signal or where several circuits must be controlled by one signal. Principle:   Current flowing through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts. The coil current can be on or off so relays have two switch positions and most have double throw (changeover) switch contacts. Program: Theory: A relay is used for electronic to electrical interfacing i.e. it is used to switch on or off electrical circuits operating at high AC voltage using a low DC control voltage. A relay generally has two parts, a coil which operates at the rated DC voltage and a mechanically movable switch. The electronic and electrical circuits are electrically isolated but magnetically connected to each other. In this R1 and R2 are the connection of relay made with LPC2148 and signal appli

Voluntarily post your electronics stiffs and posts on this blog

I have started a voluntarily blogging on my blog where any one can post useful information about your project and electronics knowledge with the others. As, i have been busy since a long time in my work, i am unable to post useful content for my readers. Hence, i have decided to add few authors on my blog which can contribute honorary to this blog and share your useful stuffs and content with world. Instructions to become author: - If any one is interested in becoming an author of this blog, he/she has to make a blog on Blogger.com and learn to use it. - If, then you have useful information in the field of electronics and embedded which you think can help other people too. You can voluntarily mail me on email ID- examcut2@gmail.com - I will add your profile picture and contribution details on my blog. Terms and Conditions: 1. One has to be adhered to the blog targeted content and what content can be shared. 2. No money or any prize will be granted to any one on posting a

7-Segment LED display interfaced with LPC2148 microcontroller

7 Segment Display is an array of 8 LEDs connected or arranged in a special pattern together to form or display the digits from 0-9 and Dot functions also. LPC2148 micro-controller is an ARM architecture based 32-bit controller used many embedded applications. Program: Theory: 7-segment display contains 10 pins- 8 for LEDs, 1 for common cathode and other one for common anode. 8 LEDs structure forms a display in format of "8" which is used to display counting from 0 to 9 one at a time. You can operate it in two modes- common cathode and common anode. Four 7-segment displays are connection of four displays in a row (as shown in a figure). The features of four 7-segment is same as single 7-segment but, the only difference is that you can display number from 0000 to 9999. These are types are very much applied in general display applications as they are easy to implement and costs less than other display. There is slight different in coding part of four 7-segment disp

Get discounted Web hosting plan from Popular Web Hosting sites

One needs a better web hosting plan to run his/her professional site or blog for this he/she requires a well managed web hosting server and trusted seller. There are few popular trusted web hosting seller offers wide range of web hosting plan. So, i have brought few web hosting discount from 3 popular sites which are widely used by the customers. 1. Bluehost Web Hosting plan Bluehost.com is one of the biggest web hosting site that provides many tools to its customer. Now you can get it now at $4.95/month with unlimited space, bandwidth, transfer and instant set-up with free domain registration. Click above link and buy a web hosting plan to start instantly with other useful tools for your website and you will get an awarded free call support from the company. 2. Hostgator Web Hosting plan Hostgator , is one the biggest web hosting service that provides different web hosting services at l

Interfacing of Switch with LPC2148 microcontroller

Now, i discuss a program of LPC2148 microcontroller interfaced with a Switch and a LED. Earlier, i have discussed about the functions of LPC2148 microcontroller and its registers, which can help you understand the program described below. And, you also can understand the debouncing concept of switch when interfaced with microcontroller ( click here ) Program: Theory: IOPIN is the Input/Output Pin configuration which defines the current state of the GPIO configured port pins that can always be read from this register, regardless of pin direction. The denouncing switch concept has been implemented in this example code in which LED is switched on whenever a switch connected on port P0 is pressed.

Program to Blink LED interfaced with LPC2148 microcontroller

LPC2148 is a 32-bit microcontroller by NXP. I discuss a simple LED interface program interfaced with LPC2148 microcontroller to make you understand its register and PINSEL functions. Program: Theory: In the above code, there are 3 main instructions are used- ISOET0/1, IODIR0/1 and IOCLR0/1 . Every instruction has its own meaning as explained in Table 4. The above is taken on Fast GPIO port P1 on pins 16-23. Each decimal number in 0x00000000 defines the 4-bit, so the total comes out to be 32-bit. In GPIO port P1, 0-15 pins are reserved so you cannot direct output on these pins. Whereas 24, 26, and 27 pins of GPIO port P0 are reserved.

Pin connect Block and Register Description of LPC214X microcontroller

Pin Connect Block: The purpose of the Pin connect block is to configure the microcontroller pins to the desired functions. The pin connect block allows selected pins of the microcontroller to have more than one function. Configuration registers control the multiplexers to allow connection between the pin and the on chip peripherals. Peripherals should be connected to the appropriate pins prior to being activated, and prior to any related interrupt(s) being enabled. Activity of any enabled peripheral function that is not mapped to a related pin should be considered undefined.   (image from: ustudy.in) Register Description: The Pin Control Module contains 3 registers- PINSEL0 :- It selects Pin function register 0 and can read/write operations. PINSEL1 :- It selects Pin function register 1 and can read/write operations. PINSEL2 :- It selects Pin function register 2 and can read/write operations.