diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/spi/butterfly | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/Documentation/spi/butterfly b/Documentation/spi/butterfly index a2e8c8d90e35..9927af7a629c 100644 --- a/Documentation/spi/butterfly +++ b/Documentation/spi/butterfly | |||
@@ -12,13 +12,20 @@ You can make this adapter from an old printer cable and solder things | |||
12 | directly to the Butterfly. Or (if you have the parts and skills) you | 12 | directly to the Butterfly. Or (if you have the parts and skills) you |
13 | can come up with something fancier, providing ciruit protection to the | 13 | can come up with something fancier, providing ciruit protection to the |
14 | Butterfly and the printer port, or with a better power supply than two | 14 | Butterfly and the printer port, or with a better power supply than two |
15 | signal pins from the printer port. | 15 | signal pins from the printer port. Or for that matter, you can use |
16 | similar cables to talk to many AVR boards, even a breadboard. | ||
17 | |||
18 | This is more powerful than "ISP programming" cables since it lets kernel | ||
19 | SPI protocol drivers interact with the AVR, and could even let the AVR | ||
20 | issue interrupts to them. Later, your protocol driver should work | ||
21 | easily with a "real SPI controller", instead of this bitbanger. | ||
16 | 22 | ||
17 | 23 | ||
18 | The first cable connections will hook Linux up to one SPI bus, with the | 24 | The first cable connections will hook Linux up to one SPI bus, with the |
19 | AVR and a DataFlash chip; and to the AVR reset line. This is all you | 25 | AVR and a DataFlash chip; and to the AVR reset line. This is all you |
20 | need to reflash the firmware, and the pins are the standard Atmel "ISP" | 26 | need to reflash the firmware, and the pins are the standard Atmel "ISP" |
21 | connector pins (used also on non-Butterfly AVR boards). | 27 | connector pins (used also on non-Butterfly AVR boards). On the parport |
28 | side this is like "sp12" programming cables. | ||
22 | 29 | ||
23 | Signal Butterfly Parport (DB-25) | 30 | Signal Butterfly Parport (DB-25) |
24 | ------ --------- --------------- | 31 | ------ --------- --------------- |
@@ -40,10 +47,14 @@ by clearing PORTB.[0-3]); (b) configure the mtd_dataflash driver; and | |||
40 | SELECT = J400.PB0/nSS = pin 17/C3,nSELECT | 47 | SELECT = J400.PB0/nSS = pin 17/C3,nSELECT |
41 | GND = J400.GND = pin 24/GND | 48 | GND = J400.GND = pin 24/GND |
42 | 49 | ||
43 | The "USI" controller, using J405, can be used for a second SPI bus. That | 50 | Or you could flash firmware making the AVR into an SPI slave (keeping the |
44 | would let you talk to the AVR over SPI, running firmware that makes it act | 51 | DataFlash in reset) and tweak the spi_butterfly driver to make it bind to |
45 | as an SPI slave, while letting either Linux or the AVR use the DataFlash. | 52 | the driver for your custom SPI-based protocol. |
46 | There are plenty of spare parport pins to wire this one up, such as: | 53 | |
54 | The "USI" controller, using J405, can also be used for a second SPI bus. | ||
55 | That would let you talk to the AVR using custom SPI-with-USI firmware, | ||
56 | while letting either Linux or the AVR use the DataFlash. There are plenty | ||
57 | of spare parport pins to wire this one up, such as: | ||
47 | 58 | ||
48 | Signal Butterfly Parport (DB-25) | 59 | Signal Butterfly Parport (DB-25) |
49 | ------ --------- --------------- | 60 | ------ --------- --------------- |