7 items are tagged with learning:
Some more memories
While looking at my parents attic for some old stuff of mine I not only found my old electronics experimenters kit, but also my old Lego boxes. My son already got the more generic bricks I owned as a kit (together with all the sets he got for Christmas and his birthdays already). But I also owned a whole lot of Lego Technic sets, and bought myself a Mindstorms RIS shortly after they came out. And while digging around in the attic I found the latter one…
This is the original RCX version 1.5, still complete with the yellow brick and the infrared tower (connected via serial port). I also added the accessory kit later on.
Continue readingMigrating the frequency counter to PSoC5
In the last article I ended with the question whether to move on on the PSoC4 and add some features, or to move over to the PSoC5 before doing so. Since I would need a DAC for the next stepping (adding a comparator with variable trigger level), I took a deeper look at the PSoC4 data sheet.
It comes with two DACs, but since they are current output DACs, I would need an external resistor. Since the LCD shield doesn’t leave me with a way of adding components on top of the Pioneer kit, I decided to move the project over to the PSoC5 (which has two voltage output DACs).
Continue readingImproving the PSoC4 frequency counter
So in the first part we have seen that the PSoC can implement nearly anything you can draw as schematic from logic gates (or analog building blocks, though I didn’t use any). But the solution I implemented doesn’t make use from any of the PSoC-specific features. So in this part of the series, I will show what we can use and how it makes out life easier.
Continue readingStarting the PSoC frequency counter series
Time to get started with the PSoC series. In this first article, I will look the simplest frequency counter implementation - using a gated timer. I will show how a project is set up using PSoC Creator (I’m using version 2.2 here still, but you might also use the newly-released version 3.0).
This simple form of frequency meter is born by the definition of frequency: it just counts the number of pulses which can be detected in a time period of one second. So we need:
- a source for a one second pulse
- a counter (counting the pulses)
- a gate which starts, stops and resets the counter
One can implement this in pure hardware, but this will end up in a kind of “TTL grave” because you need oh so many ICs… So I will show how to transfer this kind of frequency counter in a single PSoC.
Continue readingImplementing the frequency counter part 2
So it’s finally time for the second part of my implementation. It took a while longer than intended, part because I changed more than originally intended.
Main goal was to connect to CPLD to a micro controller, to read out the counter results. The easiest way for the MCU would have been to provide a serial data stream (like SPI). But since we have 48 bits to transfer, I would need a 48 bit shift register - and there aren’t 48 registers left in the XC9572XL. So I did go an easier route and just build up a large multiplexer.
Continue readingImplemementing the frequency counter part 1
So this was long time since the last post. Working with a CPLD for the first time wasn’t trivial, and there are so many other things to do…
I will split this up into two parts, the first showing the frequency counter stuff itself, the second one dealing with connecting it to an MCU and showing the results.
Since I had already drawn a schematic for the simulation, which also worked fine, I decided to implement in the CPLD with a schematic also. I thought that it wasn’t too complex, and wanted to save the effort to learn VHDL or Verilog for later. It turned out to be a mixed success, mainly because the Xilinx schematics editor seems not to be intended to be used for larger projects (though it has some interesting features, it also has some quirks making stuff complicated).
Continue readingStarting with the frequency meter
The original plan for my first real CPLD project was to build a NCO (numerically controlled oscillator), which in turn should be used to build a wave generator. But shortly after I happened to find a SPG8640BN chip in my parts bin. This nice chip, which is unfortunately not produced anymore, produces a square wave output from 1 MHz down to 1/120th Hz, in 57 steps. I build a small generator with it, with 16 frequency steps between 83.3 Hz and 100 kHz. So there was no immediate need for a NCO (especially since I found a MAX038 beneath it), and I decided to build a frequency meter instead.
Continue reading