Fluid Edge Themes

  GEMscript and Virtual Machines  If you've been using GEMstudio, you’re probably familiar with our programming language, GEMscript. We designed GEMscript to be a user-friendly, C-like language with the intention of enabling a “write once, run anywhere” approach. This means it can be used seamlessly across all our platforms, including GEMplayer on PC and various hardware devices.  GEMscript is a VM (virtual machine) based language, meaning your code gets compiled into "bytecode" and runs in a VM interpreter instead of being compiled down to native machine code. This allows us to achieve our goal of running the same compiled code across multiple platforms. Additionally, by sandboxing GEMscript from our OS in a VM, we avoid some pitfalls of writing in native C, such as unsafe memory access and code execution. However, there’s a big trade-off when using VMs: speed.  It's no secret that VMs are generally slower than native machine code. Therefore, optimizing VMs is crucial, particularly for limited hardware where every bit of speed counts. So, I rolled up my sleeves and started exploring ways to optimize our code. And guess what? I found a neat and easy trick for speeding up opcode dispatch. This article discusses the performance improvements I achieved by optimizing opcode dispatch in GEMscript using GCC's "Label as Value" feature, demonstrating a significant speed increase.  Enhancing VM Performance: Speeding Up Opcode Dispatch  When I started looking at our VM, I realized that focusing on opcode dispatch could yield significant performance gains. Efficient opcode dispatch is key to faster execution because it reduces the overhead of interpreting each instruction in the VM. Let me put this in simpler terms:  Imagine you’ve got a list of vocabulary words to study. One way to do this is by using the index at the back of a dictionary. For each word, you:  Look up the page number in the index.  Flip to the correct page to read about the word.  Return to the index for the next word.  Doing this for each word is straightforward but slow and tedious.  Now, imagine using index cards with all the vocabulary words printed in order. For each word, you:  Read the information on the top index card.  Move instantly to the next card.  No more flipping back and forth! This method is much faster and more efficient, even though it takes a bit of effort upfront to set up the index cards. Similarly, by optimizing our opcode dispatch, we can make our VM run instructions more quickly and efficiently.  The Basics of VM Interpreting  Let’s start with a basic interpreter loop for a VM, which is similar to using the dictionary index method. Instead of a list of vocabulary words, we have bytecode, which is a list of opcodes in memory. Instead of searching an index for the correct page, we use a switch statement, with each opcode case representing a different operation. This switch case is in a loop, so we repeatedly look for our current opcode and execute it until we run out of opcodes. Here’s a simple example in C:  void runVM(){     uint32_t pc

The continuing advancement in capacitive touch technology has made it possible for modern capacitive touch screens to become the leading, or primary, user interface of choice. Early capacitive touch screens were limited in capability, whereas today's touch screens can detect multiple fingers, reject water, know when gloves are worn, and work through thick protective glass or acrylic. With 25 years in the industry, Amulet has had a front-row seat to the many advancements in capacitive touch technology and has taken a keen interest in how best to utilize this tech in our products. Here is a little about the background and the most noteworthy changes in features that will help inform your decision in choosing the correct touch display for your next project. Early History Capacitive displays were limited in capability due to hardware and software constraints when first released commercially in the early 90's. The early capacitive screens typically used less capable electronics and less sophisticated sensors, which limited their sensitivity and resolution. The electrodes that formed the capacitive grid on these early screens were often larger and spaced widely, which reduced the precision with which touches could be detected. This configuration made it difficult to accurately register delicate or light touches. It effectively prevented the implementation of features like multi-touch, which require the detection of multiple points of contact with high accuracy. Moreover, the signal processing algorithms utilized in early capacitive touch controllers were not as advanced as they are today. These initial algorithms faced significant challenges in differentiating between intentional touches and environmental noise or unintended touches, such as those caused by water droplets or accidental palm touches. However, with the advancements in technology, these algorithms have significantly improved, allowing for more accurate touch detection and interpretation. Advancements in manufacturing techniques were not the only factors that propelled the evolution of touchscreen technology. The strides made in microprocessor design and digital signal processing algorithms were equally significant. These developments, combined with the creation of smaller and more densely packed electrode grids, enhanced the touchscreens' ability to detect and interpret a broader range of touch interactions with greater accuracy. These advancements result in the sophisticated, highly responsive capacitive touchscreens we use today, supporting complex gestures and touch filtering across various devices. Capacitive Technology Enhanced Features Recent enhancements in capacitive touchscreen technology have revolutionized how users interact with devices in various environments. These advancements include multi-touch capabilities, water rejection features, improved glove detection, and the integration of protective cover glass, each contributing significantly to the functionality and usability of touch-driven interfaces. Multi-Touch Capability The introduction of multi-touch capability, which allows a touchscreen to recognize and respond to more than one point of contact simultaneously, was a significant leap forward in capacitive touch technology. The real breakthrough came with the introduction of advanced capacitive sensors and sophisticated signal-processing algorithms. These sensors featured finer, more densely packed electrode grids that could capture more detailed changes in the electrostatic field caused by multiple fingers. The algorithms could interpret complex electrical activity patterns, distinguishing between tracking numerous touches. This technology was crucial for developing intuitive

In the realm of embedded firmware engineering, creating a product that not only functions flawlessly but also boasts a superior Human-Machine Interface (HMI) is a challenge worth embracing. For engineers with advanced technical experience but limited exposure to User Interface (UI) and User Experience (UX) design, differentiating your HMI from the competition may seem daunting. Fear not – in this guide, we'll explore practical strategies to set your HMI apart without delving into the intricacies of UI/UX design.      1. Start with User-Centric Functionality   While your focus may be on your product's technical intricacies, it's essential to approach HMI differentiation from a user-centric perspective. A notable quote from Marc Gobe’s book Emotional Branding is, “The question for designers should not be, how do we make this product work? That’s a given- the only question is how do we make this product worth working with?” Identify the key functionalities that resonate with your target audience and ensure your HMI prioritizes a seamless user experience. This approach could involve simplifying complex processes, streamlining workflows, or offering unique features directly addressing user needs.      2. Leverage Pre-Built Templates and Design Tools   UI/UX design may not be your forte, but you can still benefit from existing design resources. Look for HMI solutions that offer pre-built templates and user-friendly design tools. These resources can help you create a polished and professional interface without the need for extensive design expertise. Check out our article on using UI kits and how they can help supplement your design process.      3. Prioritize Customization Without Complexity   Differentiation often lies in customization. Offer users the ability to tailor their HMI experience without overwhelming them with complexity. Allow straightforward customization options, such as choosing color schemes, arranging widgets, or adjusting display preferences. This customization empowers users to personalize their experience without requiring advanced design skills.      4. Integrate Advanced Functionality Thoughtfully   While advanced technical features can set your HMI apart, thoughtful integration is critical. Avoid overwhelming users with a myriad of complex options. Instead, focus on implementing advanced functionalities that enhance the user experience without sacrificing simplicity. Provide clear documentation and support to help users leverage these features effectively.      5. Continuous Improvement Through User Feedback   Even without a UI/UX design background, you can continually enhance your HMI by actively seeking user feedback. The most surefire way to ensure your product's HMI wins market viability is to start the design process with user feedback and testing. The product teams with a test early and often mentality are the most successful at producing a top-notch product and saving the company money on costly redesigns. Establish channels for users to share their experiences, suggestions, and pain points. Use this feedback to make iterative improvements, ensuring your HMI evolves based on real-world user interactions.      Embrace the Power of User Experience Design    For engineers accustomed to intricate technical controls, bridging the gap between complexity and simplicity in your HMI is crucial. Enlist the expertise of a user experience designer to help facilitate the user's needs, create intuitive navigation and controls that are easy for users to understand and

In the ever-evolving world of touchscreen technology, two types of touchscreen technology have predominantly occupied the market: resistive and capacitive touchscreens. Each of these technologies offers unique features and caters to different applications. Let's dive into a comparative analysis to understand their distinct characteristics and help you make the correct choice for your application. Resistive Touch The structure of resistive touchscreens is very simple. The resistive touch screen consists of two transparent conductive layers separated by a small gap. When the screen is touched by pressure using either your finger or stylus, these two layers make contact creating an electrical connection at the point of touch. The X-Y coordinate of the point of contact can then be easily determined.   This touch technology was introduced in the mid-70s and is still widely used today. The list of pros and cons determines the type of application it’s best suited for. Resistive Pros: 1. High Precision: These screens are highly precise with stylus-based inputs, making them ideal for handwriting recognition and drawing applications. The widely known Palm Pilots is a good example of using a plastic stylus to write text and input data. 2. Durability: They are resistant to water and dust, hence preferred in industrial environments or outdoor use. Since water and dust don’t apply enough pressure to force contact between the layers, no false touches are recorded. Outdoor equipment control and public car washes are where you can find applications utilizing the resistive touch screens. 3. Pressure Sensitive: Gloves can be worn while operating the touchscreen, as you can still apply force pressure to make contact with the electrical layers. Equipment used in garages where mechanics are forced to wear gloves is an environment that lends itself to using resistive touch displays. 4. Cost-Effectiveness: Generally, less expensive to produce, resistive touchscreens are a go-to for budget-friendly devices. Because of the simple mechanical structure without any solid-state components, the resistive touchscreens are considered a lower-cost solution as opposed to capacitive touchscreens. For applications where low cost is a major requirement, the resistive touch is the better choice. Resistive Cons: 1. Lower Clarity: The multiple layers can reduce the screen's clarity and brightness. 2. Low Sensitivity: They require a fair amount of pressure to operate, which can be less intuitive compared to the light touch of capacitive screens. 3. Wear and Tear: Since resistive touch is an electro-mechanical structure, the top layer is susceptible to scratches and can wear out over time. A sharp object can easily puncture the top layer, damaging the electrical connection. A protective glass is not possible, as the top layer needs to be elastic. The stretching caused by the constant touches can wear out the elasticity of the outer layer. Capacitive Touch Capacitive touchscreens determine the location of a touch by measuring the capacitance created when a finger touches the screen surface. Capacitive touchscreens are coated with a material that stores electrical charge. When a finger, which is also conductive, touches the screen, a capacitive coupling is created and measured to determine the location of the touch. This measuring is conducted by