View previous topic :: View next topic |
Author |
Message |
brantb
Joined: 23 Mar 2015 Posts: 18
|
Posted: Tue Mar 27, 2018 9:54 pm Post subject: RS-485, Config Print, and Buffered Output |
|
|
Hi Mark,
I see in the Help, it indicates that Config Print does not work with buffered output. Can you tell me if this is still currently the case?
If that is still the case, are there any plans to enhance the RS-485 (Config Print) support in a future version so that the direction signal will work with buffered output? If would certainly be very nice to have non-blocking (i.e., buffered) communications along with the built-in direction handling.
In the meantime, I would be quite willing to look after the direction pin myself (i.e., without the use of Config Print) - however, I would have to tie into the UART's TX Complete interrupt to do it properly, and I have a feeling BASCOM's own routines (especially running in buffered output mode) would not be happy with that.
Am I right on that point ... or, is there a way that I could daisy-chain my own short ASM routine to fire after your routines have run for the TX Complete?
(In case it make a difference ... in my current, specific case, I am dealing with an Xmega. So, if your answer must be suitably specific, that is perfectly fine. Having said that, I would also be interested in a general answer - if it is different.)
Cheers,
Brant
(BASCOM-AVR version : 2.0.7.8 , Latest : 2.0.8.1 ) |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Mar 28, 2018 8:46 pm Post subject: |
|
|
yes it is still the case and there are no plans to change it until we got a lot of questions about it. or a customer with deep pockets.
you can have a look at the xmega lib where the serial comm is located.
also an option is to check $serialoutput but i did not check how this plays out with xmega. it might be the best option. and if it doesnt support xmega i am willing to change it. _________________ Mark |
|
Back to top |
|
|
brantb
Joined: 23 Mar 2015 Posts: 18
|
Posted: Wed Mar 28, 2018 9:57 pm Post subject: |
|
|
Thanks, Mark. I totally understand that this would be something based on lots of hands going up, or dollars flowing . Since no one else seems to have asked about it, I will not hold my breath.
The idea of $serialoutput is a good one (and there is no surprise there, since you came up with it ).
The Help only refers to $serialouput and $serialoutput1 (i.e. no $serialoutput2, etc.) - so, am I right to think that this redirect is only supported on the first COM port?
Also, from the help:
Quote: | Label: The name of the assembler routine that must be called when a character is send to the serial buffer (UDR). |
Does this mean that the character will already have been put in the UDR, and then my assembler routine will be called? Or, do I need to make sure that my routine transfers R24 into the UDR? |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Mar 29, 2018 9:36 am Post subject: |
|
|
yes it is only for the first and second ports.
I have no idea if anyone uses it. I never got question for extension.
like the help says, you get the data in R24.
you can do with that data what you like.
like placing inside a buffer.
in the xmega.lib you find the serial routines. but as you use it on 1 fixed com, you can write to the fixed uart regs too. _________________ Mark |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|