What are the difference between C and Objective C ?

What are the difference between C and Objective C ?

    The language C was developed in early 1970s by Dennis Ritchie for the UNIX Operating system. It a general purpose, procedural programming language. The language is used for developing system applications as well as desktop applications.

    Objective C was developed in early 1980s by Brad Cox and Tom Love. It is an object-oriented, general purpose language and was created with the vision of providing small talk-style messaging to the C programming language. This language allows the users to define a protocol by declaring the classes and the data members can be made public, private and protected. This language was used at Apple for iOS and OS X operating systems. Swift language was developed at Apple in 2014 to replace this language. But still there are plenty of companies that are maintaining their legacy apps which are written in objective C.

    The main difference in C and Objective C is that C is a procedure programming language which doesn’t support the concepts of objects and classes and Objective C is Object-oriented language which contains the concept of both procedural and object-oriented programming languages.

Source: GeeksforGeeks

What are Procedural and Object Oriented Programming ?

 What are Procedural and Object Oriented Programming ?

Procedural Programming:

Procedural Programming can be defined as a programming model which is derived from structured programming, based upon the concept of calling procedure. Procedures, also known as routines, subroutines or functions, simply consist of a series of computational steps to be carried out. During a program’s execution, any given procedure might be called at any point, including by other procedures or itself.


Languages used in Procedural Programming:

FORTRAN, ALGOL, COBOL, 

BASIC, Pascal and C. 


Object Oriented Programming:

Object oriented programming can be defined as a programming model which is based upon the concept of objects. Objects contain data in the form of attributes and code in the form of methods. In object oriented programming, computer programs are designed using the concept of objects that interact with real world. Object oriented programming languages are various but the most popular ones are class-based, meaning that objects are instances of classes, which also determine their types.


Languages used in Object Oriented Programming:

Java, C++, C#, Python, 

PHP, JavaScript, Ruby, Perl, 

Objective-C, Dart, Swift, Scala. 


Source : GeeksforGeeks

What is Scavenging in Two-Stroke Engines ?

     The process of simultaneously purging exhaust gas and filling the cylinder with fresh charge for a new cycle is referred to as scavenging. 

    The main scavenging methods are 

  1. Cross scavenging, 
  2.  Loop scavenging and
  3.  Uniflow scavenging. 

    The gas exchange process in two-stroke engines can be characterized with a number of parameters including delivery ratio, scavenge ratio, scavenge efficiency, purity of charge and trapping efficiency.



Source : DieselNet

What actually inside your Car Steering?

 The chances are your car has Rack and pinion steering. It’s been an incredibly popular engineering choice for years, but have you ever stopped to ponder exactly how it works?

Thankfully, the basics aren’t hard to grasp at all: it’s all about turning rotational motion into linear. When you turn the steering wheel, this turns a steering column, which rotates the attached steering shaft and a worm gear known as the pinion. This gear sits on the ‘rack’, a length of metal with a series of teeth cut into it. So as the pinion rotates, the rack moves either left or right, depending on your steering input.







Source : CarThrottle



Low Voltage Vs High Voltage Programming

Low Voltage Vs High Voltage Programming

There are two modes for programming a PIC® Microcontroller, High Voltage (HV) mode, and Low Voltage (LV) mode. The Low-Voltage Programming (LVP) mode allows the PIC Flash MCUs to be programmed using the operating voltage VDD of the device. This offers many advantages to In-Circuit Serial Programming™ (ICSP) designs.

Types of States in Digital Output

 A three-state, or Tri-State, output has three electrical states: One, zero, and "Hi-Z," or "open." The hi-Z state is a high-impedance state in which the output is disconnected, leaving the signal open, to be driven by another device (or to be pulled up or down by a resistor provided to prevent an undefined state).

High-impedance schemes such as three-state are commonly used for a bus, in which several devices can be selected to drive the bus. 

An open-drain or open-collector output pin is driven by a single transistor, which pulls the pin to only one voltage (generally, to ground). When the output device is off, the pin is left floating (open, or hi-z). A common example is an n-channel transistor which pulls the signal to ground when the transistor is on or leaves it open when the transistor is off.

Open-drain refers to such a circuit implemented in FET technologies because the transistor's drain terminal is connected to the output; open-collector means a bipolar transistor's collector is performing the function.

When the transistor is off, the signal can be driven by another device or it can be pulled up or down by a resistor. The resistor prevents an undefined, floating state. (See the related term, hi-z.) 

 A signal line is said to be "floating" if it is not connected to any voltage supply, ground, or ground-referenced signal source.

 Examples:

            An open-drain, high-impedance (hi-z) output when in the off (hi-z) mode

            In microcomputer systems, a data or address bus may, at times, be undriven (floating). This is permissible because control signals indicate when data is valid, so users of the bus know when the signal can be ignored. 

        One form of non-volatile memory device is achieved via floating gates. The gate of a MOSFET has no connection, allowing charge to remain indefinitely. The gate charge is changed using Fowler-Nordheim tunneling or hot-carrier injection. EPROM, EEPROM, and flash memory are examples. 




Source : Maxim