Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 3 > Total Noob Needs Help

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Total Noob Needs Help
Moderator:
RKRM

Post Reply
Follow this topic



Total Noob Needs Help

Luffy posted on 11 Sep 2010 8:54 PM PST
Member
5 Forum Posts

Hello. I'm a total noob when it comes to programming the PSoC. I am a junior in high school and a member of the schools Robotics Club. I was charged with the task of working with the PSoC. I came up with a really great idea, but I need to learn the basics first. So, can anyone help me?




Re: Total Noob Needs Help

Terrence posted on 13 Sep 2010 02:56 AM PST
Top Contributor
43 Forum Posts

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,

PSoC Developer forums www.psocdeveloper.com/forums/index.php
Planet PSoC www.planetpsoc.com/
 



Re: Total Noob Needs Help

Luffy posted on 15 Sep 2010 05:00 PM PST
Member
5 Forum Posts

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).



Re: Total Noob Needs Help

therepairshop posted on 27 Sep 2010 10:33 AM PST
Senior Member
13 Forum Posts

Hello Luffy. 

I am a mentor on FRC team 1983.   If the previous post did not get you going you may contact me directly at

therepairshop@hotmail.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. 

Good Luck

Jim

Team 1983

 



Re: Total Noob Needs Help

Tsukiyo posted on 27 Sep 2010 01:08 PM PST
Member
3 Forum Posts

 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.



Re: Total Noob Needs Help

Tsukiyo posted on 27 Sep 2010 01:10 PM PST
Member
3 Forum Posts

BTW, I didn't notice this earlier, but Luffy and Tsukiyo are the me. Same person. so if there is any confusion, sorry.



Re: Total Noob Needs Help

therepairshop posted on 29 Sep 2010 11:06 AM PST
Senior Member
13 Forum Posts

Do you prefer Luffy or Tsukiyo ?

The button on the PSOC3 starter kit board is connected to P15[3].   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[3],   set LED1 on P2[0],  and LED2 onP2[1].

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.

Good Luck

Jim



Re: Total Noob Needs Help

therepairshop posted on 29 Sep 2010 11:38 AM PST
Senior Member
13 Forum Posts

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[2] 

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.

Jim

 

 



Re: Total Noob Needs Help

Tsukiyo posted on 29 Sep 2010 01:03 PM PST
Member
3 Forum Posts

 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.



Re: Total Noob Needs Help

therepairshop posted on 29 Sep 2010 02:32 PM PST
Senior Member
13 Forum Posts

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 ?

Jim

First Mentor

Skunkworks  Team 1983

DesMoines WA



Re: Total Noob Needs Help

Luffy posted on 29 Sep 2010 04:27 PM PST
Member
5 Forum Posts

Team Paradise 1165

Paradise Valley High School

Phoenix, AZ



Re: Total Noob Needs Help

Luffy posted on 02 Oct 2010 07:59 PM PST
Member
5 Forum Posts

BTW, I don't have a "Pins and Ports" tab on my component selector screen. What do I do?






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20