Battery Voltage Status Monitor Circuit using 4 LEDs

Jun 30, 2013

The post describes a simple battery 4 step DC voltage monitor circuit using the versatile IC LM324. The idea was requested by Ms. Piyali.

Automatic Programmable School Bell Timer Circuit

Jun 29, 2013

The post explains a very simple 10 stage long duration programmable timer circuit which can be used as a school bell timer circuit. All the 10 stages can be individually programmed from zero to 5 hours. The circuit can be modified in many different ways to suit other specific related applications.

Knight Rider LED Chaser Circuit, Mains Operated Transformerless - Diwali, Christmas Project

Jun 27, 2013

The article discusses the construction details of the popular "knight rider" chaser circuit incorporating LEDs as well as mains operated bulbs through triacs. The proposed circuit is transformerless and is thus a lot compact and light weight.

10 Band Graphic Equalizer Circuit for Home Theater Applications

Jun 24, 2013

The proposed 10 band graphic equalizer circuit can be used in conjunction with any existing home theater system to get an enhanced 10 stage audio processing.

Low Power, Small Signal MOSFET 200mA, 60 Volts Datasheet, Specifications

Jun 23, 2013

The post explains the main specs and pinouts of a small signal, low power N-channel mosfet 2N7000G.

Make this Low Pass Filter Circuit for Subwoofer Applications

Jun 22, 2013

The post explains a simple low pass filter circuit which can be used in conjunction with subwoofer amplifiers for acquiring extreme cuts or bass in the frequency range 30 and 200Hz, which is adjustable.

Buck Boost Circuit Using IC 555

Jun 19, 2013

The post explains an universal IC 555 based buck-boost circuit which can be used for various different applications involving efficient power processing requirements.

Simplest Automatic Emergency Light Circuit Using IC555

The discussed simple automatic emergency light circuit employs just a single IC 555 and yet is able to switch more than 20 LEDs directly, it will illuminate the LEDs only during the absence of mains power and ambient light.

How SMPS Buck-Boost Circuits Work

Jun 18, 2013

We all have heard a lot about buck and boost circuits and know that basically these circuits are used in SMPS designs for stepping up or stepping down a given voltage at the input. The interesting thing about this technology is that it allows the above functions with negligible heat generation which results in a extremely efficient conversions.

Understanding Delay Loops: PIC Tutorial 3

Jun 16, 2013

There may be a minor downside of our flashing LED program. Every instruction needs 1
clock sequence to finish. In case we are utilizing a 4MHz crystal, then every instruction calls for
1/4MHz, or 1uS to finish.

Understanding Subroutines: PIC Tutorial 4

A subroutine is an integral part of code, or program, that may be referred as and when you may need
it. Subroutines are employed in cases where you are accomplishing the identical function frequently.

Using Memory Space Efficiently: PIC Tutorial 6

Up till now, we have composed the PIC blink an LED on and off. Subsequently we were capable of
with our PIC by including a switch, therefore varying the flash speed.

Understanding Logical and Arithmetic Operators: PIC Tutorial 7

Below, we will analyze how you can wiggle individual bits, carry out certain straightforward
arithmetic, as well as data tables.

Understanding Bit Operations: PIC Tutorial 8

Bit functions permit us to shape a single bit within a expression. They permit us to proceed,
set and get rid of single bits in registers or numbers that we stipulate.

Understanding Data Tables: PIC Tutorial 9

There exists a great option in the training set that permits you to make use of a data table.
A data table is just a list of data quotes, in which all is looked over based on a few considerations.

Understanding Interrupts: PIC Tutorial 10

The topic of interrupts may well gonna be the lengthiest and toughest to go thru. You cannot find any uncomplicated method of detailing interrupts, however with a little luck towards the end of this part you may be able to apply interrupts into your own programs.

How to Write Codes: PIC Tutorial 11

We dealt with a lot of basics within the last tutorial, therefore I feel the time has come that we composed
our first program.

Understanding Registers: PIC Tutorial - 1

PIC Tutorial – 2
Before getting into the minute details of PIC programming, it would be first important to learn a few good programming methods.
To begin with suppose you type a ;(semicolon) at any point of the program, all’s that come after this semicolon would get ignored by the compiler, until of course the carriage get’s back into the position.
The above feature allows us to add comments or remarks such that they don’t become the part of the program yet facilitates us to identify the program with the help of the comments beside it. Putting comments is a recommended practice while programming any IC.
Next important thing in the course is to assign names to the various constants (you would learn them later elaborately). This aso makes it simpler to understand what’s being written to, or regarding the involved values, instead of getting confused with the included numbers.
The above must be done in the form of actual names for instant recognition, for example COUNT, it would be important to note that here all capital letters are employed to make it distinct and also indicate that it’s a constant value.

As we can see, the above is done in the form of a box made of semicolons; this just makes it look cleaner. Additionally try documenting the program on paper as well, this practice will help to understand things in a step wise manner.

2. The Registers.

The register within a PIC is an area which accepts written details as well allows reading from it. You may compare it to a sheet of paper where you can visualize contents and aso add by writing over it.

The figure below depicts a typical register file map embedded within a PIC16F84. The format is not something which is actually set inside the PIC, it’s simply to indicate how the bits may be arranged inside the chip and to understand a few of the involved commands.

You can see that it’s basically divided into Bank 0 and Bank 1. Bank 1 is responsible for controlling the actual working of the PIC, for instance it tel the PIC which bits at Port A are assigned as inputs and which are as outputs.

Bank 2 is just for manipulating the information.

Let’s understand this through the following example:

Suppose we wish to assign one bit at PortA high. For this we would first need to go to Bank 1 for setting the specified bit or pin at Port A in the form of an output. After this we return to Bank 0 and deliver a logic 1 (bit 1) to that specific pin.

The most common registers which we woud like to use in Bank 1 are STATUS, TRISA and TRISB.

STATUS helps us to return to Bank 0, TRISA permits us to choose which pins at Port A are outputs and which may be inputs, while TRISB facilitates to select between output and input pin at Port B.
The SELECT register in BANK 0 permits the user to flip to Bank 1.

Let’s summarize the whole concept with the following description:

STATUS: In order to switch from Bank 0 to Bank 1 we command the STATUS register. This is implemented by setting bit#5 of the STATUS register to 1. In order to return back to Bank 0, we assign bit 5 of the STATUS register to 0. The STATUS register is positioned at address 03h, here h signifies tat the number may be in Hexadecimal.

TRISA and TRISB: These are situated at address 85h and 86h correspondingly. For programming a pin as an output or an input, we just deliver a zero or a one to the particular bit in the register. Now this may be done in two ways, via binary, or Hex. In case one is unable to convert the parameter he or she may go for a scientific calculator for implementing the values.

Now we have5 pins at Port A, which corresponds to 5 pins. If we intend to fix one of the pins as inputs, we deliver a “1” to the particular bit.

In casewe wanted to assign one of the pins as outputs, we would set the specific pin to “0”. The bits are aid down exacty corresponding to the bits, or more precisey bit 0 is RA0, bit 1 would be RA1, bit 2 = RA2 and so forth. Let’s understand it in this way:

Suppose you wish to fix RA0, RA3 and RA4 as outputs, while RA1/RA2 as i/ps, you would do this by sending 00110 (06h). Check out that bit 0 is toward the right as indicated here:

Port A Pin            RA4           RA3          RA2           RA1          RA0

Bit Number             4                3                2                1               0

Binary                     0                0                1                1               0

The same goes for TRISB.


In order to deiver one of the output pins high, we just offer a “1” to thr respective bit in our PORTA or PORTB register. An identical procedure may be followed for TRISA and TRISB registers also.
Before we speed into our first example coding, let’s just understand a coupe of more registers, viz: w and f.

W and F

The W register is an ordinary register which enables you to assign any value of your choice. As soon as you assign a magnitude to W, you may proceed by adding this to another value or simply move it. With another value assigned, the details simply get overwritten on W.

The F register forwards its written matter over to a register. We would require this F register to assign a value over a register, may be over the STATUS or the TRISA registers, as these won’t allow us to put the values directly over them.
An Example Program

Let’s examine the following example code which will show us how the above instruction is implemented and would also witness a few of the instructions in the course.

Let’s begin by fixing Port A as discussed above.

For this we need to shift from Bank 0 to Bank1, this is done by setting up the STATUS register situated at address 03h, bit 5 to 1.

BSF 03h,5

The BSF Means Bit Set F. We are using two numbers after this instruction – 03h, which

is the STATUS register address, and the number 5 which corresponds to the bit number.

So, what we are saying is “Set bit 5 in address 03h to 1”.

We are now in Bank 1.

MOVLW 00110b

We are putting the binary value 00110 (the letter b means the number is in binary) into

our general purpose register W. I could of course have done this in hex, in which case

our instruction would be:


Either works. The MOVLW means ‘Move Literal Value Into W’, which in English

means put the value that follows directly into the W register.

Now we need to put this value onto our TRISA register to set up the port:


This instruction indicates “Move The Contents Of W Into The Register Address That
Follows”, in this instance the address refers to TRISA.

Our TRISA register at this point bears the figure 00110, or presented graphically:

Port A Pin          RA4      RA3     RA2     RA1      RA0

Binary                   0           0          1          1            0

Input/Output         O          O          I           I            O

So now we possess our Port A pins, we must return to Bank 0 to adjust one of the

BCF 03h,5

This instruction accomplishes the reverse of BSF. It implies “Bit Clear F”. The a pair of numbers that
correspond are the address of the register, here the STATUS register, as well as the bit
figure, in this instance bit five. What exactly we have completed at present is, defined bit five on our STAUS register
to 0
We have at this point returned in Bank 0.
The following is the code all in one block:

BSF 03h,5 ;Go to Bank 1
MOVLW 06h ;Put 00110 into W
MOVWF 85h ;Move 00110 onto TRISA
BCF 03h,5 ;Come back to Bank 0

How to Write to the Ports - PIC Tutorial 2

How to Read from Input/Output Ports: PIC Tutorial 5

So far, we have been composing to Port A in order that we are able to switch an LED on and off. At this point, we will see how we are going to read the I/O pins on the ports.

Programmable Bidirectional Motor Timer Circuit

Jun 14, 2013

The post explains a programmable bidirectional motor timer circuit for controlling a custom industrial mechanism. The idea was requested by Mr. Milton

Poultry Feed Controller Timer Circuit

The article explains a timer circuit specifically designed for detecting a poultry feed controller ON time period, and alarming a buzzer once the set time elapses. The idea was requested by one of readers of this blog.

Non-Contact Cable Tracer Circuit

Jun 13, 2013

Why would you shred $100 to buy a cable tracer when it is easier to develop one spending less than $10! This kind of tracer are typically used by telephone mechanics or an electrician while layering, replacing or wiring any element which needs long cables for example intercom or security television.

Simplest Variable Bench Power Supply Circuit

The article explains a simple variable voltage bench power supply circuit which utilizes just a couple of active components. The design can be very handy for the new electronic hobbyist

Bicycle LED Light Circuit Using a Single 1.5V Cell

The proposed bike flasher flashes two white LEDs from a single 1.5V cell by using a solitary general purpose transistor, and does not need core for the involved transformer, the main core being the Air itself.

Charging a Cell Phone from a 1.5V Battery

The post explains a very simple charging a cell phone from a 1.5v battery utilizing merely a 1.5V as the input source. The source can be any 1.5V cell rated at minimum 1000 mAH.

Simple Beat Frequency Oscillator (BFO) Metal Detector Circuit Explianed

The post explains a simple metal detector circuit using the beat frequency oscillator (BFO) concept, the BFO technique is considered to be the most accurate and reliable methods of detecting metals.

Compact, Ferrite Core Transformerless Inverter Circuit

Jun 12, 2013

The circuit diagram of a compact transformeress inverter using ferrite core inductor is shown in the following article, the image was provided to me by one of the avid readers of this blog Mr. Ritesh. The design is a full fledged configuration with includes most of the features such as ferrite transformer winding details, low voltage indicator stage, output voltage regulation facility etc.

Modifying a 4047 IC Inverter into Sine Wave Inverter Circuit - A Discussion

Jun 9, 2013

The post discuses how to modify an ordinary square wave inverter using IC 4047 into a modified sine wave inverter through PWM technology. The idea was requested by Mr. Philip

Universal High Watt LED Current Limiter Circuit - Constant Current Circuit for LEDs

The post explains a simple universal constant current LED driver circuit which can be used for safely operating any desired high watt LED.

Understanding Free Energy Receiving Concept - Tesla Coil Concept

Jun 7, 2013

For a novice, to understand more on Free Energy Receiver, let’s consider a solar-electric panel; widely used as an alternative to electrical energy.

Circuit for Making Free Electricity from Atmosphere

How about a situation to generate free electricity from atmosphere? The ideal option would be to transform the surrounding radio waves to usable current.

How to Collect Free Energy from Atmosphere - Circuit Diagram Attached

A free energy collector circuit helps to convert surrounding radio frequency waves to electric power and can provide 40 watts to 10 watts indefinitely.

Free Energy Bicycle Generator with Flashing Light Circuit

The following post describes a simple circuit idea which can be used for generating free electrical energy for illuminating a few safety flashing LEDs on a  Bicycle.

Making a Laser Beam Security Alarm Circuit

Jun 5, 2013

We have often seen laser alarm system as an integral part of security solution especially for a location which deserves hi-level security.

0-300V Variable Voltage, Current Transformerless Power Supply Circuit

Jun 3, 2013

The post explains a simple transformerless zero to 300 volts variable voltage and current power supply circuit which can be used for many different applications.

Automatic Voltage Regulator (AVR) Analyzer Circuit

Jun 2, 2013

The post below discusses an automatic voltage analyzer circuit which can be used for understanding and verifying the output conditions of an AVR. The idea was requested by Mr. Abu-Hafss.

Search This Blog