1 -------------------------------------------------------------------------------
3 -------------------------------------------------------------------------------
5 This is a set of SPI captures from an Atmel ATMEGA32 device. The main loop of
6 the C program outputs an 8-bit value which is increased by one between
7 subsequent transmissions:
15 while (!(SPSR & (1 << SPIF)));
23 The logic analyzer used was a Saleae Logic (at 500kHz).
25 Probe ATMEGA32 pins (PDIP-40)
26 ---------------------------------
28 1 (MOSI) MOSI/PB5 (Pin 6)
29 2 (SCK) SCK/PB7 (Pin 8)
35 The sigrok command line used was:
37 sigrok-cli --driver fx2lafw --samples=1m --config samplerate=500k -o <file>
43 There are 4 different SPI setups each captured in a separate capture file
44 (see the ATMEGA datasheet for the meaning of the CPOL & CPHA flags).
50 SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0)|(1<<SPR1);
56 SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0)|(1<<SPR1) | (1<<CPOL) | (1<<CPHA);
62 SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0)|(1<<SPR1) | (1<<CPHA);
68 SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0)|(1<<SPR1) | (1<<CPOL);