Tuesday, May 31, 2016

A Brief History of C Programming

· General-purpose language which has been closely associated with the UNIX operating system for which it was developed - since the system and most of the programs that run it are written in C.
·    Many of the important ideas of C stem from the language BCPL, developed by Martin Richards.
·      In 1972 Dennis Ritchie at Bell Labs writes C and in 1978 the publication of The C Programming Language by Kernighan & Ritchie caused a revolution in the computing world.
·        In 1983, the American National Standards Institute (ANSI) established a committee to provide a modern, comprehensive definition of C. The resulting definition, the ANSI standard, or "ANSI C", was completed late 1988.

Wednesday, May 25, 2016

Automatic Temperature Controlled Fan


So, I just wanted to randomly post about a simple Engineering project that can be done as a minor project during your electronics engineering degree. The project is not much hard and can be easily done. The basic circuit diagram of the project is:
Circuit Diagram (Proteus Simulation of the Project) 

The basic working principle of the fan is that, when the temperature increases the fan starts rotating. We have kept a DC motor in place of fan in the above proteus simulation of the project.
The circuit exploits the property of Thermistor to operate the DC Fan. Thermistor is a kind of temperature dependent resistor and its resistance varies depending on the temperature in its vicinity. There are two types of Thermistors- NTC and PTC.
Negative temperature coefficient (NTC) Thermistor decreases its resistance when the temperature increases while Positive temperature coefficient (PTC) increases its resistance when the temperature increases. Thermistors are bead like resistors available from 100 ohms to 10K or more values. Here a 4.7K NTC Thermistor is used. IC 741 is used as a voltage comparator to switch on the DC fan. Its INV input (pin2) gets an adjustable voltage through VR while its Non-INV (pin3) input gets voltage through a potential divider comprising R1 and the Thermistor. Thus the voltage at pin3 depends on the conductivity of the thermistor.
When the temperature is normal (as set by VR), pin3 gets higher voltage than pin2 and makes the output of IC high. This high output keeps T1 off since its base is positive. DC fan remains off in this condition. When the temperature increases above the value set by VR, resistance of Thermistor decreases and the voltage at pin3 decreases. As a result, output of IC becomes low to switch on T1.
A small brush less DC fan (one used in computers) turns on to increase the air circulation. When the temperature returns normal, Fan automatically turns off. Diode 1N4007 is necessary to remove back EMF when T1 turns off.



(If you need further help about this comment below.)

About C Programming

I will be posting about C programming from basics including example programs and solutions. If you need any help regarding any programs and problems related to C, you can post in comments below, and I will try to help you as soon as possible. Thank you

Thursday, June 4, 2015

Programming Language

Programming Language?

In the beginning of time, people used gestures to tell, express things in simple word to communicate. And by time they were getting hard time to communicate efficiently and properly that they developed language (first spoken and then written). So, what is language? It is a systematic way which used to communicate. And after different stages different languages came in existence that now we can laugh together on jokes, puns and express our ideas and views. Thanks to language that now we can tell others what we need and likewise so many things. Well, computers live and think in vessels too… so we need a way to tell them what we want, so we can work together and get stuff done. Programming language is how we can talk to computers. It's a lot like English but it's kind of quirky too. Unlike people, machines cannot guess our intent. We have to be super meticulous and describe what we want in every little detail. This is how are we going to tell computers what we need or what we want? Of course, they do not understand English or any other human language.

Computers don't actually use words or meanings the way humans do. The computers are made up of many tiny switches (billions and billions of transistors) that are either ‘on’ or ‘off’. The ‘on’ state is known as 1 and the ‘off’ stage is known as 0. When you put those 1’s and 0’s together, you get options. If you put lots of them together, you get lots of options. Each chunk of options can now be something meaningful such as a number, a letter, or even a picture made of tiny dots. Now we have a way to tell a machine to do stuff using these simple bits of information (strings of 1’s and 0’s). But this way of telling computer what to do is too tedious and boring. So, we stack human-like languages that converts a simpler human-like language structure to the combination of 1’s and 0’s. This gives us many ways to give instructions to the computer. And as there are various ideas of people, programming languages are of many types. And of all the languages, they are broadly classified into three types.
1.     Machine level language
2.     Assembly level language
3.     High level language

So, Machine language is the one that is understood by a computer and that consists of 1’s and 0’s. Programming in machine language is a tedious task and they differ from one computer to another.
Assembly language is much simpler than machine language program. It uses much easier numbers, abbreviations to describe the collection of 1s and 0s. Thus, it is easier to implement and memorize. It is also known as a low level language because of the fact that to design a program programmer requires detailed knowledge of hardware specification. This language uses mnemonics code (symbolic operation code like ‘ADD’ for addition) in place of 0s and 1s. The program is converted into machine code by assembler. The resulting program is referred to as an object code. Even though it makes the programming easier it still is not used widely because of lack of flexibility and portability.
Thus to clear off the demerits of the assembly and machine level ( low level languages) high level language were introduced. The instructions of this language closely resemble to human language or English-like words thus making it easier to understand and memorize. It uses mathematical notations to perform the task. The high level language is easier to learn and requires less time to write and is easier to maintain the errors. The high level language is converted into machine language by one of the two different languages translator programs; interpreter or compiler. The major advantage of this language is that they are not dependent upon the architecture of the system we are using and program developed in one system can be run in another system with different specifications without any error. Thus high level languages are gaining much more popularity than other. There are many high level programming languages developed till this date according to the need of the people. Some of them are C, C++ and Java and so on.
C programming language is basic high level language and easier to learn and once you get to learn C you can easily learn and understand other high level programming languages. Thus we will be focusing on C. Thank you.



(Note: Programming languages are classified into two types in some books; Low level language and High level language and Low level language is further classified into two types; Machine language and Assembly language)

Saturday, May 23, 2015

An Overview of Modern Development in Technology

So, nobody in the past would have predicted that it would actually be possible, to talk to the person living in another continent at the real time; not only talk but also see each other. It is all like a magic if we see at a surface view of these things. These all developments are not a contribution to an individual or a company, there are numbers of such individuals and companies involved in the process and their series of desires and dreams has led us to the era we are upon. Information technology has developed so much in recent times.
How does it work? How does the cell phone work or that small heartbeat sensing device or that ATM machine or that vending machine or that routing device? Questions like this always used to arise in my mind while I was a kid and I believe everyone had this question on their mind when they were too young to know the real fact. So, the question is how it works or that works or that small beeping device works? The basic idea behind every electrical and electronic device is that there is a small controlling chip called 'Microcontroller' or 'Microprocessor' to which we provide certain instructions to perform the task needed. The instructions are the program that is given to the microprocessor or microcontroller that controls the behavior of the system. The programming simply is the process of telling the microprocessor or microcontroller to do the certain task under certain condition and to do other tasks under another condition. The programming can be done through the various high-level and low-level programs which we will discuss in our further posts. Thus, every embedded device you see, there is the combination of hardware components and programming. This much for today we will discuss more related things in other posts. Thank you.