Introducing PSoC

May 19, 2011 Leave a comment

After a long period of silence I am finally back to business. Two months ago I have ordered a Cypress CY8CKIT-001A development kit for PSoC 1/3/5 (at the picture). Unfortunately the first board arrived DoA so the whole RMA and reorder took some time. The second board fortunately is working fine.

Cypress CY8CKIT-001A

The main board features are:

– PSOC 1/3/5 compatibility

– USB connectivity – and that one was the most important for me

– RS232

– CapSense touch buttons + slider

– potentiometer

– 1602 LCD

– breadboard area

It might miss few things but for a bit less than 300EUR is a really good value for money.

So for the last week I was learning how to program the PSoC3. Starting from the very basic tasks and later on moving to the ADC or CapSense. The target is to start with USB development. Also thanks to the programmable digital logic on the chip the Verilog language has made into my list of “to do”.

The PSoC3 delivered with the kit is a ES2 version. Cypress promised to replace that engineering sample with a normal one. Good job. I would never expect that so I was really happy to hear about it.

Categories: USB

PS/2 to RS232 bridge

November 10, 2010 Leave a comment

For the project that I will present within the next two weeks I need a way to debug the PS/2 transmissions. The easiest way would be to simply connect to the cable using the logic analyser but I don’t have one so I used a different approach. As shown in my previous post I wrote a RS232 TX. Later on I added a PS/2 receiver to it. This works and allows to debug the PS/2. The total time spent for development and testing sums up to 12 hours.

Categories: VHDL

RS232 transmitter

October 29, 2010 Leave a comment

For almost a year I had a Spartan3E starter kit waiting for the right moment. I bought it to use it for LabVIEW FPGA and for some Linux projects. Since the LabVIEW FPGA took me only a little time the board was catching dust since then. Now I have an idea how to use it. In the last few days I refreshed my VHDL and went through the manual for Xilinx ISE environment once again. The first module that I need is a RS232 TX. I did not wrote such core in few months so it took me two hours to make a first test core. It sends out the predefined byte once per second. I verified the core yesterday and it works (19200baud, 8N1). There is no part that will stay unmodified and some other elements will be added (as bit reordering). The project is pure VHDL, no schematics or anything like that.

Categories: FPGA

9201 a second compact module has arrived

October 18, 2010 Leave a comment

I recently bought a used NI 9201 module. That is a 8 channel 12-bit analog-to-digital module that has an aggregated sample rate of 500ksps. I will perform the functional test of the module by Wednesday but it passed the self test so I don’t worry about it. I plan to use the module for data acquisition in my spectrography project. It will sample the voltage generated by the photodiode and perform low speed sampling on other sensors such as temperature sensor (preconditioned).

Now my laboratory has a new item and I really hope I will be able to get one of the cRIO chassis on e-bay🙂

And speaking of the current project – I have a request for verification the 500-530 nm waves transmission/reflection. This made me to look for some informations on spectrography. The first design is just a concept. I will make a spectrograph using diffraction grating and LED as a source. Using semiconductor parts that emit or detect a narrow band of spectrum can significantly simplify the equipment.

Categories: Equipment, Lab, LabVIEW

Configuration/settings/options dialog in LabVIEW

October 15, 2010 Leave a comment

For a long time I used the default LabVIEW dialog templates to build my own configuration/options/settings dialog. Of course they are really useful when the program is small and require just several parameters. The problem start at the moment when the number of parameters grows. At that point the dialog which holds the settings becomes unclear and overloaded with information. Everyone should try to reuse the best solutions of other systems and port them to LabVIEW. I’ve decided to make a dialog that can hold the application settings in the form similar to the one that pops up when Tools->Options is clicked (in LabVIEW, screen-shot is presented below).

So this is the layout that I copied. The original dialog uses a list to show the categories. My VI has a tree control so the designer can use branches to clear up the whole view. The drawback is that the easiest event to detect was the doubleclick so the category is changed that way. It shouldn’t be hard to detect a single click but I did not want to add much code. This way it is just the UI plus a simple algorithm to change pages. The LabVIEW UI shown below is built around three splitter bars that create four areas. One area for the ok/cancel/help buttons, one for the tree control that holds categories, one area for the top label with the name of the active category and one area for the tab control which holds the settings controls.

National Instruments page has a communities section. One of the communities addresses the UI (UI Interest Group). I published the VI there so you can download it and give it a try.


Categories: LabVIEW

Power Point or….? Beamer!

October 8, 2010 Leave a comment

Since I read the Doxygen tutorials I planned to prepare a presentation for my colleagues. For many years I used the Power Point, but now I am really disappointed. The latest version 2010 is worse than the previous ones. Not so long ago I spent few days to make a presentation about UI upgrade of one of my programs. At the end I applied the theme and the presentation just didn’t look good. Microsoft added a lot of fancy themes to the latest edition but all the traditional ones are no longer available (at least in the vanilla installation). Maybe they are on the internet but I want to have them immediately available and not to look for them at the MS site. All that pushed me to look for something different. The Doxygen has an option to export the documentation in LaTeX format. I learned a bit of LaTeX last year when I prepared my thesis at the postgraduate studies. So now I use Beamer. There is a great introduction to it at   also the Not so short introduction to LaTeX is useful during the preparation of the slides. I will post the completed presentation next week.

Another tool that is worth looking at is the beamerposter class. I am preparing a poster that presents my achievements. My first idea was to simply prepare a leaflet but if I have all the information in plain text then I can simply produce a nice looking poster.  The only drawback of the beamerposter is that there is no tutorial for it. But there are examples and if you know LaTeX and Beamer then this is no big deal to sit down and learn from them.

Categories: Uncategorized


September 30, 2010 Leave a comment

At the moment I am ready to restart one of my projects that I will describe in details later on. Cutting it short – it will use an ARM Cortex-M3 microcontroller with USB connectivity. One of my concerns is the documentation of the code that will write as it might happen that someone will need to modify my code in future. I also have a similar situation at work so I’ve decided to look for an open source program that can auto-generate the documentation from C language code. After a short search I found Doxygen which can create a documentation from C,C++,C#,PHP,Python,VHDL and some other languages. The comments in the code need to be adapted to work with it but it doesn’t take much time and after some time it is done automatically. The documentation is good and most of the tutorials are listed at the Doxygen page ( I just spent a short amount of time reading the documentation but I see that I will probably use it as it suits my needs.  I really like the layout that is created in the HTML. You can see it on a picture below, and it took me only minutes to create a dummy code and run documentation generation on it. Actually I think I will prepare a short presentation for my co-workers so they can give their opinions about it. A description from the daily work with Doxygen (and maybe the presentation if I will prepare it) will follow.

Categories: Uncategorized