Mesa PktUART TX Enable pin for RS-485

More
01 Jun 2023 14:25 #272635 by TangentAudio
I am looking for an example VHDL pin file (or code snippet) for a PktUART that implements a transmit enable pin.  I have a custom board with a galvanically isolated RS485 driver on it, and I need a way to control the direction of the converter.  I currently run it with an FTDI USB-Serial converter which has a TXEN output for this purpose, but would like to move it to the Mesa so I can use the new RT-MODBUS stuff.

I've seen vague reference that it exists but haven't yet found a clear example in the source.

thanks,
Steve

Please Log in or Create an account to join the conversation.

More
01 Jun 2023 14:54 - 01 Jun 2023 15:40 #272636 by PCW
The pin description would be something like this:

 IOPortTag & x"00" & PktUARTTTag & PktUTDrvEnPin,
 (active Low)

Also note that you should use recent source that includes version 2 PktUART source
especially for low baud rate interfaces, as version 2 has more accurate low baud rate
settings and RX  data digital filter time constants that extend down to ~600 baud

        (PktUARTTTag,    x"02",    ClockLowTag,    x"01",    PktUARTTDataAddr&PadT,        PktUARTTNumRegs,        x"00",    PktUARTTMPBitMask),
        (PktUARTRTag,    x"02",    ClockLowTag,    x"01",    PktUARTRDataAddr&PadT,        PktUARTRNumRegs,        x"00",    PktUARTRMPBitMask),



 
Last edit: 01 Jun 2023 15:40 by PCW.
The following user(s) said Thank You: TangentAudio

Please Log in or Create an account to join the conversation.

More
01 Jun 2023 16:38 #272642 by TangentAudio
Thanks Peter, much appreciated. I think my code is from March, but I'll double check. Is there an easy place to check that it's the version 2 code?

Please Log in or Create an account to join the conversation.

More
01 Jun 2023 17:00 #272644 by PCW
You need newer sources
The changed sources are pktuartx.vhd and pktuartr.vhd they were updated
April 5 2023

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.125 seconds
Powered by Kunena Forum