InPut Devices
From the start of the Fab Acadmey I was intrested in using FPGA / PSoC in my project. So I decided I was going to use it for this project; I had never used it before.
Text
The assignments for the first week were:
I. Measure something
II. Add a sensor to a microcontroller board you have deisgned and read it.
Highlighted necessary tools:
>> Nothing
I decided to use a PSoC as a microcontroller, and I used the possibility of creating a Step Response sensor as a witty way around deisnging a really simple board.
A step response sensor is essentially a copper plate which, in combination with the users hand, becomes a "capacitor".
This functionality alows for diferent types of responses by altering the basic functionalites of capacitors by, for example, distancing your hand.
In my case I will use step response to make a proximity sensor.
The board :
The PSoC alows for internal reconficuration of components. This meant I could design 99% of the board internally.
However, since we had to make a board, the board I made was probabily the simplest board possible (this compensates for how complicated it is to use a PSoC).
Practically just a copper board. (See Image 3#)
Due to the small surface area of this small board it's capabilities as a proximity sensor aren't really that great, it's more like a touch sensor really.
Using a ruler, as seen in Image4# acutally works much better.
PSoC is a board with a programmable architecture. Cypress distrubutes a very cheap Kit, which in combination with the Cypress distrubuted IDE PSoC Creator (3.3) makes programming the PSoC "Easy" (and when I say easy I mean a little less close to Satan then the other meothods).
Okay, it wasn't THAT bad... I acutally didn't have many problems or issues, the biggest issue was how daunting the IDE and the programming was... Even if it was basic C language, the API is generated automatically, this means that a whole lot of commands and projects which needed to be included are generated only after you build the project, which is confusing.
PSoC from Cypres... Actually PSoC in general aren't common, so there isn't a lot of community support. This means a very small amount of external documentation, which often is outdated. Fortunately the guys at Cypress do an amazing job at documentation, but the huge amount of pages makes it hard to go through in one week.
Installing:
After ordering the part (which Emma did from Farnell). After subscribing to the Cypress website. After installing a software which is required to download from the Cypress site. I could finally download Cypress PSoC creator 3.3, this only works on Windows (The install process is also very long). Installing is quite tedious there are three different .exe programs to download, and the choice is amongst atleast 9 downloads specific for the PSoC 4 CY8CKIT-049 4xxx of wich I am using the which is the PSoC 4 CY8CKIT-049 42xx PSoC. and amongst the PSoC 4 M-series about 30 possible downloads (which I had to scavange throguh to find example projects)... Also, I had to Update to 3.3 from 3.1...This was curcial and solved a lot of problems that I couldn't figure out...
Programming:
The first thing I did was look at the tutorials on the
Cypress site. Programming was not necesarly difficult but very complicated, using the right commands depended a lot on what configuration used, since the API is generated rather then being a downloaded standard.
This meant that without reading the documentation, it was impossible to do anything, it also makes it prone to errors.
I started by using the "SCB_BootableBlinking" example which changed the speed at which the PSoC intermitted.
Bootloading:
There is a very specific procedure to upload a program to the PSoC;
First you need to hold down the button on the board to make sure that it's in "bootable mode"
when you plug it in.
The second thing that needs to be done is that after building, it's necessary that its programmed to the board using the bootable
The third thing was finding the file and building a file with a bootable module, without it the Cortex0 folder which should contain the bootable file needed to control the PSoC. This means that the bulck of the example projects CAN'T be used because this is the cheap kit (4€ versus 10€) we can't program it directly but instead we need to