BBC BASIC for Windows
« SERIAL PORT »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:13pm



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  (Read 776 times)
wyzeowl
New Member
Image


member is offline

Avatar




PM


Posts: 5
xx SERIAL PORT
« Thread started on: Apr 6th, 2013, 12:29pm »

I have the need to clear the serial port buffer after every read. I believe that there used to be an OSbyte command to do this. Is ther anything I can do.
Thankyou
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: SERIAL PORT
« Reply #1 on: Apr 6th, 2013, 3:37pm »

on Apr 6th, 2013, 12:29pm, wyzeowl wrote:
I have the need to clear the serial port buffer after every read.

The most straightforward way is probably to read (and discard) bytes until the buffer is empty:

Code:
     WHILE EXT#com% junk% = BGET#com% : ENDWHILE 

Richard.
User IP Logged

wyzeowl
New Member
Image


member is offline

Avatar




PM


Posts: 5
xx Re: SERIAL PORT
« Reply #2 on: Apr 7th, 2013, 4:34pm »

Richard
Thankyou very much for your solution, I have inserted it in my programme and it works ... many thanks.
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