Search Results for: STM32

Bit Band operations with ARM Cortex microcontrollers

I got few questions from our readers about the bit-band feature in ARM Cortex microcontrollers. It may seem to be a prominent topic, still may lead to come confusion while using bit-banding. So let’s look at this feature a little bit closer. Why use bit band? Simply speaking Bit banding method allows performing atomic bitwise operations to memory areas. Why use bit banding? The most straightforward answer is because ARM Cortex doesn’t have something like BIT CSET or BIT CLEAR commands like most of the 8-bit microcontrollers do. So this is somewhat a workaround solution. Another question may rise – Why not using the read-modify-write method? Again this method is not reliable in some cases. For instance, f there is an interrupt during this operation; it can cause data corruption. Other situation may occur in embedded OS when different tasks may modify the same memory location. So we want a method that allows setting or clear individual bits with a single instruction. This is where the bit band method helps.

Continue reading

The impact of touch screen on gaming

Touch screen technology has been on the market for a while now – specifically for gaming devices – although it’s only in the last 10 years that this translated to mobile technology. It has boosted online gaming numbers because of the ease of use on mobile phones, but how exactly has touch screen technology improved? The primary type of touch screen currently used in mobile technology (especially the iPhone) is a capacitive screen; these work with anything that holds an electrical charge – including human skin. They’re made up of materials that hold charges in an electrostatic grid of either a surface or projective screen. Resistive screens are analog devices that create a connection between two flexible resistive screens. They use your finger’s pressure to create a change in the flow of electricity; when a finger is placed on the mobile, a voltage drop is registered that allows the screen to work.

Continue reading

Thoughts on interfacing piezo vibration sensor

piezo vibration sensor test with oscilloscope

Some time ago, I purchased a MiniSense 100 Vibration sensor. I probably had some project in mind, but it happened that it dived into drawer among other “to do” things.  I thought it’s time to try a few things with it. Piezo sensor MiniSense 100 is very sensitive with a pretty good frequency response and is linear (±1%). As you can see, high sensitivity is achieved with a 0.3-gram inertial mass at the end of the film. As there is a hole in the mass, you probably can screw in an additional mass and increase sensitivity even further. Probably there is no need to explain where such a sensor would be helpful. These could be vibration/ motion sensors, impact sensors, and other areas where motion and acceleration are involved. Usually, sensitivity is 1V/g. Where g is standard gravity or standard acceleration due to free fall and is equal to 9.80665m/s2. As a mechanical device, it also has a resonant frequency of 75Hz. At this point, sensitivity reaches 5V/g.

Continue reading

Basic touch screen routines up and running

STm32 touch screen

STM32103ZET6 prototyping board comes with LCD having touch screen capability. It is a great way to interact with the device. Practically speaking Touch screen is a resistive film that can be accessed as a regular potentiometer which value depends on the touchpoint. Depending on voltage drop, it is possible to calculate the coordinates. There is a touch screen controller that takes most of the hard work – it has an internal ADC that measures the voltage and sends a value to the microcontroller using one of the selected interfaces (I2C or SPI). There is a typical ADS7843 controller used in the board, which talks to the microcontroller using SPI. After playing around, I’ve put a messy code that reads touch screen coordinates. It is a glued code from various sources, so it is only to fix some results. Currently, the code reads many values, then averages to get rid of most garbage, and then calculates screen matching coordinates. This is the trickiest part to do. You can do this empirically by reading min and max ADC values for each axis and then calculate coordinates using formulas:

Continue reading

Multivibrator – back to basics

Multivibrator circuit is one of the first projects you start learning electronics. It is a beautiful circuit widely used for educational purposes and even in end projects as waveform generators. Lots of hobbyists grab a microcontroller/Arduino to blink LEDs. But using basic circuits like multivibrator may be cheaper, faster, and even fun. [Ray] decided to go through multivibrator theory and explain its working in detail step by step. The circuit itself consists of two transistors, two capacitors, and four resistors. When powered, the circuit generates a square wave signal that can be used to flash LEDs or clock other circuits. You will get an intuition on what causes multivibrator to develop generate. Formulas allow calculating resistor and capacitor values for a particular frequency. If you are a starter in electronics, build one on a breadboard and do some experiments, why not start with Christmas lights.

Continue reading

Driving LEDs with LPC2148 microcontroller

The LPC2148 development board is a mighty board with an ATM7TDMI series microcontroller considered an old guy compared to Cortex ones. But still, these are widely used and are powerful. The Development board has some handy features installed. 12MHz crustal allowing to run the processor at full 60Mhz speed. Couple RS232 ports, VGA connector, PS/2 connector for keyboard or mouse, 20-pin JTAG, SD/MMC slot, USB B-type, 8 LEDs driven with a serial-in parallel-out shift register, 2×16 LCD, buzzer, audio jack with an amplifier, two programmable buttons, and 256Kb of I2C interfaced EEPROM. The microcontroller itself has 512KB of internal flash and 32+8KB of RAM. All ports are accessible, and any external hardware can be disconnected with jumpers. This is a great board for prototyping and end application.

Continue reading

Using FreeRTOS kernel in AVR projects

FreeRTOS is known as Real-Time Operating System. It would probably be too dare to call it real-time-os, preferably a real-time scheduler where applications can be split into independent tasks that share complete processor resources by switching them rapidly. It. It looks like all functions are executed in parallel. This feature is called multitasking. There are many debates on using RTOS on AVR microcontrollers as they are arguably too small for the running scheduler. The main limitation is a small amount of ram and increased power usage. If you use lots of tasks in the application, you will probably run out of RAM to save context when switching between tasks. Consider FreeRTOS only if you use larger scale AVRs like Atmega128 or Atmega256. Indeed you can find smaller schedulers that are specially designed for smaller microcontrollers, even tiny series. On the other hand, if you master FreeRTOS, it can be used with multiple microcontrollers like ARM Cortex, PIC, and various compilers, including IAR, GCC, and Keil Rowley, Attolic. And the main reason to keep an eye on it – it is free. Probably it would take lots of time and space to go through RTOS theory. Some great information can be…

Continue reading

Mind/Though Controlled Robot Arms

The human mind is an excellent feature of God’s creation. Only with our mind, our body parts are controlled and made to do certain activities. Thus, when a person is brain dead, he cannot move his body or lift his arms and legs. The mind is the main thing needed to make the whole body function more effectively. Now, according to the new research study, the human mind can control robot arms. Robot arms are fitted to persons who have lost theirs in an accident or through some other means. For those who are disabled, just a mere robot arm which does actions only when a button is pressed doesn’t help. To make a more efficient and effective robot arm, scientists have created a robot arm that can be controlled by the person’s mind. The mind is used now though to control robot arms. The Rehabilitation Institute of Chicago introduced the first woman to be fitted with robot arms or bionic arm technology. This woman met with an accident, and her left arm was amputated from the shoulder. She has now been fixed with a robot arm with which she can now think and make the arm do the things…

Continue reading

Topobo – robot with kinetic memory

Robot toys are trendy among children these days. Especially DIY robot kits are getting more popular as these kits stimulate imagination and creativity. Topobo kit is becoming a most playful robot kit with kinetic memory where the assembled robot can memorize its motion and play it back. It is possible to teach robot various motions like animal walk, dance by simply guiding it. Three researchers of MIT Media Lab developed Topobo. This is not a new toy, but since 2003 it was used for various exhibits, and only a few lucky could try this toy. Now, this kit is widely accessible.

Continue reading