echo '' ;

Archives

Embedded Protocol – Bluetooth

Bluetooth is a wireless personal area network(WAN). BLE acronomy for Bluetooth Low Energy. One of the most popular short ‐ range wireless communication standard. Known as IEEE 802.15.1, now maintained by SIG (Special Interest Group). Bluetooth is everywhere. How many Bluetooth devices are there in the room? Cellphones, wireless mouse/keyboard, smart watch/bracelet, earphone, ibeacon.

Read more… →

Embedded Sensor – Passive Infrared Sensor (PIR)

  • PIRPassive InfraRed Sensor
  • PIR consists of a Pyroelectric sensor which generates energy when exposed to heat.
  • The module covered with Fresnel Lense Cover.
  • BISS0001 micro Power PIR Motion Detector IC.

Infrared Application

  • Passive Infrared Detector for Anti Theft security alarm system.
  • Passive Infrared Detector based Light On/OFF.
  • Automatic Light  ON/OFF.
  • Many other motion Detection Application.

Different PIR Modules

The HC-SR501 PIR Sensor Module

  • Working voltage : 5v to 20V DC
  • Range : 3 to 7 meters
  • Induction Lens size: 23mm.
  • PCB Size: 32mm x24mm.
  • Pins Details
    • Ground pin
    • VCC pin
    • The output pin detects an object when it is at a high logic level.
  • Two potentiometers.
    • One for adjusting the sensitivity of the sensor
    • Adjust the time for the output signal to stay high when an object is detected from 0.3 seconds up to 5 minutes.
  • Jumper Settings (Selecting the trigger modes)
    • non-repeatable trigger – when the sensor output is high and the delay time is over, the output will automatically change from high to low level.
    • Repeatable trigger –  will keep the output high all the time until the detected object is present in sensor’s range

Arduino Example code :

Circuit

Code

/* Arduino PIR Motion Sensor Tutorial */
/* www.ArunEworld.com */

int pirSensor = 8;
int relayInput = 7;

void setup() {
  pinMode(pirSensor, INPUT);
  pinMode(relayInput, OUTPUT);
}

void loop() {
  int sensorValue = digitalRead(pirSensor);
  if (sensorValue == HIGH) {
    digitalWrite(relayInput, LOW); // The Relay Input works Inversely
  }
}

Code Explanation

This Arduino code is for a PIR (Passive Infrared) motion sensor setup, where a relay is controlled based on motion detection. Here’s an explanation of each part:

SectionExplanation
CommentsThe code includes comments providing information about the purpose of the code and its source.
Variable DeclarationpirSensor = 8;: Declares a variable pirSensor and assigns pin 8 to it for reading the PIR sensor’s output. – relayInput = 7;: Declares a variable relayInput and assigns pin 7 to it for controlling the relay.
Setup FunctionInitializes the pins: – Sets pirSensor pin as INPUT to receive data from the PIR sensor. – Sets relayInput pin as OUTPUT to control the relay.
Loop Function– Reads the digital state from the pirSensor pin to check for motion detection. – If motion is detected (sensor value is HIGH), it turns on the relay by setting the relayInput pin LOW.

Embedded Compiler – IAR Workbench

IAR Embedded Workbench is a popular integrated development environment (IDE) for embedded systems development (compiler). It provides a complete set of development tools for building, debugging, and optimizing embedded applications for a wide range of microcontrollers.

Key features of IAR Embedded Workbench include:

  1. Compiler and Debugger: IAR Embedded Workbench comes with a highly optimizing C/C++ compiler and a powerful debugger that supports various debugging features such as breakpoints, watch windows, and real-time trace.
  2. Editor and Project Management: It offers a feature-rich code editor with syntax highlighting, code completion, and project management capabilities to organize your source files, libraries, and build configurations efficiently.
  3. RTOS Support: IAR Embedded Workbench provides support for various real-time operating systems (RTOS) commonly used in embedded applications, allowing developers to build and debug multitasking applications seamlessly.
  4. Peripheral Simulation: It includes built-in peripheral simulators for popular microcontrollers, enabling developers to simulate I/O operations and test their code without the need for physical hardware.
  5. Code Analysis and Optimization: The IDE offers advanced code analysis tools to identify potential issues, optimize code size and performance, and ensure code compliance with industry standards and best practices.
  6. Integration with Version Control Systems: It seamlessly integrates with version control systems such as Git and Subversion, allowing multiple developers to collaborate on projects and manage code revisions effectively.
  7. Support for Multiple Architectures: IAR Embedded Workbench supports a wide range of microcontroller architectures from leading semiconductor manufacturers, including ARM, AVR, MSP430, and more.

Overall, IAR Embedded Workbench provides a comprehensive development environment tailored for embedded systems developers, helping them streamline the development process, reduce time-to-market, and achieve high-quality, reliable embedded applications.

Read more: Embedded Compiler – IAR Workbench

how to print to debugger console in IAR?

  • you have to do is to #include <stdio.h>  and use printf() in your code.

Steps to follow

  • Project options -> Linker -> Output (tab)
  • In the “Format” section where you have selected “Debug information for C-SPY” you need to have “With I/O emulation modules” checked (this requires “with run-time control modules”)
  • Printf results you can see in View -> Terminal I/O from the top menu.

Reference

Getting Started with IAR Workbence for STM8

Procedure

  • 1. Projcet -> Create a new project -> Toolchain -> STM Series Praject Template -> Empty Projcet
    (then click “Ok”).
  • Save Your Project (File -> Save worksapce)
  • Notes : The project will appear in the Workspace window.
  • By default, two build configurations are created—Debug and Release
  • Before you add any files to your project, you should save the workspace.

See More

IAR Shortcuts

  • UNDO – CNTL + Z
  • REDO – CNTL + Y
  • CUT – CNTL + X
  • Copy – CNTL +C
  • Paste – CNTL + V
  • Select All – CNTL + ALL
  • Find and Replace
    • Comment Multiple Lines – CNTL + K
    • Find – CNTL + F
    • Find Next – F3
    • Find Previous – SHIFT +F3
    • Search with multiple condition – CNTL + SHIFT + F
  • Navigation
    • Navigate Forward – ALT + LEFT
    • Navigate backward – ALT + RIGHT
  • Go to Definition – F12
  • Auto Indent – CNTL + T
  • Debug
    • Go – F5
    • Stop debugging – CNTL + SHIFT + D
    • Step Over – F10
    • Step Into – F11
    • Step Out – SHIFT +F10

FAQ

if you know the answerer of the below question, Kindly help to add the solution in this website

  • How to View the two files side by side in IAR IDE?

Embedded Interface – Touch Keypad

A touch keypad is an input device that allows users to interact with electronic devices by touching designated areas on its surface. It typically consists of a panel with sensitive touch sensors beneath, capable of detecting the presence and location of touch inputs. Touch keypads are commonly used in various electronic devices such as smartphones, tablets, ATMs, point-of-sale terminals, and household appliances like microwave ovens and washing machines. They offer advantages like sleek design, ease of use, and versatility in terms of layout and functionality.

Read more: Embedded Interface – Touch Keypad

TTP226

TTP226 based Module – 1

Here is the Specifications

FeatureDescription
On board 8 key TTP226 capacitive touch induction IC.Allows for capacitive touch sensing with 8 keys.
On board 8-way level indicator.Features an 8-way level indicator on board.
Working voltage2.4 V to 2.4 V
ModulesAllows for setting output mode, key output mode, the longest time, and fast/low power output.
PCB board sizeDimensions: 47.5 mm (width) x 46 mm (height).
Read more… →

Embedded Interface – EEPROM

AT24C128 I²C EEPROM Feature

  • Voltage
    • Low Voltage (1.8v to 3.6v)
    • Standard Voltage (2.7V to 5.5V)
  • Memory
    • 128K (16,384 x 8)
    • 256K (32,768 x 8)
  • I²C Interface (Bi-Directional data transfer protocol)
  • Speed
    • 1MHz(5v)
    • 400KHz(2.7v, 2.5v)
    • 100kHz(1.8v)
  • High Reliablility
    • 1 Million write cycles of endurance
    • 40 years of Data Retention

EEPROM Datasheet


 

Next Topic

Embedded Interface 7 Segment (Add Soon)
Embedded Interface ADC (Add Soon)
Embedded Interface Button (Add Soon)
Embedded Interface EEPROM (Add Soon)
Embedded Interface LCD (Add Soon)
Embedded Interface LCD HD44780 (Add Soon)
Embedded Interface LED
Embedded Interface MCP23017
Embedded Interface Motor (Add Soon)
Embedded Interface PCF8574 and PCF8574A
Embedded Interface RTC (Add Soon)
Embedded Interface Switch
Embedded Interface Touch Kypad
Embedded Interface RGB LED (Add Soon)

Embedded Interface – RTC

Application

  • Whats-app
    • Every mobile has an in-build RTC. Whatsapp is taking current time from mobile system processor using RTC function and send to WhatsApp server. Once Receptive is online he will receive the  message with a timestamp

Next Topic

Embedded Interface 7 Segment (Add Soon)
Embedded Interface ADC (Add Soon)
Embedded Interface Button (Add Soon)
Embedded Interface EEPROM (Add Soon)
Embedded Interface LCD (Add Soon)
Embedded Interface LCD HD44780 (Add Soon)
Embedded Interface LED
Embedded Interface MCP23017
Embedded Interface Motor (Add Soon)
Embedded Interface PCF8574 and PCF8574A
Embedded Interface RTC (Add Soon)
Embedded Interface Switch
Embedded Interface Touch Kypad
Embedded Interface RGB LED (Add Soon)

Embedded Interface – RGB LED

PWM -Pulse width Modulation

RGB LED

 

Type of RGB LED


 

Next Topic

Embedded Interface 7 Segment (Add Soon)
Embedded Interface ADC (Add Soon)
Embedded Interface Button (Add Soon)
Embedded Interface EEPROM (Add Soon)
Embedded Interface LCD (Add Soon)
Embedded Interface LCD HD44780 (Add Soon)
Embedded Interface LED
Embedded Interface MCP23017
Embedded Interface Motor (Add Soon)
Embedded Interface PCF8574 and PCF8574A
Embedded Interface RTC (Add Soon)
Embedded Interface Switch
Embedded Interface Touch Kypad
Embedded Interface RGB LED (Add Soon)

Embedded Interface – Switch

 

Slide Switch

 

Rotary Switch

 

Push Switch

These are either normally on (Push-to-break0, or normally off(Push-to-make). They can be latched, So they stay pressed down after you remove your finger, like the switches on a torch.

 

Micro Switch

 

Reed Switch

These are magnetically activated


 

Next Topic

Embedded Interface 7 Segment (Add Soon)
Embedded Interface ADC (Add Soon)
Embedded Interface Button (Add Soon)
Embedded Interface EEPROM (Add Soon)
Embedded Interface LCD (Add Soon)
Embedded Interface LCD HD44780 (Add Soon)
Embedded Interface LED
Embedded Interface MCP23017
Embedded Interface Motor (Add Soon)
Embedded Interface PCF8574 and PCF8574A
Embedded Interface RTC (Add Soon)
Embedded Interface Switch
Embedded Interface Touch Kypad
Embedded Interface RGB LED (Add Soon)

Embedded Interface – ADC

  • The analog signal is continuous in time and it is necessary to convert this to a flow of digital values. It is therefore required to define the rate at which new digital values are sampled from the analog signal. The rate of new values is called the sampling rate or sampling frequency of the converter.
  • The most common ways for implementing ADC are direct conversion, successive approximation, ramp compare, Wilkinson, integrating, delta encoded, pipelined, sigma-delta, time-interleaved, intermediate FM stage, other types.
  • A successive-approximation ADC uses a comparator to successively narrow a range that contains the input voltage.
  • The values are usually stored electronically in binary form, so the resolution is usually expressed in bits.
  • The number of discrete values available, or levels, is assumed to be the power of two.
  • Resolution can also be defined electrically and expressed in volts. The minimum change in voltage required to guarantee a change in the output code level is called the least significant bit.

Next Topic

Embedded Interface 7 Segment (Add Soon)
Embedded Interface ADC (Add Soon)
Embedded Interface Button (Add Soon)
Embedded Interface EEPROM (Add Soon)
Embedded Interface LCD (Add Soon)
Embedded Interface LCD HD44780 (Add Soon)
Embedded Interface LED
Embedded Interface MCP23017
Embedded Interface Motor (Add Soon)
Embedded Interface PCF8574 and PCF8574A
Embedded Interface RTC (Add Soon)
Embedded Interface Switch
Embedded Interface Touch Kypad
Embedded Interface RGB LED (Add Soon)

Embedded Interface – Motor

Example

  • DC Motor
  • Stepper Motor
    • Bipor Stepper Motor
    • Unipolar Stepper Motor.
  • Servo Motor

 

Next Topic

Embedded Interface 7 Segment (Add Soon)
Embedded Interface ADC (Add Soon)
Embedded Interface Button (Add Soon)
Embedded Interface EEPROM (Add Soon)
Embedded Interface LCD (Add Soon)
Embedded Interface LCD HD44780 (Add Soon)
Embedded Interface LED
Embedded Interface MCP23017
Embedded Interface Motor (Add Soon)
Embedded Interface PCF8574 and PCF8574A
Embedded Interface RTC (Add Soon)
Embedded Interface Switch
Embedded Interface Touch Kypad
Embedded Interface RGB LED (Add Soon)

Embedded Interface – LCD

Examples

  • Display Character
  • Display String
  • Display Decimal
    • Display one Digit Decimal
    • Display Two Digit Decimal
    • Display Three Digit Decimal
  • Auto scroll Display
  • Blink
  • Cursor On/Off
  • Custom Character
  • Display
  • Hello world
  • Scroll
  • Serial Display
  • Set Cursor
  • Text Direction

LCD Interface with Micro-controllers

Different LCD Displays

  • Nokia 5110 LCD Module with PCD8544 
  • Nokia 6610 
  • OLEDs 
  • 2×16 LCD- hd44780 
  • Nextion Display 

 

 

Next Topic

Embedded Interface 7 Segment (Add Soon)
Embedded Interface ADC (Add Soon)
Embedded Interface Button (Add Soon)
Embedded Interface EEPROM (Add Soon)
Embedded Interface LCD (Add Soon)
Embedded Interface LCD HD44780 (Add Soon)
Embedded Interface LED
Embedded Interface MCP23017
Embedded Interface Motor (Add Soon)
Embedded Interface PCF8574 and PCF8574A
Embedded Interface RTC (Add Soon)
Embedded Interface Switch
Embedded Interface Touch Kypad
Embedded Interface RGB LED (Add Soon)

Embedded Interface – 7 Segment Display

Example

  • One 7-Segment Display
    • Display Character
    • Display Decimal
  • Multi 7 Segment Display
    • Display Character
    • Display Decimal

Next Topic

Embedded Interface 7 Segment (Add Soon)
Embedded Interface ADC (Add Soon)
Embedded Interface Button (Add Soon)
Embedded Interface EEPROM (Add Soon)
Embedded Interface LCD (Add Soon)
Embedded Interface LCD HD44780 (Add Soon)
Embedded Interface LED
Embedded Interface MCP23017
Embedded Interface Motor (Add Soon)
Embedded Interface PCF8574 and PCF8574A
Embedded Interface RTC (Add Soon)
Embedded Interface Switch
Embedded Interface Touch Kypad
Embedded Interface RGB LED (Add Soon)

Embedded Interface – Button

Examples

  • LED ON/OFF Using Button
  • Button De-bounce
  • Four Button (UP, DOWN, ENTER, BACK)
    • Set Value By Four_Buttons using 7 Segment Display
    • Set Value By Four_Buttons using LCD Display
  • Matrix Keypad
    • Set Value by Matrix Keypad using 7 Segment Display
    • Set Value by Matrix Keypad using LCD Display
    • Display characters by Matrix Keypad using 7 Segment Display
    • Display characters by Matrix Keypad using LCD Display

 

Next Topic

Embedded Interface 7 Segment (Add Soon)
Embedded Interface ADC (Add Soon)
Embedded Interface Button (Add Soon)
Embedded Interface EEPROM (Add Soon)
Embedded Interface LCD (Add Soon)
Embedded Interface LCD HD44780 (Add Soon)
Embedded Interface LED
Embedded Interface MCP23017
Embedded Interface Motor (Add Soon)
Embedded Interface PCF8574 and PCF8574A
Embedded Interface RTC (Add Soon)
Embedded Interface Switch
Embedded Interface Touch Kypad
Embedded Interface RGB LED (Add Soon)

Embedded Interface – LED

 LED (Light Emitted Diode)

LED Symbol

 

How to Identify the LED Positive and Negative Leads ?

  • Long lead is positive(+) and small lead is negative(-)
  • Round circle lead is positive(+) and flat lead is negative(-)

 

LED Chemical Substance

Summary of LED Colors and Common Chemistries

Color Wavelength Materials
Amber 605-620 nm Gallium arsenide phosphide, Aluminum gallium indium phosphide
Blue 430-505 nm IInGaN (Indium Gallium Nitride), Gallium nitride, Silicon carbide, Sapphire, Zinc selenide
Green 550-570 nm Aluminum gallium phosphide, Gallium nitride
Infra-Red 850-940 nm Gallium arsenide, AL GaAs (Aluminum Gallium Arsenide)
Red 630-660 nm AL GaAs (Aluminum Gallium Arsenide), Gallium arsenide phosphide, Gallium phosphide
Ultraviolet 370-400 nm Indium gallium nitride, Aluminum gallium nitride
Violet 410-420nm
Yellow 585-595 nm Aluminum gallium phosphide, Gallium arsenide phosphide, Gallium phosphide

 

LED Light wave length
Excel To HTML using codebeautify.or

WaveLenth LED APPLICATION
410nm-420nm(violet) Skin therapy
430nm-470nm(blue) Dental curing instrument
470nm(blue) White LED’s using phosphor, blue for RGB white
520nm-530nm(green) Green traffic signal lights, amber for RGBA white lights
580nm-590nm(amber) Red signal lights, red for RGBA white lights
630nm-640nm(red) Blood oximetry
660nm(deep red) Skin therapy
680nm(deep red) Night vision illuminators and beacons for use with night vision goggles or CCD’S
800nm-850nm(near IR) Photo electric controls
940nm(near IR) Convert illumination CCD based systems

 

Reference  : http://www.goldwynled.com/knowledge-bank/led-basics

 


 

GLOW LED

LED ON

LED OFF

LED Blink

 

LED Application

  • Status Indicator
  • WiFi Router Status Indicator (Blink LED-Internet Status)
  • Charge level Indication in mobile power-bank [Blink LED – Single RGB LED or Multiple Color LED)
  • Bike Automation
    • Bike Turn Indicator (LED Blink – while turned)
    • Bike Side stand indicator (LED Glow -if Side stand is not took)
  • Car Automation
    • Car Turn Indicator (LED Blink – while turned)
    • Car Door Status indicator(LED Glow -if Door is not close or opened)

Examples

  • LED ON/OFF
  • LED Blink using Delay Function
  • LED Blink using Timer Function
  • LED as a Status Indicator(Using condition Check)Button

Next :

Previous :