Difference between revisions of "Front Panel For 8 Bit Computers"
Jump to navigation
Jump to search
Blwikiadmin (talk | contribs) |
Blwikiadmin (talk | contribs) |
||
(34 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
<video type="youtube">WupSfpHNN78</video> | <video type="youtube">WupSfpHNN78</video> | ||
+ | |||
+ | <video type="youtube">nmlrxyyVe7Q</video> | ||
== Front Panel for 8-Bit Microprocessors == | == Front Panel for 8-Bit Microprocessors == | ||
+ | |||
+ | * See [[Front_Panel_for_8_Bit_Computers_V2|here for V2 (through-hole) version]] | ||
[[File:EightBitFrontPanel720px.JPG]] | [[File:EightBitFrontPanel720px.JPG]] | ||
+ | |||
+ | === Top row controls === | ||
+ | |||
+ | Typical controls. | ||
+ | |||
+ | [[File:FrontPanel-01-Front-3D-controls.png]] | ||
== Features == | == Features == | ||
Line 11: | Line 21: | ||
It has these features. They may not fit your generic design. Especially since this card has to have an I2C interface. | It has these features. They may not fit your generic design. Especially since this card has to have an I2C interface. | ||
+ | * 32 Pushbutton Switches | ||
+ | * 32 LEDs | ||
* I2C interface (Two Wire interface - plus power and ground) | * I2C interface (Two Wire interface - plus power and ground) | ||
− | * | + | ** Jumper selectable base address |
− | * | + | ** Occupies I2C addresses either 0x20-0x23 or 0x24-0x27 |
− | * Jumper Selectable I2C terminators | + | ** Jumper Selectable I2C terminators |
* I2C daisy-chain connector | * I2C daisy-chain connector | ||
− | * Interrupt line | + | ** Interrupt line |
− | ** Can be configured to interrupt on button presses | + | *** Can be configured to interrupt on button presses |
− | ** MCP23017 need to be set to Open-Drain output - card has pull-up to Vcc | + | *** MCP23017 need to be set to Open-Drain output - card has pull-up to Vcc |
* 4 MCP23017 16-bit I2C Port Expanders | * 4 MCP23017 16-bit I2C Port Expanders | ||
− | * These are fine pitch surface mount parts | + | ** These are fine pitch surface mount parts |
− | * | + | ** [https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP23017-Data-Sheet-DS20001952.pdf MCP23017 Datasheet] - Rev D |
− | * | + | ** [https://hackaday.com/2023/02/03/mcp23017-went-through-shortage-hell-lost-two-inputs/?fbclid=IwAR1ktG1CsU7ns5fmTYXdlpBLdqaJmBioXrVrG1_Lgqe8MTQr1AY4rp6IETU MCP23017... LOST TWO INPUTS] |
+ | *** MCP23017 now a 14/16-bit expander, with two of the pins (GPA7 and GPB7) losing their input capabilities | ||
+ | *** The chips look the same, are called the same, and act mostly the same — if you don’t download the latest version of the datasheet (Revision D), you’d never know that there’s been a change | ||
* 3.3V or 5V operation | * 3.3V or 5V operation | ||
+ | * Compatible form factor with [[RETRO-EP4CE15]] and other cards | ||
+ | ** 95x95mm | ||
+ | ** 6-32 mounting holes | ||
+ | |||
+ | == Connector == | ||
+ | |||
+ | === J2 - I2C Connector === | ||
+ | |||
+ | * Two row header on bottom of card | ||
+ | * 5 pin in | ||
+ | * 4 pin out (daisy-chain) | ||
+ | |||
+ | # GND | ||
+ | # VCC | ||
+ | # SDA | ||
+ | # SCL | ||
+ | # INT* | ||
+ | |||
+ | And | ||
+ | |||
+ | # GND | ||
+ | # VCC | ||
+ | # SDA | ||
+ | # SCL | ||
== Schematic == | == Schematic == | ||
Line 30: | Line 68: | ||
== Drivers == | == Drivers == | ||
+ | |||
+ | === VHDL Driver === | ||
+ | |||
+ | * [https://github.com/douggilliland/Design_A_CPU/tree/main/Peripherals/FrontPanel01 VHDL code to control Front Panel autonomously] | ||
+ | ** Great for FPGA Retro-computers | ||
+ | ** Converts pushbuttons into raw, debounced, and toggled outputs | ||
+ | ** Uses [https://github.com/douggilliland/Design_A_CPU/wiki IOP16 small CPU core] | ||
+ | ** Example: [https://github.com/douggilliland/MultiComp/tree/master/MultiComp_On_RETRO-EP4CE15/M6800_MIKBUG_FrontPanel01 6800 running MIKBUG using the Front Panel] - Run/Halt the CPU, Read SRAM, ROM, etc, Write to SRAM | ||
+ | |||
+ | ==== VHDL Entity ==== | ||
+ | |||
+ | <pre> | ||
+ | -- ------------------------------------------------------------------------------------------------------- | ||
+ | -- Front Panel starts here | ||
+ | |||
+ | fp01 : work.FrontPanel01 | ||
+ | port map | ||
+ | ( | ||
+ | -- Clock and reset | ||
+ | i_CLOCK_50 => i_CLOCK_50, -- Clock (50 MHz) | ||
+ | i_n_reset => w_resetClean_n, -- Reset | ||
+ | -- 32 outs, 32 ins | ||
+ | i_FPLEDs => w_LEDsOut, -- Out to LEDs (32) | ||
+ | o_PBRaw => w_PBsRaw, -- Raw version of the Pushbuttons (32) | ||
+ | o_PBLatched => w_PBLatched, -- Latched version of the Pushbuttons (32) | ||
+ | o_PBToggled => w_PBsToggled, -- Toggle version of the Pushbuttons (32) | ||
+ | -- I2C interface | ||
+ | io_I2C_SCL => io_I2C_SCL, -- I2C clock to Front Panel card | ||
+ | io_I2C_SDA => io_I2C_SDA, -- I2C data to/from Front Panel card | ||
+ | i_I2C_INTn => i_I2C_INTn -- Interrupt input - active low | ||
+ | ); | ||
+ | |||
+ | -- Front Panel ends here | ||
+ | -- ------------------------------------------------------------------------------------------------------- | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | === Arduino Driver === | ||
* I2C parts are standard MCP23017 drivers which are supported in Arduino and most microprocessors | * I2C parts are standard MCP23017 drivers which are supported in Arduino and most microprocessors | ||
+ | ** [https://github.com/land-boards/lb-Arduino-Code/tree/master/libraries/LandBoards_MCP23017 LandBoards_MCP23017 library] | ||
+ | ** [https://www.arduino.cc/en/Guide/Libraries?setlang=en#importing-a-zip-library Importing an Arduino ZIP library] | ||
+ | |||
+ | === Micro-Python === | ||
+ | |||
+ | * [https://github.com/land-boards/lb-Python-Code/blob/master/MicroPython/PyBoard%20Clone/libraries/mcp23017/mcp23017.py Micro-Python driver for MCP23017] | ||
+ | |||
+ | === C Code === | ||
+ | |||
* [https://github.com/douggilliland/Retro-Computers/tree/master/Z80/PSOC/PSOC_Design_Files/Z80-PSoC-3-Chips_002/Z80_3Chip.cydsn PSoC driver GitHub Repo] | * [https://github.com/douggilliland/Retro-Computers/tree/master/Z80/PSOC/PSOC_Design_Files/Z80-PSoC-3-Chips_002/Z80_3Chip.cydsn PSoC driver GitHub Repo] | ||
+ | ** [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/PSOC/PSOC_Design_Files/Z80-PSoC-3-Chips_002/Z80_3Chip.cydsn/FrontPanel.c FrontPanel.c] | ||
+ | ** [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/PSOC/PSOC_Design_Files/Z80-PSoC-3-Chips_002/Z80_3Chip.cydsn/FrontPanel.h FrontPanel.h] | ||
+ | ** [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/PSOC/PSOC_Design_Files/Z80-PSoC-3-Chips_002/Z80_3Chip.cydsn/MCP23017.c MCP23017.c] | ||
+ | ** [https://github.com/douggilliland/Retro-Computers/blob/master/Z80/PSOC/PSOC_Design_Files/Z80-PSoC-3-Chips_002/Z80_3Chip.cydsn/MCP23017.h MCP23017.h] | ||
+ | |||
+ | == Assembly Sheet == | ||
+ | |||
+ | [[Front Panel Assembly Sheet Rev 1]] |
Latest revision as of 14:47, 4 February 2023
Contents
Front Panel for 8-Bit Microprocessors
Top row controls
Typical controls.
Features
It has these features. They may not fit your generic design. Especially since this card has to have an I2C interface.
- 32 Pushbutton Switches
- 32 LEDs
- I2C interface (Two Wire interface - plus power and ground)
- Jumper selectable base address
- Occupies I2C addresses either 0x20-0x23 or 0x24-0x27
- Jumper Selectable I2C terminators
- I2C daisy-chain connector
- Interrupt line
- Can be configured to interrupt on button presses
- MCP23017 need to be set to Open-Drain output - card has pull-up to Vcc
- Interrupt line
- 4 MCP23017 16-bit I2C Port Expanders
- These are fine pitch surface mount parts
- MCP23017 Datasheet - Rev D
- MCP23017... LOST TWO INPUTS
- MCP23017 now a 14/16-bit expander, with two of the pins (GPA7 and GPB7) losing their input capabilities
- The chips look the same, are called the same, and act mostly the same — if you don’t download the latest version of the datasheet (Revision D), you’d never know that there’s been a change
- 3.3V or 5V operation
- Compatible form factor with RETRO-EP4CE15 and other cards
- 95x95mm
- 6-32 mounting holes
Connector
J2 - I2C Connector
- Two row header on bottom of card
- 5 pin in
- 4 pin out (daisy-chain)
- GND
- VCC
- SDA
- SCL
- INT*
And
- GND
- VCC
- SDA
- SCL
Schematic
Drivers
VHDL Driver
- VHDL code to control Front Panel autonomously
- Great for FPGA Retro-computers
- Converts pushbuttons into raw, debounced, and toggled outputs
- Uses IOP16 small CPU core
- Example: 6800 running MIKBUG using the Front Panel - Run/Halt the CPU, Read SRAM, ROM, etc, Write to SRAM
VHDL Entity
-- ------------------------------------------------------------------------------------------------------- -- Front Panel starts here fp01 : work.FrontPanel01 port map ( -- Clock and reset i_CLOCK_50 => i_CLOCK_50, -- Clock (50 MHz) i_n_reset => w_resetClean_n, -- Reset -- 32 outs, 32 ins i_FPLEDs => w_LEDsOut, -- Out to LEDs (32) o_PBRaw => w_PBsRaw, -- Raw version of the Pushbuttons (32) o_PBLatched => w_PBLatched, -- Latched version of the Pushbuttons (32) o_PBToggled => w_PBsToggled, -- Toggle version of the Pushbuttons (32) -- I2C interface io_I2C_SCL => io_I2C_SCL, -- I2C clock to Front Panel card io_I2C_SDA => io_I2C_SDA, -- I2C data to/from Front Panel card i_I2C_INTn => i_I2C_INTn -- Interrupt input - active low ); -- Front Panel ends here -- -------------------------------------------------------------------------------------------------------
Arduino Driver
- I2C parts are standard MCP23017 drivers which are supported in Arduino and most microprocessors