I would like to have a word to all those newbees who are going to start or already started with a PSoC1 kit and now try to dig into the system.
The kits for PSoC1 are cheap and versatile, they offer a great usefulness and with that software they are supplied with - really great.
Very easily one of the examples is compiled, programmed and run - and lo! It works!! Great!!!
Now for the very first own design: often there was a problem in mind to solve with a PSoC1 and now the newbee starts to engrave the solution into silicon.
The required modules are placed, the routing of the inputs and outputs are done, though a little bit complicated and not so easy to understand.
Now it comes to the moment where main() has to be filled with some C-code. The progam is compiled and programmed and
It doesn't work
Now the nowbee (you) sits and stares first at the black housing of the unwilling silicon and then onto the bright shining monitor that holds the clearly commented code indicating precisely what it should do.
But it doesn't
Well, what we need now is a way of indicating precisely what is going on inside that intransparent plasic housing, from one of the existing examples, the LCD module (did you buy a kit with an LCD? If not, only the LEDs are left.) and code is imported and on the right place some output to the LCD is made. Compiled, programmed
There is no output on the LCD
Now the newbee (you) starts to put the instruction to write something (stupid like "Here I am") to the LCD just below the LCD's initialization code and then (after a program change, compiling, programming) down 1 line and again and again and again... until you come to such a stupid newbee-error like
if (MyValue = 0)
where you realize that not only the "if" is always false, but the original value of "MyValue" is spoilt and now contains zero.
This is not the only newbee-error that will trap you, there are pitfalls over and over.
So what to do? Well, I cannot prevent you from making errors (make them, but learn from them) but I can give you some hints to save time to detect them.
PSoC1 does not have the ability to be controlled with a debugger. PSoC3 and PSoC5 are! When you have a PSoC3 or 5 Kit, you can controll the software, have it run it step-by-step, look at the values of variables and even change them at your need.
You want to do that with a PSoC1? Yes, but it costs you a fortune compared to the price of your kit. The magic word is "ICE-CUBE", an in-circuit-emulator which is THE solution when you are designing for PSoC1 (if you're designing professionally, the ICE-Cube is a "must"!). I've got one and it works, I'm very pleased with it and it definitively helped me out of many pitfalls (yes, I didn't leave any of them unfallen into) making my programs error-free. This would NEVER have been possible with LCD-messages and/or blinking LEDs, the programs where too complicated.
What else can you do?
There is a kit containing a comfortable motherboard and 3 processor modules with a PSoC1, 3 and 5 for a (very!) reasonable price, but of course more expensive than any of the "first touch" kits. But it gives you the chance to test vivid parts of your program with a debugger before you use them on a PSoC1. This, together with a clean style of programming, will help you to develop even complex applications for the small and cheap PSoC1 while not limited to it.
Why do I write this? I was a newbee myself and when I started with PSoCs I was one again. Furtunately I had the money to spend and bought an ICE-Cube initially with a PSoC1 kit.
In very former times (once apon a time...) I saw people starting to learn programming with BASIC. Within 10 minutes a 14-year old kid was able to write a 5-lined program that runs. When the same kid started to write something more complicated (i.e. small games) he (or she) failed and gave up. They could not realize that the complexness of the solution had nothing to do with their own capabilities but with the restrictions of the tool "Basic" ("Basic" starts with "Bah" end ends with "sick"). Some of them I could teach PASCAL or even "C" and they built pretty good programs.
I want you not to give up, the LCD-tool is not a tool. If you cannot get your project to work in an appropiate time do not blame yourself, blame the tool. PSoCs with their extreme flexible combination of analog and digital modules (in 3 and 5 you could even build your own modules!) are a clever and easy-to-use solution. Battery powered systems are easily built with just 3 extra parts: a battery, an inductor and a diode.
When you are not able to build your project, do not hesitate to share your needs in one of the open forums where you can ask questions and WHERE YOU GET ANSWERES!
Have fun, happy coding