Recently, Arduino-like boards have surprised no one, as well as Chinese clones of these. This article will focus on the Arduino-compatible card from Cypress Semiconductor - the CY8CKIT-042 PSoC 4 Pioneer Kit , which can be a good alternative both for its capabilities and for its highly functional IDE.
What it is
This kit is based on the PSoC 4 chip, which, in turn, is based on the Cortex M0 core and has 4k RAM and 32k ROM. In addition, there are a lot of analog peripherals onboard - two operational amplifiers, 12-bit ADC (SAR ADC), support for capacitive sensors, one of which is on the board, two comparators and not only. More information can be obtained from the datasheet . It should be noted right away that when it comes to compatibility, only peculiar pin-to-pin compatibility is meant, and the software will be discussed further.
Order and delivery
You can place an order on the site http://ru.farnell.com/ , more, sort of like, and nowhere. It turned out without any problems to pay the order with a Ukrainian bank card and wait for the arrival of the order. The shipment was made via UPS, and, oddly enough, the order was already in Ukraine in two days, considering that the United Kingdom was the starting point. By the way, for all the cost of the order (I ordered two boards) at 43 €, the delivery cost about ~ 20 €. Well, at least I did not have to wait long.
Packaging
The whole kit is packed in a plastic case. It looks very durable:
')
And that's what's inside:
So, what is next?
Next you should download the branded IDE PSoC Creator - at the moment the latest version is 3.0 with the Component Pack 7 update package. You can download from the torrent from the official site: http://www.cypress.com/go/psoccreator , only registration is required there. Then you should download the disk image from the page with the description of the whale: http://www.cypress.com/?rID=77780 , it will be useful because there are examples on this image that will help to deal with the IDE and the development of projects for this whale. Speaking of examples, on the element14 page, the “100 Projects in 100 Days” campaign was held, we might be interested in the fact that all these projects are publicly available .
PSoC Creator
In general, to describe this IDE would be worth writing a separate article, since the functionality is quite wide, given that the IDE is free. So if this topic is interesting, I will try in a separate article to dwell on this in more detail. In the meantime, briefly: After installing the IDE, you can connect the kit to the PC. In principle, it is possible before that, but only the programmer drivers will still be installed only with PSoC Creator. So, let's open any project from those that are present in the image, after copying it somewhere, where rewriting will be possible. I started with the PWM Example Project, which is present on the disk image from the whale page:
And we are welcomed by the component update window. Somewhat unexpected, but nothing terrible. Just agree, disabling the backup option. After updating the component, you can connect the kit, if it is not already connected and program it using this button:
After it is pressed, the project will be compiled and will be sewn up ... As a result, the 3-color LED that is on the board will start sorting through different colors and their combinations, thanks to 3m independent PWMs that are present in the project. In general, the project itself is written in C and it will not be difficult to deal with it, so I will not dwell on the project itself, instead I will talk a little about the development environment itself - PSoC Creator and the general structure of the project.
So, the project itself consists of a high-level design - “TopDesign” on which you can put the so-called components, which represent the code that is generated by the development environment and helps to implement this or that functionality, while the hardware units that are on PSoC can be involved four:
Each component has its own datasheet, which contains a fairly detailed description of both the component itself and its functionality, as well as the API, which are contained in the generated code for this component. Also for many components there are examples of use that can help both in configuring the component and in writing the code that it will use. Yes, with the configuration of components, everything is not so simple, because, as a rule, the functionality is quite wide, and formulating (read to configure) what you need may not be so easy the first time. In order to change something in the component settings, you need to call the component configurator from the context menu, it looks something like this:
In principle, a doubleclick will have exactly the same result. So, the configuration window for a seemingly simple PWM:
So, why am I - without “smoking” manuals and viewing usage examples, it can be quite difficult, given the abundance of parameters and settings. There is also a * .cydwr file that contains the project parameters and chip settings, which I will not dwell on in this article. Well, besides all this, there is also the “usual” main.c, well, the generated code, which is automatically regenerated upon each complete recompilation of the project, if it has been changed, or if the project settings have changed ...
The whale itself is hardware compatible with peripherals (shields) from / for Arduino, and there should be no problems with software implementation support, and PSoC 4 itself can operate at frequencies up to 48 MHz, so there should not be any problems with performance ...
In addition to all of the above, there is another chip on the board - PSoC 5LP, which judging from the datasheet on the kit itself is a programmer for PSoC 4 as well as a UART <-> UBS and USB <-> I2C adapter. In addition to all of the above, it can also be used as a separate programmable Cortex M3 microcontroller, according to the fee to the board: http://www.cypress.com/?docID=47035 .
In general, as the advantages of this whale, it is worth noting a very functional IDE, detailed documentation, support forum at the office.developer page and a wide choice of components with already implemented APIs, which simplifies subsequent development. As a minus, it is worth noting the complete absence of Russian-language documentation and Russian-language support forum and the fact that the IDE exists only in the Windows version, and although there is an export of projects to other IDEs, for example, in Eclipse this does not greatly save the situation.
To those who have mastered the whole article to the end, I would like to ask whether it is worth writing a series of articles on the PSoC 4 Pioneer kit and PSoC Creator?