Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

clear serialin2 - Bascom ERROR

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
quadcore

Bascom Member



Joined: 14 Sep 2011
Posts: 1

blank.gif
PostPosted: Thu Nov 27, 2014 12:48 pm    Post subject: clear serialin2 - Bascom ERROR Reply with quote

I start a new thread here. The old one can be found at:

http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=12626&highlight=m128


I just tested on the new Bascom version, and the question remains... so here's the case again:




I'm using the second uart on an atmega128

according to help, I should use serialin1 for UART1, and clear serialin2 to clear its buffer

Quote:
SerialIn
Some chips have multiple HW UARTS. Use the following parameter values:

· SERIALIN or SERIALIN0 : first UART/UART0

· SERIALIN1 : second UART/UART1




I get the following error:

Error : 31 Line : 244 Invalid data type [[0011] 0[_RS_HEAD_PTR3]] , in File : atmega128_2.bas

here's a code snippet:





Code:

$baud1 = 9600

'---- UART Config ----
Config Com2 = 9600 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
Config Serialin1 = Buffered , Size = 100 , Bytematch = 13
Open "com2:" For Binary As #2

Serial1charmatch:
   my_string = ""
   Input #2 , my_string Noecho
   Clear Serialin2
Return

 


I tried clear serialin1, and it compiles

here's what bothers me:





Quote:
from help
Bufname
Serial buffer name to clear.



SERIALIN, SERIALIN0 - COM1/UART0 input buffer

SERIALIN2 - COM2/UART1 input buffer




QUESTION:

is it a false statement in bascom' s help or am I missing something ?


tested on 2.0.7.5 and 2.0.7.7

(BASCOM-AVR version : 2.0.7.7 )
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 6197
Location: Holland

blank.gif
PostPosted: Thu Nov 27, 2014 1:43 pm    Post subject: Reply with quote

What bothers me is that you use an illegal version.
_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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