Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
boards:ecb:4pio-i2c:development [2021/04/23 07:25] b1ackmai1er |
boards:ecb:4pio-i2c:development [2023/02/18 23:19] (current) b1ackmai1er |
||
---|---|---|---|
Line 36: | Line 36: | ||
* Change top layer to vcc plane for better power distribution. | * Change top layer to vcc plane for better power distribution. | ||
* Gate /WR with /CS to meet PCF8584 Z80 configuration requirements. | * Gate /WR with /CS to meet PCF8584 Z80 configuration requirements. | ||
- | * Version C committed including above changes | + | * Version C committed including above changes. |
+ | * Patches to version B board | ||
+ | * Lift pin 1 IC15, connect lifted pin to pin 19 IC13 | ||
+ | * Lift pin 18 IC16, connect lifted pin 18 to pin 20 | ||
+ | * Lift pin 5 IC 7, connect pin 6 to pin 15 | ||
+ | * On solder side connect pin 19 IC13 to pin 2 IC2 | ||
+ | * On component side, cut track between IC16 pin 17 and IC13 pin 19. | ||
+ | * 4PIO-I2Cd | ||
+ | * Component placement, routing changes. | ||
+ | * Initial ROMWBW HBIOS support. | ||
+ | * Add jumper to connect DS1307 battery backup to backplane battery backup. | ||
+ | * Add support for 3.3v I2C peripherals using logic level translator. | ||
====== Board ====== | ====== Board ====== | ||
Line 42: | Line 53: | ||
Kicad files can be found [[https:// | Kicad files can be found [[https:// | ||
- | Current revision is ECB-4PIO-I2Cc | + | Current revision is ECB-4PIO-I2Cd |
====== Pictures ====== | ====== Pictures ====== | ||
Line 76: | Line 87: | ||
====== I2C Addressing ====== | ====== I2C Addressing ====== | ||
- | 24LC512 devices are access on the I2C bus by first issuing a control byte. The control byte consists | + | 24LC512 devices are access on the I2C bus by first issuing a control byte. The control byte consists |
So accessing a device requires sending a bye in the following sequence: DDDDAAAO | So accessing a device requires sending a bye in the following sequence: DDDDAAAO | ||
- | __AT25LC512__ | + | {{: |
For 24LC512 the device identifier D is 1010, device address is 000-111 and O is set based on a read 1 or write 0. | For 24LC512 the device identifier D is 1010, device address is 000-111 and O is set based on a read 1 or write 0. | ||
Line 94: | Line 105: | ||
**Note **that changing the 24LC512 to the alternate address using J1 requires the 1-2 solder link to be cut otherwise a short between +5V and ground will occur. | **Note **that changing the 24LC512 to the alternate address using J1 requires the 1-2 solder link to be cut otherwise a short between +5V and ground will occur. | ||
- | __{{: | + | {{: |
- | For the DS1307 the device identifier D is 1101, device address A is 000 - only one device is supported on the bus, and O is set based on a read 1 or write 0. | + | For the DS1307 the device identifier D is 1101, device address A is 000 - only one device is supported on the bus, and O is set based on a read 0 or write 1. |
The control byte for the onboard DS1307 is: | The control byte for the onboard DS1307 is: | ||
^DS1307^DEFAULT| | ^DS1307^DEFAULT| | ||
- | ^READ|11010001 | + | ^READ|11010000 |
- | ^WRITE|11010000 | + | ^WRITE|11010001 |
+ | |||
+ | {{: | ||
+ | |||
+ | A PCF8574 I2C 8-bit I/O expander is commonly used to driver LCD displays. | ||
+ | |||
+ | For PCF8574 devices, the identifier D is 0100, Up to 8 devices are supported. Backpack boards usually have 3 unbridged solder jumpers giving an address 111 - A. O is set based on a read 1 or write 0. | ||
+ | |||
+ | The control byte for the onboard DS1307 is: | ||
+ | |||
+ | ^PCF8574^DEFAULT| | ||
+ | ^READ|01001111 (4F)| | ||
+ | ^WRITE|01001110 (4E)| | ||
+ | |||
+ | ====== Software & Drivers ====== | ||
+ | |||
+ | __ROMWBW __ | ||
+ | < | ||
+ | |||
+ | RomWBW HBIOS v3.1.1-pre.75, | ||
+ | |||
+ | SBC Z80 @ 12.000MHz | ||
+ | 0 MEM W/S, 1 I/O W/S, INT MODE 2, SBC MMU | ||
+ | 512KB ROM, 512KB RAM | ||
+ | |||
+ | UART0: IO=0x68 16550A MODE=38400, | ||
+ | I2C: IO=0xF0 | ||
+ | DS1307: 01/01/21 00:00:01 | ||
+ | TMS: IO=0x98 NOT PRESENT | ||
+ | MD: FLASH=1 1=29F040 FLASH FILE SYSTEM DISABLED | ||
+ | MD: UNITS=2 ROMDISK=384KB RAMDISK=256KB | ||
+ | FD: IO=0x36 UNITS=2 | ||
+ | RF: IO=0xA0 WP=OFF IO=0xA4 WP=OFF DEVICES=2 | ||
+ | PPIDE: IO=0x60 | ||
+ | PPIDE0: LBA BLOCKS=0x003DFC20 SIZE=1983MB | ||
+ | PPIDE1: NO MEDIA | ||
+ | PPIDE: IO=0x20 PPI NOT PRESENT | ||
+ | PPIDE: IO=0x44 PPI NOT PRESENT | ||
+ | |||
+ | </ | ||
+ | |||
+ | __Utilities __ | ||
+ | |||
+ | RTCHB - display date and time using HBIOS functions | ||
+ | |||
+ | < | ||
+ | H> | ||
+ | 01/01/21 00:03:19 | ||
+ | |||
+ | </ | ||
+ | |||
+ | RTCDS7 - display date and time using direct access through PCF8584. | ||
+ | |||
+ | < | ||
+ | H> | ||
+ | 01/01/21 00:03:35 | ||
+ | |||
+ | </ | ||
+ | |||
+ | I2CSCAN - I2C Bus Scanner | ||
+ | |||
+ | < | ||
+ | H> | ||
+ | I2C Bus Scanner | ||
+ | |||
+ | 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | ||
+ | 00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 20: -- -- -- -- -- -- -- 27 -- -- -- -- -- -- -- -- | ||
+ | 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 50: 50 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- | ||
+ | 70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | |||
+ | </ | ||
====== References ====== | ====== References ====== | ||
Line 115: | Line 201: | ||
Linux C driver: [[https:// | Linux C driver: [[https:// | ||
+ | |||
+ | I2CScan code: [[https:// | ||
====== Key Learnings ====== | ====== Key Learnings ====== | ||
Line 123: | Line 211: | ||
* Do a hard reset between each software test to ensure consistent results. Exiting in a known state is important. | * Do a hard reset between each software test to ensure consistent results. Exiting in a known state is important. | ||
* Software control of hard reset is desirable as soft reset does guarantee consistent results. | * Software control of hard reset is desirable as soft reset does guarantee consistent results. | ||
- | |||
- | \\ | ||