diff --git a/README.md b/README.md index becff64..227bbf9 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,13 @@ You can now select **Arduboy, Arduboy DevKit** and **Homemade Arduboy boards** f ## Libraries -This package contains all the currently available Arduboy libraries with changes for homemade Arduboys. If Arduboy libraries were installed manually, it is recommended to uninstall them. +This package contains all the currently available Arduboy libraries with changes for homemade Arduboys. No libraries must be installed manually. If they are, they take precedence over the homemade package libraries and must be uninstalled. ## Pin wiring table | Arduboy function | Arduboy
Leonardo/Micro | DevelopmentKit | ProMicro 5V
(standard wiring) | ProMicro 5V
(alternate wiring) | | ---------------- | ---------------------- | ----------- | ---------------------------------- | --------------------------------- | -| OLED CS | 12 PORTD6 | 6 PORTD7 | GND**** | 1/TXO PORTD3* | +| OLED CS | 12 PORTD6 | 6 PORTD7 | GND/(inverted CART_CS)**** | 1/TXO PORTD3* | | OLED DC | 4 PORTD4 | 4 PORTD4 | 4 PORTD4 | 4 PORTD4 | | OLED RST | 6 PORTD7 | 12 PORTD6 | 6 PORTD7 | 2 PORTD1* | | SPI SCK | 15 PORTB1 | 15 PORTB1 | 15 PORTB 1 | 15 PORTB1 | @@ -48,7 +48,8 @@ This package contains all the currently available Arduboy libraries with changes | SPEAKER PIN 1 | 5 PORTC6 | A2 PORTF5 | 5 PORTC6 | 5 PORTC6 | | SPEAKER PIN 2 | 13 PORTC7 | A3 PORTF4** | GND | 6 PORTD7* | |----------------- | ---------------------- | ----------- | ---------------------------------- | --------------------------------- | -| CART_CS | 0 PORTD2*** | - | - | 0 PORTD2*** | +| CART_CS (org) | 0 PORTD2*** | - | 0 PORTD2*** | 0 PORTD2*** | +| CART_CS (new) | 2 PORTD1*** | - | 2 PORTD1*** | - | | SPI MISO | 14 PORTB3*** | - | - | 14 PORTB3*** | |----------------- | ---------------------- | ----------- | ---------------------------------- | --------------------------------- | | OLED SDA | 4 PORTD4***** | - | 4 PORTD4***** | 4 PORTD4***** | @@ -69,24 +70,30 @@ prevent the IO pins from possible damage, speaker pin 2 should *NOT* be configured as an output. (***) -Flash cart support: +Flash cart support (original design) : * 0 PORTD2 flash cart chip select * 14 PORTB3 flash cart data in (MISO) +or + +Flash cart support (new design) : +* 2 PORTD1/SDA flash cart chip select +* 14 PORTB3 flash cart data in (MISO) + (****) When using serial flash with the Pro Micro standard wiring, OLED_CS (chip select) cannot be grounded (always active). In this case a simple circuit with a general purpose PNP transistor and two resistors or a single inverter chip like the 74LVC1G04 can be used to deactive OLED_CS while CART_CS is active. -**TODO** add schematic +[schematic](https://github.com/MrBlinky/Arduboy-homemade-package/raw/master/images/transistor-cs-driver.png) (*****) -support for I2C displays has been added. When using an I2C display the SDA pin should be connected to pin 4 PORTD4 and the displays SCL pin to pin 6 PORTD7 unless you're using a Pro Micro with the alternate wiring scherme. In that case SCL pin should be connected to pin 1/TXO PORTD3. +support for I2C displays has been added. When using an I2C display the SDA pin should be connected to pin 4 PORTD4 and the SCL pin to pin 6 PORTD7 unless you're using a Pro Micro with the alternate wiring scherme. In that case SCL pin should be connected to pin 1/TXO PORTD3. Note that updating a I2C display is slower than a SPI display. To get the most out of an I2C display, the display update code is optimized using assembly and bitbangs the display at 2 Mbps or 2,66 Mbps (uses more progmem). At 2 Mbps the display update will be 4.3 times slower than when a SPI display is used and 3.1 times slower at 2.66 Mbps. Games will still run smootly at 60 FPS when the main program requires less than %70 (2Mbps) or 78% (2.66Mbps) of MCU power. -## (future) expansion connector +## expansion connector An expansion connector can be added to a modified or Homemade Arduboy in the form of a 12 pin male header with 0.1"pitch. which can be used for: * ICSP header for easy in circuit programming (updating bootloader) @@ -96,18 +103,26 @@ An expansion connector can be added to a modified or Homemade Arduboy in the for * multiplayer link * sensors -### Expansion connector pinout +### Expansion connector pinout (original design) ( (Homemade) Arduboy facing top - front view female pinheader) | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | TX | RX | SCL | SDA | NC | KEY | MISO| MOSI| CLK | RST | GND | Vcc | + +### Expansion connector pinout (new design) + +| 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| TX | SDA | SCL | RX | NC | KEY | MISO| MOSI| CLK | RST | GND | Vcc | +(RX and SDA pins are swapped) + ```text TX* - Serial Transmitter output -RX - Serial Receiver input / Flash cart chip select +RX - Serial Receiver input / original Flash cart chip select SCL* - I2C/TWI serial clock I/O -SDA* - I2C/TWI serial data I/O +SDA* - I2C/TWI serial data I/O / new Flash cart chip select (Arduboy FX) NC - Not connected (reserved for future use) KEY - Key pin. should be filled to block pin insertion (reverse insert protection) MISO - SPI/ICSP Master Input, Slave Output @@ -118,3 +133,5 @@ GND - Ground (0V) Vcc - 5V (~3.0V to ~4.1V on Arduboy) (*) Not available when using Pro Micro with Alternate Wiring ``` +Note on the original flash cart design RX is used as flash chip select. In the new design (as used by Arduboy FX) SDA is used as flash chip select and Rx and Rx are available for serial comms. +