BeMicroCV EEPROM modification, an example of i/o reassignment Purpose: To allow P1V to boot a binary image from an on-board EEPROM Device: Only applied to the BeMicroCV board, may be adapted to BeMicroCVA9 later. Method: Remove and replace existing SMD EEPROM and replace with a larger device. Date: Aug 27, 2015 Version 1.0 Author: Loopy Byteloose ++++++++++++++++++++++++++++++++++++++++++++++++++++ Where to start READ THIS WHOLE TEXT before you do anything. Then decide if you are willing to be careful and double check your work. This is a hack that may damage your device by errors in soldering or errors in code entry. ++++++++++++++++++++++++++++++++++++++++++++++++++++ One MUST use two primary references. A. Hardware_Reference_Guide_for_BeMicro_CV_A2_v1.04.pfd B. P1V code and related documentation as provided by Jac Goudsmit's Githup repositories. One needs to confirm A. The hardware exchange details. B. What P1V Verilog code requires revision. +++++++++++++++ Facts A. The onboard EEPROM is an 8 pin SMD device specifically hardwired to Cyclone V P16 (EEPROM_SDA)and P17 (EEPROM_CLK) and these are not the same as the Propeller P16 and P17 B. U4 in the BeMicroCV component listing indicates an on-board EEPROM s being a AT24C01BN-SH-T. So the replacement should be selected to be physically and electrically compatible. C. Jac Goudsmit's P1V Verilog code does support Propeller Pins 28 and Pin 29 in a standard Propeller 1 configuration that expects an EEPROM at those locations. But the actual Cyclone V provides a separate notation scheme of i/o pins. They look similar and can be misleading. D. The on-board SMD EEPROM was investigated in the provided schematic (see page 16 of BeMicroCV-A2 documentation) and confirmed that both the Write function will remain available, and that the Address Bits agree with Parallax Propeller 1 conventions. E. BeMicroCV documentation has typos that make things a bit more work. PinHeader_A appears to be equal to J1 and PinHeader_B to be equal to J4. The listing of PinHeader_A doesn't show how it corresponds to the physical layout, so one has to also refer to the schematic of J1 to reach a good solution. For diverting P28 (SCLK) and P29 (SDA) of the Propeller 1 to the Cyclone V notation, we need to to know that these i/o are assigned to J1 which is the true PinHeader_A. (We have been provided by BeMicro with a photo showing both J1 and J4 as PinHeader_A.) What to do 1. Acquire a 24C256 or larger replacement SMD. The 24LC256 should be as good or better. Remove the unwanted device and solder in place the replacement. 2. Determine what line of code in the P1V needs to change in order to divert Pin 28 and Pin 29 to the on board device. An adaptation of the existing BeMicroCV.qsf file appears required in Cyclone V i/o notation. With nearly two hunderd of i/o pins in use, this may seem daunting. Focus on the just the required changes, and don't change anything else. You need to locate and edit the original BeMicroCV.qsf file, only the two lines related to Propeller Pin 28 and Propeller Pin 29. Do not change anything else. BeMicroCV documents refer to PinHeader_A (J1) and PinHeader_B (J4), which can be compared to the P1V documentation (provide as a png photo and in the actual Verilog code) to identify what the Cyclone V intentities are. NOTE - The 80 pin Edge Connector and the PinHeader_A/PinHeader_B appear to NOT share the same 80 pins, and in fact it uses only about 60 of the i/o pins. 3. Locate and re-designated in the P1V code. Locate lines 63 and 64 of the original BeMicroCV.qsf file. These begin with 'set_location_assignment', then the Altera Cyclone V i/o assignment, and finally the Propeller 1 equivalent. Line 63 assigns Altera's Pin_U12 to io[29] which provides SDA Line 64 assigns Altera's Pin_R9 to io[28] which provides SCLK Pin_U12 and Pin_R9 will no longer be supported if you follow this method. There may be a way to configure these pins to remain shared with the on-board EEPROM, but that has not been determined. Revise these two lines only to read as follows: Line 63 - set_location_assignment -to Pin_P16 io[29] Line 64 - set_location_assignment -to Pin_P17 io[28] Review everything. Verify that you have the SDA going to the right pin and the SCLK going to the right pin. ERRORs may to i/o damage. 4. Use Quartus II to create and load the reconfigured P1V using the modified BeMicroCV.qsf file. ++++++++++++ WARNING ++++++++++++ Verify your work carefully. I won't accept any responsiblity for board damage. Typographic errors can easily assign i/o control to the wrong location and do unexpected harm. I have checked and rechecked this text. Currently, I have no SMD EEPROMs to do the modification. So full verification that this will work is still pending. Let me know if there is anything unclear or obviously wrong.