| ??? 11/16/06 00:43 Read: times |
#128057 - Legible code posted,please continue the discussion Responding to: ???'s previous message |
Smita Shankar wrote:
Hi, I am working on CY7C68013 chip.I am trying to implement SPI using mode0. 1Mhz clock is generating,but data is not generating. (CLOCKOUT=24Mhz.I used SM2=0 i.e 24 mhz/12Mhz) I have to get 2 Mhz clock. Below I have attached piece of code which I tried.
main()
{
PORTECFG=0x08; //Turn on uart pin rxd0out
SCON0 = 0x13; //Mode 0, baud 24/12, enable receive,TI=1;RI=1;
// CKCON &= 0xF8; //Set stretch 0*/
while(1)
{
TI = FALSE;
SBUF0='B';//spi_Data;
// for(i=0;i<1000;i++);
while(!TI);
}
}
|



