Low level I/O programming for UNIX using C language
Image 01

I use C programming language coupled with hardware knowledge and writing compilers for C.

It is important to understand the above simple statement so we can talk about low level vs. high level programming!

I will try to generalize with examples in order to let a wider audience understand what I am trying to explain

The lowest of all languages off course is the native computer language zeros and ones “00110001” which interact with the processor registers that can be switched ON / OFF hence Zero / One or “0” and “1” (not to be confused with I/O for Input/Output). The more registers a processor or CPU has, the faster the computations. Hence the faster your program will execute and the more heat generated and more power used.

NOTE: If you can write in binary directly then your code will be 100% efficient and will use less resources and execute faster. There are mathematical formulas that will allow you to use binary directly. However, its incredibly time consuming!

A higher level of computer language (from binary) would be Assembler, incredibly time consuming to use for big programs and people don't read hexadecimal very well, so we go one step higher which brings us to “C” language (C programming language also referred to as portable assembler).

NOTE: not to confuse “C” with C++ or visual C or visual C++ ...etc; these are not the same and they are considered high level languages in comparison. The higher the level programming the closer you get to human English language. One of the highest levels of programming is Microsoft basic programming; its almost like writing English language and the compiler translates the syntax to computer language.

Now we get to the compiler! The compiler is important as it interprets pre-defined syntax into zeros and ones (computer language). If you know the hardware architecture then you can optimize the compiler for C by creating your custom syntax to use for that specific hardware in order to generate the most optimized computer language (i.e. 00110001) without the added extra code that most higher languages generate. This garbage code uses more resources , slows operations, requires faster processors, more memory and higher capacity batteries.

On a cell phone or laptop the processors have millions of registers and lots of memory so optimization on the "low level" is totally ignored. Almost all the cellphones and computers we use today running on average ~25% efficiency meaning about ~80% garbage code present meaning ~80% longer battery life can be achieved if garbage code were eliminated, meaning we can get ~80% faster program executions...etc if we optimize the code.

In conclusion, a higher level typically means less knowledge needed about hardware. A person who creates hardware (cpu, motherboard, etc) also provides its machine language (assembly language). That becomes the lowest level itself. Then someone else writes a compiler for C which converts C syntax into native assembly language for that hardware. With C you can use assembly hence lowest level reached!!

Now we go back to my simple statement I mentioned at the very top: Using C programming language coupled with hardware knowledge and writing compilers for C.

This allows me to get a very low powered processor like a form of Micro-controller (CPU) with very few registers (less than a hundred) that includes a tiny memory soldered on a small board with portable power source and a GPS chip-set with GSM cellular modem, a small microphone and a serial port to interface with and we can have our own tracker with OBD capabilities that can be controlled remotely and wireless

Lets call this device the “ OBDII-Tracker

It connects to the OBDII port in your vehicle and establishes connections with your vehicle computer and allows you the user to use your cellular phone and read information from your vehicle computer and send/receive commands

OBDII Tracker allows you to do the following using your cellphone:

  • View diagnostic trouble codes (DTC's)
  • Reset service engine soon light
  • Unlock your doors
  • Remote engine start/shutdown. You can specify engine to keep a running time after which auto-shutdown will occur
  • Vehicle precise location and history of location/speeds/gear position/rpm all coupled with location. This can be useful to see if vehicle was parked at a location with transmission in park while engine running or if vehicle was driven recklessly ...etc
  • Remote fuel interrupt to disable vehicle if you think it was stolen
  • Valet mode lets you specify max speed car can go and total distance it can travel before fuel interrupt will occur. This prevents joy rides
  • automatic inside vehicle audio recording and transmission to your mobile with GPS location if vehicle gets towed or alarm activates or sound detected inside the car

and other custom features designed for motorcycles

The OBDII-Tracker is 1.5cm high / 3.5cm long / 2.5cm wide and weighs 95gm with built-in Lithium Ion rechargeable battery that connects to vehicle power source (+6volts to +32volts)

Please note that I do not have a paid site or paid services. I share what I do publicly for free