BBC BASIC for Windows
« Serial port buffer »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:55pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Serial port buffer  (Read 1111 times)
manxman
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 21
xx Re: Serial port buffer
« Reply #4 on: Dec 12th, 2012, 8:31pm »

Hmmm.

My program will only ever be running on a specific machine which is acting mainly as a data logger. I had never considered the use of a timer interrupt (and have no experience of such). From the link you give I could presumably increase the buffer size by including the statement:

_In_ A% dwInQueue

in my code, where A% is the desired size of the input buffer.

Regards,

Manxman
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Serial port buffer
« Reply #5 on: Dec 12th, 2012, 9:34pm »

on Dec 12th, 2012, 8:31pm, manxman wrote:
From the link you give I could presumably increase the buffer size

Yes, the SetupComm API function is the way to try to increase it. The MSDN description doesn't make clear whether a 'success' return from the function (i.e. a non-zero value) means that the requested buffer size was accepted, but if in doubt you can always call the GetCommProperties API which returns the current buffer size in the dwCurrentRxQueue member. If I try to double the buffer size from the default 4096 bytes to 8192 bytes, here it succeeds:

Code:
      SYS "SetupComm", @hfile%(channel%), 8192, 0 

Richard.
User IP Logged

manxman
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 21
xx Re: Serial port buffer
« Reply #6 on: Dec 13th, 2012, 4:43pm »

laugh Wunderbar.

I will include that call in my program and hopefully that will provide my solution.

Thanks again for your professional support.

Manxman
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls