summaryrefslogtreecommitdiff
path: root/spi
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2013-06-21 09:19:50 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2013-06-21 09:19:50 +0200
commit8f2d29186dc9f00888a3c9a76e15c1c57941efbe (patch)
tree28026aba48a7133cabe0d93faf181c1573c37eee /spi
parenta151427b70998ebde54753367eed6e0042b2b93b (diff)
downloadsigrok-dumps-8f2d29186dc9f00888a3c9a76e15c1c57941efbe.tar.gz
sigrok-dumps-8f2d29186dc9f00888a3c9a76e15c1c57941efbe.zip
Add example SPI dumps from an Atmel ATMEGA.
Thanks Clemens Novak <clemens@familie-novak.net> for the files.
Diffstat (limited to 'spi')
-rw-r--r--spi/spi_atmega32/README69
-rw-r--r--spi/spi_atmega32/spi_atmega32_00.srbin0 -> 20428 bytes
-rw-r--r--spi/spi_atmega32/spi_atmega32_01.srbin0 -> 21811 bytes
-rw-r--r--spi/spi_atmega32/spi_atmega32_10.srbin0 -> 20507 bytes
-rw-r--r--spi/spi_atmega32/spi_atmega32_11.srbin0 -> 21926 bytes
5 files changed, 69 insertions, 0 deletions
diff --git a/spi/spi_atmega32/README b/spi/spi_atmega32/README
new file mode 100644
index 0000000..90e8780
--- /dev/null
+++ b/spi/spi_atmega32/README
@@ -0,0 +1,69 @@
+-------------------------------------------------------------------------------
+SPI / Atmel ATMEGA32
+-------------------------------------------------------------------------------
+
+This is a set of SPI captures from an Atmel ATMEGA32 device. The main loop of
+the C program outputs an 8-bit value which is increased by one between
+subsequent transmissions:
+
+ unsigned char c = 0;
+ for (;;) {
+ _delay_us(250);
+ cbi(PORTB, DD_SS);
+ SPDR = c;
+ c++;
+ while (!(SPSR & (1 << SPIF)));
+ sbi(PORTB, DD_SS);
+ }
+
+
+Logic analyzer setup
+--------------------
+
+The logic analyzer used was a Saleae Logic (at 500kHz).
+
+ Probe ATMEGA32 pins (PDIP-40)
+ ---------------------------------
+ 0 (CS) SS/PB4 (Pin 5)
+ 1 (MOSI) MOSI/PB5 (Pin 6)
+ 2 (SCK) SCK/PB7 (Pin 8)
+
+
+Probing
+-------
+
+The sigrok command line used was:
+
+ sigrok-cli --driver fx2lafw --samples=1m --config samplerate=500k -o <file>
+
+
+SPI setup
+---------
+
+There are 4 different SPI setups each captured in a separate capture file
+(see the ATMEGA datasheet for the meaning of the CPOL & CPHA flags).
+
+
+spi_atmega32_00.sr
+------------------
+
+SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0)|(1<<SPR1);
+
+
+spi_atmega32_11.sr
+------------------
+
+SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0)|(1<<SPR1) | (1<<CPOL) | (1<<CPHA);
+
+
+spi_atmega32_01.sr
+------------------
+
+SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0)|(1<<SPR1) | (1<<CPHA);
+
+
+spi_atmega32_10.sr
+------------------
+
+SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0)|(1<<SPR1) | (1<<CPOL);
+
diff --git a/spi/spi_atmega32/spi_atmega32_00.sr b/spi/spi_atmega32/spi_atmega32_00.sr
new file mode 100644
index 0000000..f63dc91
--- /dev/null
+++ b/spi/spi_atmega32/spi_atmega32_00.sr
Binary files differ
diff --git a/spi/spi_atmega32/spi_atmega32_01.sr b/spi/spi_atmega32/spi_atmega32_01.sr
new file mode 100644
index 0000000..2ae0404
--- /dev/null
+++ b/spi/spi_atmega32/spi_atmega32_01.sr
Binary files differ
diff --git a/spi/spi_atmega32/spi_atmega32_10.sr b/spi/spi_atmega32/spi_atmega32_10.sr
new file mode 100644
index 0000000..aa5a9e8
--- /dev/null
+++ b/spi/spi_atmega32/spi_atmega32_10.sr
Binary files differ
diff --git a/spi/spi_atmega32/spi_atmega32_11.sr b/spi/spi_atmega32/spi_atmega32_11.sr
new file mode 100644
index 0000000..3e574db
--- /dev/null
+++ b/spi/spi_atmega32/spi_atmega32_11.sr
Binary files differ