Forum - MCS Electronics
View previous topic :: View next topic
Author
Message
quadcore Joined: 14 Sep 2011 Posts: 1
Posted: Thu Nov 27, 2014 12:48 pm Post subject: clear serialin2 - Bascom ERROR
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
albertsm Joined: 09 Apr 2004 Posts: 5913 Location: Holland
Posted: Thu Nov 27, 2014 1:43 pm Post subject:
What bothers me is that you use an illegal version. _________________ 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