0
\$\begingroup\$

schematic

I´m implementing a floppy disk to USB adapter as a freetime project. I´m using the WD37C64C as controller IC and the PIC32MX230F256D as microcontroller to translate the signals to USB.

Would you recommend programming the PIC32 on an external board? Or build the whole thing on one PCB?

Another thing that bothers me is the OSC crystal. Also I couldn´t find the capacitor size needed for the crystals. From the datasheet I deduced that I can dimension the part between 4 and 10 MHz. Do I need two crystals (SOSCI and OSC1) or is the one for SOSCI sufficient? And if I´m using the PMP ports (PMD & PMA), how do I program the microcontroller? I do know I need 5 to 3.3 V level shifter.

\$\endgroup\$
2
  • \$\begingroup\$ In your symbol, you should give your pins names, all they have are the pad numbers right now. This makes it difficult to see/diagnose anything that is going on because I have no idea which chip package you are using (it is available in leadless/VTLA, QFN, and TQFP packages which have different pin numbering). Either way, you should have a method to program it without desoldering it. \$\endgroup\$
    – Ron Beyer
    Commented Apr 1, 2020 at 15:12
  • \$\begingroup\$ The floppy controller is a 44 pin PLCC and the PIC is a TQFP-44. \$\endgroup\$ Commented Apr 1, 2020 at 15:18

1 Answer 1

1
\$\begingroup\$

Would you recommend programming the PIC32 on an external board? Or build the whole thing on one PCB?

Putting them on the same board makes the construction simpler and cleaner, but putting the MCU on a separate board could make it easier to program.

For prototypes I sometimes mount the MCU on an SMD to DIP converter (possibly with crystal and other essential parts) which is plugged into the main board. Then I can remove the MCU module and program it stand-alone, which eliminates potential issues with interference from other devices on the board. If I decide to make a 'production' board the MCU module can be used in other projects.

However if the design is unlikely to need many hardware changes during development I prefer to just make one 'final' board with everything on it, as this saves time and money. Then I include an ICSP header, which may require jumpers to isolate other parts of the circuit while programming.

I couldn´t find the capacitor size needed for the crystals. From the datasheet I deduced that I can dimension the part between 4 and 10 MHz.

Capacitor values depend on the crystal. If you don't need extreme accuracy then 'standard' values (eg. 22 pF) should be OK provided it oscillates reliably.

Do I need two crystals (SOSCI and OSC1) or is the one for SOSCI sufficient?

One crystal should be enough. The primary oscillator is required for normal operation. In this application you don't need low power or a real-time clock, which are the main uses of the secondary oscillator.

And if I´m using the PMP ports (PMD & PMA), how do I program the microcontroller?

If programming pins are shared with the Parallel Master Port then you may need jumpers to isolate the MCU from the disk controller during programming. However the MCU has several programming pin options, so if you juggle it right you might be able to free up some pins or share them with signals that don't interfere.

\$\endgroup\$
8
  • \$\begingroup\$ So if I add a ICSP header connector, I´d be able to program the MCU while being soldered onto the PCB with a PICkit, for example. \$\endgroup\$ Commented Apr 2, 2020 at 7:01
  • \$\begingroup\$ Yes, provided there is no interference from other components connected to the programming pins, and the board gets sufficient power. Probably best to power the board from USB and set the PICkit to 'force target power' so it doesn't try to power the board. \$\endgroup\$ Commented Apr 2, 2020 at 21:24
  • \$\begingroup\$ So, a first draft. I know the 3.3V supply is missing. Any ideas about improvements? \$\endgroup\$ Commented Apr 3, 2020 at 12:30
  • \$\begingroup\$ Instead of jumpers on D0 and D1 you could put a switch on U2 that disables it (pass the enable signal through the switch, pullup resistor will disable U2 when switch is open). You also need to control U2 DIR and /OE with PMCS1, PMWR or PMRD to ensure that data goes in the correct direction for reading and writing (must avoid bus contention!). The wire from Vcca is going to the wrong place (should be +3.3V, not /RD) and your reset switches S1 and S2 appear to be wired wrong (pullup resistor should go to Vcc with switch to ground in parallel, not in series). \$\endgroup\$ Commented Apr 3, 2020 at 23:46
  • \$\begingroup\$ Triple-check all the wiring before getting the board made! I recommend labeling every signal wire so it is easy to check, and using individual symbols for power and ground at each component so the supply wiring doesn't clutter up the schematic (you know they are all connected togetter so no need to show the wiring between them). \$\endgroup\$ Commented Apr 3, 2020 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.