• Please review our updated Terms and Rules here

FreHD Serial Port Use

NF6X

Veteran Member
Joined
Sep 9, 2013
Messages
1,534
Location
Riverside, CA, USA
Is anybody using the serial port that is present on the FreHD? If so, how? I have the impression that it is a vestigial debugging feature, and I wonder whether there is any means to access it from the TRS-80.
 
Is anybody using the serial port that is present on the FreHD? If so, how? I have the impression that it is a vestigial debugging feature, and I wonder whether there is any means to access it from the TRS-80.

While it can be used for debugging the precompiled firmware has this disabled and the serial port can be used from the TRS-80. You can see how this is implemented by looking at trs_uart.c/trs_uart.h in the PIC firmware.

The important things to know are the port addresses:

* Addr | read | write
* -----+----------+----------
* C6 | status | control
* C7 | rx data | tx data

and status bits are as follows:

/* Status bits */
#define TRS_UART_TX_OF (1 << 7)
#define TRS_UART_TX_EMPTY (1 << 6)
#define TRS_UART_RX_UF (1 << 5)
#define TRS_UART_RX_AVAIL (1 << 4)

From memory the UART implements only a single byte receive and transmit buffer and there are no interrupts so the TRS-80 must poll for data.

The baud rate is fixed at 57600 in the current firmware.
 
It was (and still is) meant to add a fast serial port to the TRS80. I never finished the work, which is another reason why I released the source code of the FreHD, hoping folks would help and enhance it :) The PIC implements the serial port with a dual 128 bytes buffer (128 in, 128 out), and the pic can provide fast serial speed. There is a some missing code in the firmware (little to do actually) and of course a driver on the TRS80 side. One can also add interrupt handling (free pin in the GAL, free GPIO in the PIC), and then a TRS80 driver. Another option is to simulate the RS232 of a real TRS80 (also doable, the gal can map the address of a real RS232 card), and you could use the lowest speeds to implement the modern ones (like replace 150bauds by 115200, etc..) Lot of opportunities there for those who want to play and learn ;) I am unfortunately very busy with other projects and work, so this has been left as-is for too long now.

-Fred
 
Neat. I'm working on what I'm calling "Deluxe FreHD", which is a re-layout of the existing FreHD board to nicely fit a 3D printable case I designed to mimic the styling of the original external hard drives. I'm considering whether to leave out the RS-232 level shifter, implement it as-is, or further modify the design to add a nice external serial port connector to the case.

I've designed and test-printed a first draft of the case, but I have not yet begun work on the PCB. I'll be re-implementing the PCB in KiCad. I've been in touch with Ian to see if he might be interested in selling this to others once I'm done with it, but that will naturally depend on whether it makes financial sense. I don't plan to go into production of this myself, except for my own use.

IMG_2872.jpg Deluxe FreHD Concept.jpg
 
Neat. I'm working on what I'm calling "Deluxe FreHD", which is a re-layout of the existing FreHD board to nicely fit a 3D printable case I designed to mimic the styling of the original external hard drives. I'm considering whether to leave out the RS-232 level shifter, implement it as-is, or further modify the design to add a nice external serial port connector to the case.

I've designed and test-printed a first draft of the case, but I have not yet begun work on the PCB. I'll be re-implementing the PCB in KiCad. I've been in touch with Ian to see if he might be interested in selling this to others once I'm done with it, but that will naturally depend on whether it makes financial sense. I don't plan to go into production of this myself, except for my own use.

View attachment 32650 View attachment 32652

Sweet! I love the retro style!
 
Any chance you can make the PCB compatible with the M1 & M3/M4 (i.e. have both the 50 pin & 40 pin interfaces on the PCB)? The case looks great by the way!

Tom
 
What I was thinking of was adding the parts from the M1 HD adapter to the PCB so one FreHD would be able to be plugged into either an M1 or M3/M4/etc. It would require a switch to disconnect the transistors from the FreHD when not using it with an M1. I'll have to look at your final design and see if I can add those pieces to a PCB. I definitely like your case design. You'll have to get a cool label like Ian has for his FreHD case to go above the SD slot. Do you have a picture/rendering of the back side of the case? Just curious to see the whole design.

Tom
 
I'm considering whether to leave out the RS-232 level shifter, implement it as-is, or further modify the design to add a nice external serial port connector to the case.

I would leave out the MAX232 and capacitors to save space but add a header to make the TTL serial lines available. Then if you really need serial you can use a low cost USB/TTL Serial adapter. I have had good success with the CP-2102 based modules on eBay.

Neat case.
 
Leaving out the MAX232 doesn't really save any space. The board size is driven by the connectors, and this board will be slightly larger than the original FreHD to accommodate the latching horizontal bus connector that I picked out. Leaving off the MAX232 would just result in empty space on the PCB, and no cost reduction on the bare PCB. Of course, one can simply not solder in the MAX232 and related components to save a few bucks.

BTW, simply putting a right-angle connector on the original FreHD doesn't work, because the connector footprint needs to be rotated 180 degrees to match right-angle connectors. That's what led me to decide to re-lay-out the FreHD board rather than wrapping a case around the existing one.

I found a PDF describing the Model I interface adapter card design. I could include such a thing on the board electrically, but I'm still considering the mechanical considerations of having the additional 40 pin connector included on the back panel. My current case design would imply having the 40 pin connector on a riser card above the 50 pin connector with added cost and complexity. Alternately, I could change the design to make the rear panel removable to allow a panel-mounted 40 pin header to be screwed on and cabled to the PCB. Either approach needs some thought. I've been thinking of this project as a simple mechanical revision of the FreHD board to put it in a pretty case, and if I'm going to start changing the electrical design at all then I'd be tempted to end up making this a very different, much more capable, and much more complicated peripheral. And then I'd probably want to go into business myself selling the thing. And I don't know if I'm ready for that level of effort vs. a "simple" project of cramming it into a case, making a few for myself, then sending one with the design files to Ian for him to play with it and to decide whether he wants to manufacture and sell them.

So, I'll consider adding a built-in Model I adapter, but I haven't made up my mind yet. I hadn't considered using any sort of HD with my Model I before.
 
Necroposting, I know, sorry. However, are many now using Frehd’s serial port, 6 years later?

Are there any known issues with particular OS’s or terminal programs etc?

When Frehd is combined with a Quinnterface it appears that everything in an RS Expansion interface bar the parallel printer port, is now replicated. Or am I missing something?
 
Hello to all

Is it possible to use the serial port of the FREHD to debug the card when it doesn't boot anymore?

Thanks
Olivier
 
Back
Top