Mesa PktUART TX Enable pin for RS-485
- TangentAudio
- Offline
- Premium Member
-
Less
More
- Posts: 99
- Thank you received: 24
01 Jun 2023 14:25 #272635
by TangentAudio
Mesa PktUART TX Enable pin for RS-485 was created 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
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.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18491
- Thank you received: 5060
01 Jun 2023 14:54 - 01 Jun 2023 15:40 #272636
by PCW
Replied by PCW on topic Mesa PktUART TX Enable pin for RS-485
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),
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.
- TangentAudio
- Offline
- Premium Member
-
Less
More
- Posts: 99
- Thank you received: 24
01 Jun 2023 16:38 #272642
by TangentAudio
Replied by TangentAudio on topic Mesa PktUART TX Enable pin for RS-485
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.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18491
- Thank you received: 5060
01 Jun 2023 17:00 #272644
by PCW
Replied by PCW on topic Mesa PktUART TX Enable pin for RS-485
You need newer sources
The changed sources are pktuartx.vhd and pktuartr.vhd they were updated
April 5 2023
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: PCW, jmelson
Time to create page: 0.090 seconds