BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Sun Oct 21, 2018 3:11 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: sethserial1 don't work
PostPosted: Tue Feb 18, 2014 4:21 pm 
Offline
Guru

Joined: Mon Dec 21, 2009 6:52 am
Posts: 92
Hi

i am trying to communicate between an BAP24 and a redline module through UART.
I need to set up the serial parameters as follow :

Code:
 sethserial1 H115200 {,h8databits,hnoparity,h2stopbits}


It won't compile and the error is unexpected token type for either the "," or "{"
It only compile when I only set the baud rate such as follow :

Code:
sethserial1 H115200


Its' not enough to communicate with an other UART

What should I do?

Thanks

Chris


Top
 Profile  
 
 Post subject: Re: sethserial1 don't work
PostPosted: Thu Feb 20, 2014 2:08 am 
Offline
Site Admin
User avatar

Joined: Fri Apr 12, 2013 8:38 pm
Posts: 87
Location: Nottingham, England, UK
Hi

The problem here is you have entered the brackets, the use of these { } in the manual is to show that the extra arguments in the brackets are optional with the command,

Code it like this :-

Code:
sethserial1 H115200,h8databits,hnoparity,h2stopbits


And it will compile fine,

I hope this helps,

Dave
BasicMicroUK
http://www.basicmicro.co.uk


Top
 Profile  
 
 Post subject: Re: sethserial1 don't work
PostPosted: Thu Feb 20, 2014 8:25 am 
Offline
Guru

Joined: Mon Dec 21, 2009 6:52 am
Posts: 92
Sorry but it's still not compile.
I am using a BAP24 and the following code is still not working.
Are you sure it is for you?

Code:
sethserial1 h9600,H8DATABITS,HNOPARITY,H2STOPBIT
string var byte(30)


main:
    hserout ["Type a string upto 20 characters long",13]
    hserin [str string\30\13]
   serout s_out,i9600,[str string\30,13]
goto main


thanks


Top
 Profile  
 
 Post subject: Re: sethserial1 don't work
PostPosted: Thu Feb 20, 2014 4:39 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
I think it is a problem between documents and actual code.

That is it should be: sethserial1 h9600, H8DATABITS, HNOPARITY, H2STOPBITS

(Note the S at the end of STOPBITS)


Top
 Profile  
 
 Post subject: Re: sethserial1 don't work
PostPosted: Thu Feb 20, 2014 8:13 pm 
Offline
Site Admin
User avatar

Joined: Fri Apr 12, 2013 8:38 pm
Posts: 87
Location: Nottingham, England, UK
HI,

YES I have a set-up active in the lab all the time with a Pro-24 hooked up so I did run the exact code I sent to you,

I think Kurt is correct here and you missed the 'S' off StopBit, the exact spelling of the arguments is critical or you will get an undefined symbol error,

Dave
BasicMicroUK
http://www.basicmicro.co.uk


Top
 Profile  
 
 Post subject: Re: sethserial1 don't work
PostPosted: Fri Feb 21, 2014 8:01 am 
Offline
Guru

Joined: Mon Dec 21, 2009 6:52 am
Posts: 92
Thanks Kurt I should have think of it.
It's working now

Chris


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO