stephb
03-02-2007, 10:12 AM
Hi everyone...
Ok. I am trying to do SPI between 2 rabbits. Should be easy...Well, this is proving harder than I expected. RCM4110.
Using all SPI defaults: PB0 (clock), PC4/PC5 data, I built my own chip select logic.
So the code looks like this:
------
auto char c[4];
c[0] = 0x55;
c[1] = 0x37;
c[2] = 0xde;
c[3] = 0x41;
SPISelect( ); // this triggers my CS stuff
SPIWrite( c , 4 ) ;
SPIDeSelect(); // cancels the CS stuff...
I hookup my Digiview to the proper pins and I get, clock (perfect), Chip select (perfect), 1 byte transmitted , fine, but the remainder is as follows:
0x13, 0x84, 0x7D.
Shouldn't I be seeing the same output? I have played with DV's internal stuff (clock edge, LSB,MSB,bits,inverting clock, data, etc...). I cannot get the last 3 bytes to show properly. I have isolated the master and still get the same.
I tried changing the way the data is sent, 1 byte at a time, change the clock divisor, etc. No change.
So...any ideas what I must have overlooked?
Ok. I am trying to do SPI between 2 rabbits. Should be easy...Well, this is proving harder than I expected. RCM4110.
Using all SPI defaults: PB0 (clock), PC4/PC5 data, I built my own chip select logic.
So the code looks like this:
------
auto char c[4];
c[0] = 0x55;
c[1] = 0x37;
c[2] = 0xde;
c[3] = 0x41;
SPISelect( ); // this triggers my CS stuff
SPIWrite( c , 4 ) ;
SPIDeSelect(); // cancels the CS stuff...
I hookup my Digiview to the proper pins and I get, clock (perfect), Chip select (perfect), 1 byte transmitted , fine, but the remainder is as follows:
0x13, 0x84, 0x7D.
Shouldn't I be seeing the same output? I have played with DV's internal stuff (clock edge, LSB,MSB,bits,inverting clock, data, etc...). I cannot get the last 3 bytes to show properly. I have isolated the master and still get the same.
I tried changing the way the data is sent, 1 byte at a time, change the clock divisor, etc. No change.
So...any ideas what I must have overlooked?