Skip to content

Latest commit

 

History

History
87 lines (61 loc) · 3.86 KB

Design.md

File metadata and controls

87 lines (61 loc) · 3.86 KB

TRS-80_floppy_remapper

Design and PCB files

Note: at this time, I don't have an easy way to order pre-assembled boards. However, all the files needed to have them made are listed above. FWIW: I've had good results using PCBWay for all of my prototypes.

If you are looking to build a simpler version of a floppy switch (not programmable and without M4P / M4 GA support), you can read about my earlier version here:

Programming information

The following assumes you are familiar with using MPLAB X IDE. If you are not, you might want to check out some tutorials on YouTube.

You can make a programmable image from source, or use the pre-built image I've supplied.

How to build from source:

  1. Create a new project using MPLAB X IDE based on a PIC18F26Q10.
  2. Under your projects tab, "Important Files", right click to "Add item to important Files" Select "MyConfig.mc3" from this repo and add it. For help see Adding an Existing Configuration File to a Project.
  3. Open MCC
  4. Click "Generate". You should now have a list of "mcc_generated" files now, including a default "main.c".
  5. Overwrite "main.c" with the one from this repo
  6. Build the project, it should compile w/o errors.

How to build using a prebuilt Hex file:

  1. Select "File" -> "Import" -> "Hex" and select the hex file from this repo.
  2. Finish creating a new project based on a PIC18F26Q10

Programming using a PICKit 4

Note: This board has no external power supply. In order to program it, power must be supplied by the programmer.

  1. Under project properties, select PICKit 4
  2. Select Options category: Power
  3. Select "power target circuit from PICKit 4"
  4. Click Apply

Connect the programmer and program the board:

  1. Connect the 6 pin programming header of the PICKit 4 to the remapper board. Please carefully align the programming header to match the board pins! Look for the MCLR pin with an arrow on it. The 6th pin of the PICKit 4 header is not used and will not connect to anything. Nothing should be connected to the two "Run mode" jumper pins.
  2. Click Program device in the IDE


prog-header-v3

Self tests

After programming (unless held in reset) the PIC will automatically boot and run a one-time set of self tests. This will test the software and also verifies the PIC is working correctly.

The LEDs will flash through a set of patterns which will take about 15 seconds.

At the end, all of the LEDs should remain lit, with the enable LED flashing slowly. This indicates the tests passed and also helps you confirm all the LEDs are working.

View the programming video here: programming-v3

The next time the PIC boots, it will assume it has been installed into a TRS-80 and will start working normally. If you boot the PIC without having it installed, the board may behave unpredictably due to floating inputs (although there is no harm).

At the end of the tests, if an error is found, all of the LEDs will flash in an alternating pattern. This means there is either a bug in the code or a problem with the board. In order to clear the error, you must fix the problem and re-program the PIC. If you accidentally try to install the board into a computer, it will refuse to work (as the error status is saved into EEPROM).