View Full Version : Analog Out on the Cypress PSoC (enhanced modeO
Hi All,
Has any one used the enhanced mode on the Cypress SPoC and played with the ANALOG OUTPUTS ?
I have used the compatibility mode and am able to get the ANALOG INPUT working fine (except for the high impedance noise on the unused AI lines).
I have been able to use switches on the PSoC and reflect the switch settings back to the (virtual) LEDs on the DS - so far so good.
I am using Windriver C++ and the standard DriverStation class.
Is there a Analog Out method in the DirverStationEnhanced class that can be used to send an analog signal back ?
Greg M may know the answer to this (also!) ...
It would be nice to have a manual about PSoC as applied to our FIRST scenrios.
Many thanks in advance.
Gopal
Greg McKaskle
22-02-2010, 10:04
The LV API to the DS has a call for getting and setting the analog outputs. I assume that the C++ API does as well.
Greg McKaskle
EricVanWyk
22-02-2010, 10:07
Ooh Ooh! What are you planning on doing with them?
If you find something cool I'll win a bet, so please do tell!
Thanks Greg..
I checked in the C++ documentation and I see there is SetAnalogOut()!
I did not see this before - this is cool.
The other thing - the P2 connector has a sticker of some sort on it.
It would be nice to know if we can remove it and also what type of connector plugs in to it (rather than breadboard it with individual wires).
Eric - What I have been doing is experimenting with feedback for the past few years but with each driver station changing it has been interesting!
Last year I was on the verge of converting a generic PC gamepad to a good driver station operator interface. There the fun was in using the built-in motors to generate some sort of tactile feedback.
With this Analog Output - something like that could be done, I think.
I will share with you what I come up with!
Thanks again!
Gopal
One new question -
Is it possible to check if the PSoC is connected or not (using Windriver code) ?
I read the the enhanced class can get the config etc.. but if I am not using the enhanced, how can I find out if the PSoC is plugged in to the DS ?
Thanks
heydowns
23-02-2010, 14:05
Ooh Ooh! What are you planning on doing with them?
If you find something cool I'll win a bet, so please do tell!
We used an analog output to drive an LED-based "bargraph". The higher the analog output, the higher the bars climb.
We use it to give our driver feedback of the current "kick strength" of our kicking mechanism.
The display is kind of small, but it is fun to watch it go depleted when fired, then climb back up to the driver's chosen power level/strength.
For the OP - we use C++ Enhanced IO class to drive this. It works great.
Here's a picture of the nearly-finished board (unpowered, sadly) - the strength meter is the rectangular white-ish object in the top middle, underneath the left-edge of the large white oval-shaped device (that's a cap-touch based slider used by the driver to set the kick strength).
http://rollingthunder.smugmug.com/2009-2010-FIRST-Robotics/Build-Season/Week-6-214-220/PICT0014/790252065_HzTsD-M.jpg
Hope you can win your bet one way or another ;)
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.