Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 1 > AVNET SPARTAN 3A Eval KIT : No output from PSoC.

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



AVNET SPARTAN 3A Eval KIT : No output from PSoC.
Moderator:
ARVI

Post Reply
Follow this topic



AVNET SPARTAN 3A Eval KIT : No output from PSoC.

venkatesan posted on 23 Dec 2009 2:36 AM PST

1 Forum Post
Hai,

I am working on AVNET SPARTAN 3A Evaluation KIT.
I just used a 26bit counter code in the FPGA and
I send the MS 3 bits of the counter to the PSoC.
In the PSoC , I just forward the input signal to
the output port.


The input pins of teh PSoC are P2(5), P2(7) and
P4(6) which are connected with the FPGA I/Os.
The output pins of the PSoC are P0(1), P0(3)
and p0(5) , which are connected with the
connector J9.

I am noticing the counter signal at the input
of the PSoC, But not at the Output pins.

I have given the PSoC main.c code below.
If it is required I can give the VHDL code also.

Please help me, to find out the problem
with my code.

Thank You.

Project : PSoC_pin_status.app
==============================

main.c
=======

//----------------------------------------------------------------------------
// This project echos the state of port 2 pin 5 to port0 pin 5
// This project echos the state of port 2 pin 7 to port0 pin 3
// This project echos the state of port 4 pin 6 to port0 pin 1

//
// The status of output ports follow the status of their respective input ports.
//----------------------------------------------------------------------------

#include <m8c.h> // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules


void main()
{
while (1) {
if (PRT2DR & 0x20) {
PRT0DR |= 0x20;
}

if (PRT2DR & 0x80) {
PRT0DR |= 0x08;
}


Re: AVNET SPARTAN 3A Eval KIT : No output from PSoC.

Semsem posted on 15 Aug 2010 11:55 AM PST

1 Forum Post

I think that you are not checking the input port value properly. Try the following code instead:

if ((PRT2DR &= 0x20) > 0)

{

// put the bit toggling code here.

}



Re: AVNET SPARTAN 3A Eval KIT : No output from PSoC.

Terrence posted on 16 Aug 2010 04:12 AM PST
Top Contributor
43 Forum Posts

Hi,

In PSoC Designer, first confirm that your inputs are set to "HIGH Z", not "HIGH_Z Analog".

Next, check that the output pins are set as outputs, eg, "Strong Slow".

Then to read  the inputs use

while (1)
{
   if (PRT2DR & 0x20)        //if pin P2.5 is set
   {
      PRT0DR |= 0x20;         // set pin P0.5
   }
   else
  {
      PRT0DR &= ~0x20;         // clear pin P0.5
  }
}

This should get you started. For more on GPIO see the following url:

http://www.planetpsoc.com/component/content/article/13-basics-of-psoc-gpio.html

 






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