|
Since you are using a PSoC1 and you did not tell us about having got an ICE (In-Circuit-Emulator) you will have to set up a minimum man-machine-communication to get a little bit of insight what is going on within your chip. The minimum is a couple of LEDs you may turn on or off, if your kit has got an LCD-module, you can use that.
Best will be to work in little steps, realizing one block after the other, testing it and integrating it. Sometimes it will be easier to build a part of the project separately, get it tested and then integrate it into the project (and test it again).
Since you still have to learn some programming skills, best is to frequently upload your project here, so that we can have a look at and having something solid to diskuss on.
So at first i suggest you to set up your test-environment (LEDs/LCD).
then Connect your input-signals and verify each of them getting seen in your program
Connect your output-signals and see that you can set them progammatically.
DOCUMENT ALL CONNECTIONS !!!
Since we have to read your program, try to make it look easy, use names that speak for themselfs (iData is not as good as ADC_Value), use clear indentation and comments to explain what you're doing. Using function calls makes the whole project easier to overlook and even may save precious RAM: using a function as "void InitializeHardware(void)" and calling this from main() will show where all related stuff has to go to and shortens main() to the very essential part.
Happy coding
Bob
|