Go to Post Often heard exchange in the shop: "The physics don't allow that." "But it's so cool!" - MBF [more]
Home
Go Back   Chief Delphi > Technical > Control System > FRC Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-01-2011, 14:23
peter1626 peter1626 is offline
Registered User
FRC #1626 (Falcon Robotics)
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2009
Location: United States
Posts: 38
peter1626 is an unknown quantity at this point
Cypress Tutorial?

I have been looking around for a few hours but I cant seem to find any tutorials on how to wire and program the Cypress PSoC to use as a third joystick for the driver station. Specifically, I want to add a potentiometer and a few buttons, is this possible? If so how can it be done?

My last question is how do you program LabView to read this information?

Thanks for any help!
__________________
2010 SBPLI Long Island-Regional-Imagery Award in honor of Jack Kamen
2011 New York City Regional-Industrial Design sponsored by General Motors
2011 SBPLI Long Island Regional-Regional Winner
Reply With Quote
  #2   Spotlight this post!  
Unread 18-01-2011, 14:32
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,800
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Cypress Tutorial?

Look at the back of the Cypress board and you'll see the pins labeled that you wire your swiches and potentiometers to:
http://www.chiefdelphi.com/forums/at...2&d=1264090529

Wirewrap, a prototype board, or purchasing a special mount from AndyMark can be used to connect your switches.

There's no programming necessary on the Cypress or Driver Station.

If you look on the Driver Station I/O tab you can see if it's working and even change some of the characteristics of how each contact is handled.


In LabVIEW you check your switch settings using:
  • Driver Station Get Digital Input
  • Driver Station Get Analog Input
You'll find them on the block diagram pallete at: WPI Robotics Library -> Driver Station -> Compatibility IO
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 18-01-2011 at 14:41.
Reply With Quote
  #3   Spotlight this post!  
Unread 18-01-2011, 19:15
peter1626 peter1626 is offline
Registered User
FRC #1626 (Falcon Robotics)
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2009
Location: United States
Posts: 38
peter1626 is an unknown quantity at this point
Re: Cypress Tutorial?

Thanks for all the help!

I have just a few more questions...
Do you need to have the 9v battery, or is the usb power sufficient?
Can you connect a LED as an indicator light to Digital Out?
I remember reading something about programing the PSoC with a FRC_IO_v2.hex, do you have to do this or did I misread something?
__________________
2010 SBPLI Long Island-Regional-Imagery Award in honor of Jack Kamen
2011 New York City Regional-Industrial Design sponsored by General Motors
2011 SBPLI Long Island Regional-Regional Winner
Reply With Quote
  #4   Spotlight this post!  
Unread 18-01-2011, 19:28
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Cypress Tutorial?

Quote:
Originally Posted by peter1626 View Post
FRC_IO_v2.hex, do you have to do this or did I misread something?
You do have to flash it. See How to Configure your I/O Module
Reply With Quote
  #5   Spotlight this post!  
Unread 18-01-2011, 22:58
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,800
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Cypress Tutorial?

You don't need the 9v battery. The Cypress board will use the battery or the USB power, not both anyway.

DO connect the Cypress board directly to your Classmate, NOT through any USB hub. It does draw a lot of power and last year a lot of teams had it drop out when match time came.

You can connect an LED to Digital out using an appropriate resistor.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #6   Spotlight this post!  
Unread 22-01-2011, 18:16
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: Cypress Tutorial?

Quote:
Originally Posted by Joe Ross View Post
You do have to flash it. See How to Configure your I/O Module
Unfortunately when I tried this today, programming failed. It said that FRC_IO_v2.hex was not compatible with our First Touch. I'm searching around here to figure out what I need to do...
__________________
-
An ounce of perception is worth a pound of obscure.
Reply With Quote
  #7   Spotlight this post!  
Unread 22-01-2011, 21:13
Ray Gitchell Ray Gitchell is offline
Registered User
FRC #0525 (SwartDogs)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Cedar Falls, Iowa
Posts: 12
Ray Gitchell is an unknown quantity at this point
Re: Cypress Tutorial?

Chris,

Make sure you are using a psoc 3. I am pretty sure we ordered one from Cypress, but were delivered a psoc 5. Apparently similar boards, but different processors. Thus, we are looking into the legality and compatibility of using the psoc 5, 'cause we see the psoc 3 is not unavailable. (at least the last time I checked)

Please post if you find out different, as we are getting a similar error when we try to download the latest code from FIRST for psoc 3.

Thanks, RayG
Reply With Quote
  #8   Spotlight this post!  
Unread 22-01-2011, 21:40
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: Cypress Tutorial?

Quote:
Originally Posted by Ray Gitchell View Post
Chris,

Make sure you are using a psoc 3. I am pretty sure we ordered one from Cypress, but were delivered a psoc 5. Apparently similar boards, but different processors. Thus, we are looking into the legality and compatibility of using the psoc 5, 'cause we see the psoc 3 is not unavailable. (at least the last time I checked)

Please post if you find out different, as we are getting a similar error when we try to download the latest code from FIRST for psoc 3.

Thanks, RayG
The board we're using is the one that came in the kit from 2 years ago. Us being a veteran team, we have to reuse an old one. We haven't used any special inputs at the driver's station since FIRST switched to the NI system, so this thing has been packed away and I haven't really given it a second thought. But anyway, it is the one we got in the 2009 kit - it was just packed away and we dug it out a couple days ago.

I got the error just as we were being kicked out of the school, so I didn't have time to write it down, but it was something along the lines of this (heavily paraphrased):

"Programming failed: the XXXX.xxx was created for (something I can't remember) v32, and the (something I can't remember) you are trying to program is v31."

It seems like our board is so old that the new firmware isn't suited for it. Of course, I could be wrong. As I said, we were getting the boot as this was happening and all of that stuff is still at the school so I can't do any real testing. I'm thinking that if I recompile the open-source code with the software that I installed from the CD we had, it will solve the problem. I was hoping that someone else saw this problem and had a solution so I didn't have to spend a lot of time (which I don't really have right now) tracking this down.
__________________
-
An ounce of perception is worth a pound of obscure.

Last edited by Chris Hibner : 22-01-2011 at 21:51.
Reply With Quote
  #9   Spotlight this post!  
Unread 22-01-2011, 23:43
Ray Gitchell Ray Gitchell is offline
Registered User
FRC #0525 (SwartDogs)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Cedar Falls, Iowa
Posts: 12
Ray Gitchell is an unknown quantity at this point
Re: Cypress Tutorial?

No, sorry, not the same issue, although our solutions may be similar (rebuild with appropriate toolset).
Perhaps you can install the old CD on a separate computer and load the previous year's .hex file to the board.

I am afraid we may have to port the code to a variant processor, as the psoc5 uses a different compiler and probably different header files. We don't want to tear up previous driver stations, as we use them for promotions and recruiting. ;-(

Thanks for the response, RayG
Reply With Quote
  #10   Spotlight this post!  
Unread 24-01-2011, 02:28
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Cypress Tutorial?

Quote:
Originally Posted by Ray Gitchell View Post
No, sorry, not the same issue, although our solutions may be similar (rebuild with appropriate toolset).
Perhaps you can install the old CD on a separate computer and load the previous year's .hex file to the board.

I am afraid we may have to port the code to a variant processor, as the psoc5 uses a different compiler and probably different header files. We don't want to tear up previous driver stations, as we use them for promotions and recruiting. ;-(

Thanks for the response, RayG
As long as you are using the board that shipped in the kit a year ago, then the firmware should work for you. It has not been recompiled since then (no bugs reported since beta last year). If you can provide the exact error, I may be able to help you figure our what's going wrong. If I had to guess based on what you've told us so far, it would be that you downloaded a newer version of the programmer than the board supports, though I've never actually seen a complaint like that from the programmer software.

-Joe
Reply With Quote
  #11   Spotlight this post!  
Unread 23-01-2011, 04:30
rwood359 rwood359 is offline
Registered User
AKA: Randy
FRC #0359 (Hawaiian Kids)
Team Role: Mentor
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Waialua, HI
Posts: 212
rwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to all
Re: Cypress Tutorial?

Quote:
Originally Posted by Mark McLeod View Post
Look at the back of the Cypress board and you'll see the pins labeled that you wire your swiches and potentiometers to:
http://www.chiefdelphi.com/forums/at...2&d=1264090529
This covers the compatibility mode I/O. Where are the extra connections for the Enhanced mode?
I am interested in the Button Inputs.
__________________
Reply With Quote
  #12   Spotlight this post!  
Unread 23-01-2011, 13:05
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,800
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Cypress Tutorial?

Hi Randy,

Enhanced Mode is set via the Driver Station (I/O tab -> Enhanced).

Tell it you want to use enhanced mode and what you want each pin to be.
I've attached an example that sets up 16 button inputs and shows the pin assignment corresponding to the markings on the back of the Cypress board.
Attached Thumbnails
Click image for larger version

Name:	CypressEnhancedMode.jpg
Views:	147
Size:	63.6 KB
ID:	9800  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #13   Spotlight this post!  
Unread 23-01-2011, 18:00
rwood359 rwood359 is offline
Registered User
AKA: Randy
FRC #0359 (Hawaiian Kids)
Team Role: Mentor
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Waialua, HI
Posts: 212
rwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to all
Re: Cypress Tutorial?

Quote:
Originally Posted by Mark McLeod View Post
Hi Randy,

Enhanced Mode is set via the Driver Station (I/O tab -> Enhanced).

Tell it you want to use enhanced mode and what you want each pin to be.
I've attached an example that sets up 16 button inputs and shows the pin assignment corresponding to the markings on the back of the Cypress board.
Hi Mark,
I found information on the 16 DIOs. After you select the Enhanced mode, the Operator's display has the 16 DIOs plus 8(?from memory) Buttons and 8 LEDs. I think that LEDS are the tiny LEDs on the Cypress board. What I am looking for is: What are the Buttons, how do they work and how do I connect to them, if they are additional inputs?
Thanks
__________________
Reply With Quote
  #14   Spotlight this post!  
Unread 23-01-2011, 21:48
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,800
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Cypress Tutorial?

That information is in the Cypress Board Pinout but I don't see Button 1 called out.

In the attached, I believe the Buttons are the 5-element Slider on the board itself, and the LEDs are shown.
Attached Thumbnails
Click image for larger version

Name:	CypressMarkup.JPG
Views:	115
Size:	73.7 KB
ID:	9804  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 23-01-2011 at 22:09.
Reply With Quote
  #15   Spotlight this post!  
Unread 23-01-2011, 21:54
Dale's Avatar
Dale Dale is offline
Head Coach & Mentor
AKA: Dale Yocum
FRC #1540 (Flaming Chickens)
Team Role: Coach
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Portland, OR
Posts: 502
Dale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud of
Re: Cypress Tutorial?

There's also a simple new product from e-stop called a CCI. It looks like a joystick to your software but gives you 12 digital inputs and 4 analog inputs. Simpler to use than a Cypress though not as flexible. http://www.estoprobotics.com/estore/...d&productId=33
__________________
2016 PNW Championship Chairman's; 2016 Winner Oregon City District, 2015 PNW Championship Chairman's; 2015 PNW District Engineering Inspiration; 2015 PNW District Finalist; 2014 PNW Championship Chairman's; 2014 Championship Innovation in Controls; 2013 Chairman's (Oregon); 2013 Finalist (OKC); 2012 Winner (OKC); 2012 Chairman's (OKC); 2012 Woody Flowers (Oregon); 2011 Volunteer of the Year (Oregon); 2011 Finalist & Captain (San Diego); 2011 Innovation in Control (San Diego); 2010 & 2007 Chairman's (Oregon); 2010 Regional Champions (Colorado); 2010 Innovation in Control (Colorado); 2009 & 2008 Engineering Inspiration (Oregon); 2008 Regional Champions (Oregon); 2007 Regional Finalist (Oregon); 2005 Rookie Inspiration (PNW)
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 23:09.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi