May I suggest the following:
1. Work through the online training. For PSoC3 look here www.cypress.com/
2. Read the TRM (Technical Reference Manual), as this is where the meat lies. www.cypress.com/
3. Read and work through Application Notes. If someone has done it before, learn from them. www.cypress.com/
4. Newsgroups. Always search the newsgroups like this one, before asking a question, as it was probabally asked and answered before.
5. A few other resources worth mentioning,
By the way, I forgot to mention that I need to know how to use the pins on the PSoC. If I don't know how to use the pins, then my idea is screwed(forgive the language).
I am a mentor on FRC team 1983. If the previous post did not get you going you may contact me directly at
email@example.com with your specific questions. I am not a programming expert but have worked quite a bit with the PSOC kit board used by the FRC teams.
PSOC Creator is easy to learn and just fooling around with it and the sample programs should get you going. One thing that I woulsd suggest is to not let Creator update itself while you are working with the FRC project. Doing so will cause communication problems with the driver station. You will have to reinstall the package again. Hopefully that will be fixed this year.
I learned about the updating thing earlier. The projects wouldn't be generated correctly. BTW, if you know how to use the pushbutton that's built into the PSoC in the First Touch Starter Kit. If you can give me some sample code for that, it would be very appreciated. Thank you.
BTW, I didn't notice this earlier, but Luffy and Tsukiyo are the me. Same person. so if there is any confusion, sorry.
Do you prefer Luffy or Tsukiyo ?
The button on the PSOC3 starter kit board is connected to P15. You can see this connection in the First Touch Starter kit guide section 5.1. There is a full schematic of the board that is very useful.
Create a new project.
From the component catalog / Ports and Pins section place a digital input pin in the design window. Open the pins configuration box by double clicking on the pin.
Name the pin Button
On the "TYPE" tab set the pin as a digital input with hardware connection box checked.
On the "General" tab select drive mode "Resistive pull down"
Place two more pins in the design window.
Name them LED1 and LED2
Set the type to digital output and the drive mode to Strong drive for both pins.
From the Logic section place a not gate in the design window.
Now use the wire tool to connect the button to LED1
then connect the button to the input side (large end) of the not gate and from the output of the not gate to LED2.
Switch the view in Creator to display the design.cydwr window. On the "Pins" tab.
Goto the pins assignment window set the button on P15, set LED1 on P2, and LED2 onP2.
Now build the design from the "Build" menu and program the board from the "Debug" menu.
Disconnect and them reconnect the USB cable and press the button.
The above example will turn on LED1 or LED2 depending on the switch state. It is all done in hardware and no programming is required.
To use the button in software code add another pin to the above diagram.
Name it LED3 and make its a digital output pin, Do not check the hardware connection box this time.
Set the drive mode to Strong drive. Configure it to use P2
Edit you main.c file as in attatched.
Now when you run the project the 3rd Led will be controlled by the button using the software API.
main.c.zip 546 bytes
Thank you for the info. I just needed to know how to use the pushbutton in my code because I was going to use it to tell the program to finish.
I hope I expained it well. It is difficult to judge how much detail someone may need. Keep playing with the starter kit. I thinks its one of the best learing tools I've seen. I realy hope they keep it in this years kit of parts.
What team are you on ?
Skunkworks Team 1983
Team Paradise 1165
Paradise Valley High School
BTW, I don't have a "Pins and Ports" tab on my component selector screen. What do I do?