- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I'm new onPSOC MiniProg stuf.
I have some difficulty to use my chip cy7c6313 for SPIM communication.
My problem is to change state of PORT_1_3.
I have check the state of this pin with my oscilloscope, and there is no change to low state or high state.
P1[3] config is set to :
SSEL, 5V SSEL, Push/Pull, DisableInt
in my main.c program, i have make this :
#include "appconfig.h"
#include <m8c.h>
#define TIME_DELAY {for(i=30000; i>0; i--);}
WORD i;
CHAR Message[] = "Hello SPI Slave";
#define SS 0x8;
void main( void )
{
SPIM_Start();
P13CR |= 0x01;
P1DATA |= SS;
BYTE bIndex;
SPIM_SetMOSI(SPIM_MOSI_P15);
P13CR &= ~0x01;
P1DATA &= ~SS;
bIndex = 0;
TIME_DELAY;
while (bIndex < sizeof(Message))
{
Message[bIndex] = SPIM_bIO(Message[bIndex]);
bIndex++;
TIME_DELAY; // Insert a user provided function here to make delay
}
P1DATA |= SS;
P13CR |= 0x01;
}
What do you think of that ? somthing wrong ?
Are you need more information to help me ?
Nicolas. French user.
- Labels:
-
PSoC 1