Peg:What exactly doesn't work?I wasn't able to simulate the code but finally i was able to.
Do you have a scope on the SPI lines?No, right now I am not able to scope on the spi lines, but I will on Monday.
Is the SPI mode correct for the device at the other end?I dont exactly know what do you want to said with this, the other end device is an accelerometer MMA7455 , I change the configuration according to what Mac said, but I am still unable to communicate with it.
In your post you also talk about AsynchroSerial, this is for the SCI isn't it?Yes I was refering to the SCI.
You can do a test by tying MISO high and see if you receive 0xFF and then low and see if you get0x00.I didn't thought of that test, so I did it, and this way I was able to use the spi, so if I put an 0xFF in the MISO, I was able to read it in hyperterminal, and the same for the 0x00
But I am still unable to communicate to the accelerometer.
Mac:Thank you about the 1 millisecond stabilisation period after power-up I didn't know about it, or maybe didn't pay attention to it while I was reading.
I changed CPOL=0 and CPHA=0, but I can get to work yet.
Thank you, I really appreciate the help, I will keep trying to see if I can get it to work.