04.03.2013 Views

Basic Micro Studio Syntax Manual

Basic Micro Studio Syntax Manual

Basic Micro Studio Syntax Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

IBIN<br />

IBIN{#max} expression{\#min}<br />

#max: optional maximum number of digits to send<br />

#min: optional minimum number of digits to send<br />

Structure - Modifi ers<br />

The IBIN modifi er, in output commands, converts stored values to ASCII characters. The example will<br />

format the value of temp so it prints out the number in a terminal window. The output would display<br />

%1100.<br />

temp var word<br />

temp = 0x0C<br />

serout s_out, i9600, [IBIN temp] ;prints “%1100”<br />

IBIN(#max) variable<br />

#max: optional maximum number of digits to receive<br />

The IBIN modifi er, for input commands, formats incoming ASCII characters into a numeric value. The<br />

example will read in ASCII characters that represent hexidecimal numbers up to 8 characters long<br />

and store the converted value in a variable. Until the indicator is received, any incoming characters<br />

are ignored. Once the indicator has been received any character not a numeral will cause the<br />

conversion to fi nish before 8 characters have been received.<br />

temp var word<br />

serin s_out, i9600, [IBIN temp]<br />

79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!