This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
hidkey_gpio [2012/11/27 03:11] steve_m [Results] |
hidkey_gpio [2012/11/27 22:07] steve_m [Hardware] |
||
---|---|---|---|
Line 30: | Line 30: | ||
|Caps lock|MOSI|out| | |Caps lock|MOSI|out| | ||
|Scroll lock|Reset|out| | |Scroll lock|Reset|out| | ||
- | |row/column of right shift key|MISO|in| | + | |row/column of right shift key|MISO (through optocoupler)|in| |
For the optocoupler I added a 470Ω current limiting resistor. | For the optocoupler I added a 470Ω current limiting resistor. | ||
Line 83: | Line 83: | ||
===== Update #1 ===== | ===== Update #1 ===== | ||
- | Since reading the MISO input is much slower than writing the outputs, as I mentioned above, I took a closer look at the avrdude code. As it turns out, the inputs are read every time, even if the data isn't used at all (like when writing a byte). I applied a crude hack, so that MISO is only being read if the data is used afterwards. I pushed that change to a new [[https://github.com/steve-m/avrdude/tree/speedup|speedup branch]] on github. | + | Since reading the MISO input is much slower than writing the outputs, as I mentioned above, I took a closer look at the avrdude code. As it turns out, the inputs are read every time, even if the data isn't used at all afterwards (like when writing a byte). I applied a crude hack, so that MISO is only being read if the data is used afterwards. I pushed that change to a new [[https://github.com/steve-m/avrdude/tree/speedup|speedup branch]] on github. |
With those changes, flashing my 86 byte demo application is now over ten times faster (11.75s vs. 123.79s)! | With those changes, flashing my 86 byte demo application is now over ten times faster (11.75s vs. 123.79s)! |