sig-gen (4)

My All-Digital Instruments Electronics Lab

I've been building up this set of equipment on my bench at home over the last few months, with some older kit reused. It's the minimum needed to do embedded development and I don't even have a bench power supply yet. I can get away without one since the dev kits are USB powered, but when I need one I have my eye on the Gophert NPS-1601 From top left to bottom right 1280 x 1024 @ 60 Hz VGA and DVI inputs, USB hub with 2 downstream USB-A. Was £360 in 2003. 13" 1920 x 1080 @ 60 Hz matte non-touch display Intel i5-5200 CPU @ 2.20GHz (Broadwell-U, 14nm, 2 cores, 4 threads) 8 GB DDR3 RAM, 256 GB SSD Liteon L8H-256V2G-11M.2 Intel HD Graphics 5500 Windows 10 Home USB3 Type A x2, Mini Display Port, 3.5mm phones/mic, SD Card slot Liteon disk results in AS SSD Benchmark 1.7 Read: Seq @ 514 MB/s, 4k @ 22 MB/s, Acc Time 0.12ms Write: Seq @ 225 MB/s, 4k @ 57 MB/s, Acc Time 0.08ms Review Reference Guide Full HD 1080p on DVI & VGA, 4k on HDMI Buy (Amazon) was £17 in 2021. Buy (Amazon) was £8 in 2016. 14…

Continue reading...

Improving frequency measurement performance by factor of three on STM32 by using DMA

This Youtube video by Controllers Tech shows how to use an STM32 to measure the frequency of an incoming rectangular wave using the input capture functionality of the timers. The code shown the video works but there are a few areas which could be improved, as I will now discuss. Then I make a performance improvement by using DMA instead of interrupts. The code is written using STM's HAL library which means that it does not have to handle the specific STM32's registers, which makes it more portable. However, HAL is still specific to the ARM and STM architecture, so you need to know what features are available in your internal peripherals to be able to write HAL function calls with the appropriate parameters. Initialising Global variables Controllers Tech declares a set of global variables at the top of main.c and initialises them to zero. Since we can rely on the C runtime to clear the RAM, this is unnecessary for globals and can use up code space and boot time. I would remove the initialisations unless it is thought likely that these lines would be moved into a function, making them local automatic variables, in which case they would need to be initialised.

Continue reading...

Replaying a captured 'scope trace using a Siglent DSO and FeelTech FY6900

When you are developing an embedded device, you often find yourself capturing an interesting signal with the 'scope that you would like to send back into your device. If you have invested in an Arb from the same family as your 'scope then this is as easy as moving a USB Flash drive from the 'scope to the Arb, but such Arbs are not the cheapest option out there. Since choosing the FeelTech FY6900 as my Arb, I found that it's software "DDS Signal PC Software" can import a list of points but the format is not the same as exported by the Siglent SDS 1104X-E. So I wrote a utility to convert from one to the other, and with some additional options. This is a utility for converting scope captures from a Siglent Digital Storage Oscilloscope into a format which is usable by a FeelElec FY6900 DDS Function/Arbitrary Waveform Generator so that it can stored in one of the Arb memories for replay. This utility is only a file converter and does not communicate with the FY6900, so you need to have installed the FeelTech “DDS Signal PC Software” and the USB cable so that the resultant waveform can…

Continue reading...

Choosing a Signal Generator

A common problem in embedded firmware development is having to develop routines which read-in a given signal. Usually you have a sample device available which can produce the required signal on demand, but it is not always quick and simple to get this signal when you need it, and to get an exactly repeatable version of it. For example, if it is a sensor signal, then the signal will vary according to the sensed parameter (temperature, humidity, light) and will vary just due to noise so that it is difficult to get exactly the same signal twice. Even if you have the sample device and it can be made to produce the signal, it can be bulky, heavy or power consuming and so difficult to have on your desk along with your prototype hardware. Therefore there is often a need for some sort of signal generator which can act as a stand-in for the signal from the sample product during development. Starting Small At one end of the scale you have simple analogue oscillators which can produce sine, square, triangle and pulse waveforms with continuous frequency and amplitude adjustments. Whilst it is not difficult or expensive to build the simplest…

Continue reading...