From 15efb43b76d69a2720bbc023710381d722e53b96 Mon Sep 17 00:00:00 2001 From: Ben Blazak Date: Thu, 26 Apr 2012 03:44:20 -0700 Subject: [PATCH] fixed *.md indenting apparently, sublists need to be indented 4 spaces (1 tab) or more to be recognized as such (because subsequent lines of a list may be indented up to 3 spaces). it's right there on the markdown syntax page, but i didn't catch it the first time. --- references.md | 140 +++++++++++++++-------------- src/keyboard/ergodox/layout.md | 10 +-- src/keyboard/ergodox/matrix.md | 26 +++--- src/keyboard/ergodox/mcp23018.md | 64 ++++++------- src/keyboard/ergodox/teensy-2-0.md | 82 ++++++++--------- src/lib/pjrc/readme.md | 2 +- src/makefile | 1 - 7 files changed, 164 insertions(+), 161 deletions(-) diff --git a/references.md b/references.md index 00733fa..aaf8334 100644 --- a/references.md +++ b/references.md @@ -4,9 +4,9 @@ (http://www.ladyada.net/wiki/lib/exe/fetch.php?hash=a2c6a9&w=501&h=785&media=http%3A%2F%2Fwww.ladyada.net%2Fimages%2Fmetertutorial%2Frescolorcode.jpg) : image - * from [the Multimeter Tutorial] - (http://www.ladyada.net/learn/multimeter/resistance.html) - (on ) + * from [the Multimeter Tutorial] + (http://www.ladyada.net/learn/multimeter/resistance.html) + (on ) * [Schematic Symbols] (http://img.docstoccdn.com/thumb/orig/28066054.png) @@ -22,14 +22,14 @@ * [Powering Light Emitting Diodes(LEDs)] (http://wolfstone.halloweenhost.com/Lighting/litlpo_PoweringLEDs.html) - * can also be reached via - -> [ENTER] ('http://thewolfstone.com/Welcome/Home.html) - -> [Wolfstone's Haunted Halloween Page] - (http://thewolfstone.com/_ar/Halloween.html) - -> [technology] - (http://wolfstone.halloweenhost.com/Navigation/TechBase.html) - -> [powering LEDs] - (http://wolfstone.halloweenhost.com/Lighting/litlpo_PoweringLEDs.html) + * can also be reached via + -> [ENTER] ('http://thewolfstone.com/Welcome/Home.html) + -> [Wolfstone's Haunted Halloween Page] + (http://thewolfstone.com/_ar/Halloween.html) + -> [technology] + (http://wolfstone.halloweenhost.com/Navigation/TechBase.html) + -> [powering LEDs] + (http://wolfstone.halloweenhost.com/Lighting/litlpo_PoweringLEDs.html) * [All About Circuits : Reference] (http://www.allaboutcircuits.com/vol_5/index.html) @@ -115,8 +115,10 @@ : tutorial by [Dean Camera] (http://fourwalledcubicle.com/AboutMe.php) (on ) - * updated version available as a pdf at [Four Walled Cubicle : AVR Articles] - (http://www.fourwalledcubicle.com/AVRArticles.php), along with a few other good articles on AVR programming + * updated version available as a pdf at + [Four Walled Cubicle : AVR Articles] + (http://www.fourwalledcubicle.com/AVRArticles.php), along with a few + other good articles on AVR programming ## Protocol Stuff @@ -150,7 +152,7 @@ * [HID Device Class Definition] (http://www.usb.org/developers/devclass_docs/HID1_11.pdf) : pdf (from ) - * HID = Human Interface Device + * HID = Human Interface Device * [HID Usage Tables] (http://www.usb.org/developers/devclass_docs/Hut1_12v2.pdf) @@ -164,38 +166,38 @@ * zip: [Phantom Firmware from PrinsValium] (http://geekhack.org/attachment.php?attachmentid=38982&d=1327895092) - * mentioned in the [Building Phantom Hardware and Firmware Mods] - (http://geekhack.org/showwiki.php?title=Island:26742) - article (on ) + * mentioned in the [Building Phantom Hardware and Firmware Mods] + (http://geekhack.org/showwiki.php?title=Island:26742) + article (on ) * github: [tmk / tmk_keyboard] (https://github.com/tmk/tmk_keyboard) - * forked by [Pyrolistical / tmk_keyboard] - (https://github.com/Pyrolistical/tmk_keyboard/tree/master/fourway) + * forked by [Pyrolistical / tmk_keyboard] + (https://github.com/Pyrolistical/tmk_keyboard/tree/master/fourway) - * mentioned in the [KeyPoard] - (http://geekhack.org/showwiki.php?title=Island:26845) - article on + * mentioned in the [KeyPoard] + (http://geekhack.org/showwiki.php?title=Island:26845) + article on - * forked by [riffautae / tmk_keyboard] - (https://github.com/riffautae/tmk_keyboard) + * forked by [riffautae / tmk_keyboard] + (https://github.com/riffautae/tmk_keyboard) - * mentioned on the [Teensy Keyboard Firmware Discussion] - (http://geekhack.org/showthread.php?26730-Teensy-Keyboard-Firmware-Discussion/page2) - thread on + * mentioned on the [Teensy Keyboard Firmware Discussion] + (http://geekhack.org/showthread.php?26730-Teensy-Keyboard-Firmware-Discussion/page2) + thread on * github: [humblehacker / keyboard] (https://github.com/humblehacker/keyboard) - * mentioned on [the humblehacker keyboard website] - (http://humblehacker.com/keyboard/) + * mentioned on [the humblehacker keyboard website] + (http://humblehacker.com/keyboard/) - * mentioned on [the humblehacker geekhack page] - (http://geekhack.org/showwiki.php?title=Island:6292) + * mentioned on [the humblehacker geekhack page] + (http://geekhack.org/showwiki.php?title=Island:6292) - * mentioned on [the designer's blog] - (http://humblehacker.com/blog/) + * mentioned on [the designer's blog] + (http://humblehacker.com/blog/) ### USB Libraries @@ -205,8 +207,8 @@ * zip: [PJRC: usb_keyboard] (http://pjrc.com/teensy/usb_keyboard.zip) - * mentioned on [the PJRC website] - (http://pjrc.com/teensy/usb_keyboard.html) + * mentioned on [the PJRC website] + (http://pjrc.com/teensy/usb_keyboard.html) ### TWI Libraries @@ -235,8 +237,8 @@ * zip: [PJRC: blinky] (http://pjrc.com/teensy/blinky.zip) - * mentioned on [the PJRC website] - (http://pjrc.com/teensy/gcc.html) + * mentioned on [the PJRC website] + (http://pjrc.com/teensy/gcc.html) ## Hardware Documentation @@ -244,44 +246,44 @@ * [Microchip: Analog & Interface Product Selector Guide] (http://ww1.microchip.com/downloads/en/DeviceDoc/21060z.pdf) - * from [the Microchip website (MCP23017 product listing page)] - (http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en023499) + * from [the Microchip website (MCP23017 product listing page)] + (http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en023499) * [MCP23017 / MCP23S17 Data Sheet] (http://ww1.microchip.com/downloads/en/DeviceDoc/21952b.pdf) - * from [the Microchip website] - (http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en023499) + * from [the Microchip website] + (http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en023499) * [MCP23018 / MCP23S18 Data Sheet] (http://ww1.microchip.com/downloads/en/DeviceDoc/22103a.pdf) - * from [the Microchip website] - (http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en537375) + * from [the Microchip website] + (http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en537375) * [Teensy 2.0 (ATMEGA32U4) Data Sheet] (http://pjrc.com/teensy/atmega32u4.pdf) - * from [the PJRC website] - (http://pjrc.com/teensy/datasheets.html) + * from [the PJRC website] + (http://pjrc.com/teensy/datasheets.html) * [Teensy++ 2.0 (AT90USB1286) Data Sheet] (http://pjrc.com/teensy/at90usb1286.pdf) - * from [the PJRC website] - (http://pjrc.com/teensy/datasheets.html) + * from [the PJRC website] + (http://pjrc.com/teensy/datasheets.html) * [Teensy 2.0 Pin Assignments, Using C] (http://pjrc.com/teensy/card2a.pdf) - * from [the PJRC website] - (http://pjrc.com/teensy/datasheets.html) + * from [the PJRC website] + (http://pjrc.com/teensy/datasheets.html) * [Teensy 2.0 Pin Assignments, Using Arduino] (http://pjrc.com/teensy/card2b.pdf) - * from [the PJRC website] - (http://pjrc.com/teensy/datasheets.html) + * from [the PJRC website] + (http://pjrc.com/teensy/datasheets.html) * [Cherry MX Series Keyswitches : Specifications] (http://www.cherrycorp.com/english/switches/key/mx.htm) @@ -289,6 +291,12 @@ ## Miscellaneous +### Typical Keyboard Information + +* [Keyboard Scan Rates] + (http://geekhack.org/showwiki.php?title=Keyboard+scan+rates) + list (on ) + ### Documentation and Design Tools * [Markdown: Syntax] @@ -298,34 +306,28 @@ (http://teholabs.com/knowledge/kicad.html) (on ) - * mentioned on the [circuit/block-diagram drawing] - (http://stackoverflow.com/questions/6422603/circuit-block-diagram-drawing) - question (on ) + * mentioned on the [circuit/block-diagram drawing] + (http://stackoverflow.com/questions/6422603/circuit-block-diagram-drawing) + question (on ) -* [Ti_k_Z and PGF] +* [TikZ and PGF] (http://www.texample.net/tikz/) : a TeX graphics package - * mentioned on the [circuit/block-diagram drawing] - (http://stackoverflow.com/questions/6422603/circuit-block-diagram-drawing) - question (on ) + * mentioned on the [circuit/block-diagram drawing] + (http://stackoverflow.com/questions/6422603/circuit-block-diagram-drawing) + question (on ) - * [Documentation (for version 2010-09-28)] - (http://www.texample.net/media/pgf/builds/pgfmanualCVS2010-09-28.pdf) - : pdf + * [Documentation (for version 2010-09-28)] + (http://www.texample.net/media/pgf/builds/pgfmanualCVS2010-09-28.pdf) + : pdf - * [Example: Block diagram line junctions] - (http://www.texample.net/tikz/examples/line-junctions/) + * [Example: Block diagram line junctions] + (http://www.texample.net/tikz/examples/line-junctions/) * [Inkscape : Connector tool tutorial] (http://wiki.inkscape.org/wiki/index.php/UsingTheConnectorTool) -### Typical Keyboard Information - -* [Keyboard Scan Rates] - (http://geekhack.org/showwiki.php?title=Keyboard+scan+rates) - list (on ) - ------------------------------------------------------------------------------- diff --git a/src/keyboard/ergodox/layout.md b/src/keyboard/ergodox/layout.md index e4276cd..7ca6ce7 100644 --- a/src/keyboard/ergodox/layout.md +++ b/src/keyboard/ergodox/layout.md @@ -21,11 +21,11 @@ To write a new one: for the layout. This should be enough for about 7 layers. Watch your RAM usage if you're getting close. - * The layout matricies could be moved to flash memory (program space, instead - of data space) in order to save RAM, but that doesn't seem necessary at the - moment. It would also be slightly slower, though that probably shouldn't - be a concern. It might be necessary (or convenient) if one were trying to - implement on-keyboard remaping. + * The layout matricies could be moved to flash memory (program space, + instead of data space) in order to save RAM, but that doesn't seem + necessary at the moment. It would also be slightly slower, though that + probably shouldn't be a concern. It might be necessary (or convenient) + if one were trying to implement on-keyboard remaping. ------------------------------------------------------------------------------- diff --git a/src/keyboard/ergodox/matrix.md b/src/keyboard/ergodox/matrix.md index 7042086..35a8fa4 100644 --- a/src/keyboard/ergodox/matrix.md +++ b/src/keyboard/ergodox/matrix.md @@ -6,18 +6,20 @@ * coordinates without brackets are unused * left and right hands are mostly the same except that `row += 6` for the left - ....... rows x columns = positions; assigned, unassigned ....... - ....... per hand: 6 x 7 = 42; 38, 4 ....... - ....... total: 12 x 7 = 84; 76, 8 ....... - ---------------------------------------------------------------------------- - [60][61][62][63][64][65][66] [00][01][02][03][04][05][06] - [70][71][72][73][74][75][76] [10][11][12][13][14][15][16] - [80][81][82][83][84][85] 86 20 [21][22][23][24][25][26] - [90][91][92][93][94][95][96] [30][31][32][33][34][35][36] - [A0][A1][A2][A3][A4] A5 A6 40 41 [42][43][44][45][46] - [B0] B6 50 [56] - [B1] [B5] [51] [55] - [B2][B3][B4] [52][53][54] + ``` + ....... rows x columns = positions; assigned, unassigned ....... + ....... per hand: 6 x 7 = 42; 38, 4 ....... + ....... total: 12 x 7 = 84; 76, 8 ....... + ---------------------------------------------------------------------------- + [60][61][62][63][64][65][66] [00][01][02][03][04][05][06] + [70][71][72][73][74][75][76] [10][11][12][13][14][15][16] + [80][81][82][83][84][85] 86 20 [21][22][23][24][25][26] + [90][91][92][93][94][95][96] [30][31][32][33][34][35][36] + [A0][A1][A2][A3][A4] A5 A6 40 41 [42][43][44][45][46] + [B0] B6 50 [56] + [B1] [B5] [51] [55] + [B2][B3][B4] [52][53][54] + ``` ------------------------------------------------------------------------------- diff --git a/src/keyboard/ergodox/mcp23018.md b/src/keyboard/ergodox/mcp23018.md index eb8cafb..572fd84 100644 --- a/src/keyboard/ergodox/mcp23018.md +++ b/src/keyboard/ergodox/mcp23018.md @@ -41,18 +41,18 @@ NC o14-------15+ ADDR (see note) * notes: - * ADDR (pin15): Set slave address to `0b0100000` by connecting to Vss(GND). - * The user-defined bits are the three least significant - * I2C addresses are 7 bits long (the last bit in the byte is used for - indicating read/write) - * RESET (pin16) must be externally biased. Since we're not going to trigger - it ourselves, we can tie it high. - * This is not noted in the I2C Pinout Description section of the MCP23018 - datasheet, but it's true (empirically), and it is noted in the SPI Pinout - Description section, and in the MCP23017 datasheet. - * I'm not the first person who's failed to notice ;) - * - * + * ADDR (pin15): Set slave address to `0b0100000` by connecting to Vss(GND). + * The user-defined bits are the three least significant + * I2C addresses are 7 bits long (the last bit in the byte is used for + indicating read/write) + * RESET (pin16) must be externally biased. Since we're not going to + trigger it ourselves, we can tie it high. + * This is not noted in the I2C Pinout Description section of the + MCP23018 datasheet, but it's true (empirically), and it is noted in + the SPI Pinout Description section, and in the MCP23017 datasheet. + * I'm not the first person who's failed to notice ;) + * + * ## Notes about Registers @@ -69,28 +69,28 @@ pins configured as output * IOCON register (see datasheet section 1.6, table 1-5, register 1-8) - * BANK: bit 7; read/write; default = 0 - * 1: The registers associated with each port are separated into different - banks - * 0: The registers are in the same bank (addresses are sequential) - * SEQOP: bit 5; read/write; default = 0 - * 1: Sequential operation disabled, address pointer does not increment - * 0: Sequential operation enabled, address pointer increments + * BANK: bit 7; read/write; default = 0 + * 1: The registers associated with each port are separated into + different banks + * 0: The registers are in the same bank (addresses are sequential) + * SEQOP: bit 5; read/write; default = 0 + * 1: Sequential operation disabled, address pointer does not increment + * 0: Sequential operation enabled, address pointer increments * notes: - * All addresses given for IOCON.BANK = 0, since that's the default value of - the bit, and that's what we'll be using. - * We want the row pins set as output high (hi-Z) without pull-ups initially, - and the column pins set as input with pull-ups. We'll cycle through - driving the row pins low and checking the column pins in the update - function. + * All addresses given for IOCON.BANK = 0, since that's the default value of + the bit, and that's what we'll be using. + * We want the row pins set as output high (hi-Z) without pull-ups + initially, and the column pins set as input with pull-ups. We'll cycle + through driving the row pins low and checking the column pins in the + update function. * abbreviations: - * IODIR = I/O Direction Register - * IOCON = I/O Control Register - * GPPU = GPIO Pull-Up Resistor Register - * GPIO = General Purpose I/O Port Register - * OLAT = Output Latch Register + * IODIR = I/O Direction Register + * IOCON = I/O Control Register + * GPPU = GPIO Pull-Up Resistor Register + * GPIO = General Purpose I/O Port Register + * OLAT = Output Latch Register ## I²C Device Protocol (see datasheet section 1.3, figure 1-1) @@ -130,8 +130,8 @@ Sequential : S OP W ADDR --> SR OP R Dout ... Dout --> P * notes: - * We'll be using sequential mode (ICON.SEQOP = 0; default) (see datasheet - section 1.3.1). + * We'll be using sequential mode (ICON.SEQOP = 0; default) (see datasheet + section 1.3.1). ------------------------------------------------------------------------------- diff --git a/src/keyboard/ergodox/teensy-2-0.md b/src/keyboard/ergodox/teensy-2-0.md index 42113b2..73e096a 100644 --- a/src/keyboard/ergodox/teensy-2-0.md +++ b/src/keyboard/ergodox/teensy-2-0.md @@ -44,10 +44,10 @@ GND-------/ * notes: - * SCL and SDA: Need external pull-up resistors. Sometimes the Teensy - internal pull-ups are enough (see datasheet section 20.5.1), but i think - for this project we'll want external ones. The general recommendation for - 400kHz I²C seems to be 2.2kΩ. + * SCL and SDA: Need external pull-up resistors. Sometimes the Teensy + internal pull-ups are enough (see datasheet section 20.5.1), but i think + for this project we'll want external ones. The general recommendation + for 400kHz I²C seems to be 2.2kΩ. ## Notes about Registers @@ -65,51 +65,51 @@ read returns the logical value (1|0) of the pin * notes: - * Unused pins should be set as input, with internal pullup enabled in order - to give them a defined level (see datasheet section 10.2.6). - * PD6 (the onboard LED) already has a defined level (low), so there's no - reason to set internal pull-up enabled on it. If we do, it will source - current to the LED, which is fine, but unnecessary. - * We want the row pins 'hi-Z' initially (set as input with pull-up disabled), - and the column pins set as input with internal pull-up enabled. We'll - cycle through driving the row pins low (setting them as output) and - checking the column pins in the update function. - * Switching the row pins between hi-Z and drive low (treating them as if - they were open drain) seems just as good as, and a little safer than, - driving them high when the row's not active. + * Unused pins should be set as input, with internal pullup enabled in order + to give them a defined level (see datasheet section 10.2.6). + * PD6 (the onboard LED) already has a defined level (low), so there's no + reason to set internal pull-up enabled on it. If we do, it will source + current to the LED, which is fine, but unnecessary. + * We want the row pins 'hi-Z' initially (set as input with pull-up + disabled), and the column pins set as input with internal pull-up + enabled. We'll cycle through driving the row pins low (setting them as + output) and checking the column pins in the update function. + * Switching the row pins between hi-Z and drive low (treating them as + if they were open drain) seems just as good as, and a little safer + than, driving them high when the row's not active. ### PWM on ports OC1(A|B|C) (see datasheet section 14.10) * notes: settings: - * PWM pins should be set as outputs. - * we want Waveform Generation Mode 5 - (fast PWM, 8-bit) - (see table 14-5) - * set `TCCRB[4,3],TCCRA[1,0]` to `0,1,0,1` - * we want "Compare Output Mode, Fast PWM" to be `0b10` - "Clear OCnA/OCnB/OCnC on compare match, set OCnA/OCnB/OCnC at TOP" - (see table 14-3) - this way higher values of `OCR1(A|B|C)` will mean longer 'on' times for the - LEDs (provided they're hooked up to GND; other way around if they're hooked - up to Vcc) - * when in a fast PWM mode, set `TCCR1A[7,6,5,4,3,2]` to `1,0,1,0,1,0` - * we want "Clock Select Bit Description" to be `0b001` - "clkI/O/1 (No prescaling)" - (see table 14-6) - * set `TCCR1B[2,1,0]` to `0,0,1` - * LEDs will be at minimum brightness until OCR1(A|B|C) are changed (since - the default value of all the bits in those registers is 0) + * PWM pins should be set as outputs. + * we want Waveform Generation Mode 5 + (fast PWM, 8-bit) + (see table 14-5) + * set `TCCRB[4,3],TCCRA[1,0]` to `0,1,0,1` + * we want "Compare Output Mode, Fast PWM" to be `0b10` + "Clear OCnA/OCnB/OCnC on compare match, set OCnA/OCnB/OCnC at TOP" + (see table 14-3) + this way higher values of `OCR1(A|B|C)` will mean longer 'on' times for + the LEDs (provided they're hooked up to GND; other way around if they're + hooked up to Vcc) + * when in a fast PWM mode, set `TCCR1A[7,6,5,4,3,2]` to `1,0,1,0,1,0` + * we want "Clock Select Bit Description" to be `0b001` + "clkI/O/1 (No prescaling)" + (see table 14-6) + * set `TCCR1B[2,1,0]` to `0,0,1` + * LEDs will be at minimum brightness until OCR1(A|B|C) are changed + (since the default value of all the bits in those registers is 0) * notes: behavior: - * The pins source current when on, and sink current when off. They aren't - set to high impediance for either. - * In Fast PWM mode setting `OCR1(A|B|C)` to `0` does not make the output on - `OC1(A|B|C)` constant low; just close. Per the datasheet, this isn't true - for every PWM mode. + * The pins source current when on, and sink current when off. They aren't + set to high impediance for either. + * In Fast PWM mode setting `OCR1(A|B|C)` to `0` does not make the output on + `OC1(A|B|C)` constant low; just close. Per the datasheet, this isn't + true for every PWM mode. * abbreviations: - * OCR = Output Compare Register - * TCCR = Timer/Counter Control Register + * OCR = Output Compare Register + * TCCR = Timer/Counter Control Register ------------------------------------------------------------------------------- diff --git a/src/lib/pjrc/readme.md b/src/lib/pjrc/readme.md index 70e605e..4c64cb5 100644 --- a/src/lib/pjrc/readme.md +++ b/src/lib/pjrc/readme.md @@ -3,7 +3,7 @@ ## links to original files * [pjrc] (http://pjrc.com/teensy/) - * [usb_keyboard] (http://pjrc.com/teensy/usb_keyboard.zip) + * [usb_keyboard] (http://pjrc.com/teensy/usb_keyboard.zip) ------------------------------------------------------------------------------- diff --git a/src/makefile b/src/makefile index 6d7e492..d94d456 100644 --- a/src/makefile +++ b/src/makefile @@ -2,7 +2,6 @@ # makefile for the ergoDOX project # # - .h file dependencies are automatically generated -# - # # - This makefile was originally (extensively) modified from the WinAVR # makefile template, mostly by removing stuff. The copy I used was from