I noticed something in some code I wrote the other day and got to wondering. I have created a master to emulate a play station controller. I'm using a atmega328 with a 12MHz clock. The real playstation sends out a 250kHz-500kHz clock pulse (4us per period) but the best I could do was 93.75khz ? 93 works fine but if I have the room I'd like to use it.
// SPI, master, clock/128 = 93.75khz (187.5 didn't work...)
SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR1)|(1<<SPR0)|(1<<DORD)|(1<<CPHA)|(1<<CPOL);
I'm curious what else I should be looking at. I can see it on my scope and the signal does as I asked it to but the controller does not keep up. I know my clock CP** setting are right. Not that I figure it mattered but clock/64 or c.lock/124 (with double speed) both failed to work. Maybe I need to look at my byte spacing? If other things could affect this I could get a screen shot of the analyzer. Looks ok to me.