reserved words
Posted: Wed Jan 16, 2013 11:54 pm
>
> Hello everyone! I just purchased an ARMexpress LITE, and have a project going
with it already.
>
> I am trying to interface with an SPI device, and I cannot get the simplest of
things to work in the compiler.
>
> For instance, here is my program:
>
>
> #include
>
> SUB sendData(data)
> str$(0) = data
> 'SPIOUT (CS, CLK, DATA, LSBfirst, 1, str$)
> END SUB
>
>
> And I get the following errors:
>
>
> SUB sendData(data)
> -ERROR In Line PhilipsLCD_testing.bas: 11: parameter error1, found data)
>
> str$(0) = data
> -ERROR In Line PhilipsLCD_testing.bas: 12: Expected Integer Variable or IO,
found (0) = data
>
> SPIOUT (CS, SCLK, SDATA, LSBfirst, 1, str$)
> -ERROR In Line PhilipsLCD_testing.bas: 13: Expected string variable, found
str$)
>
> SPIOUT (CS, SCLK, SDATA, LSBfirst, 1, str$)
> -ERROR In Line PhilipsLCD_testing.bas: 13: Expected End Of Line, found str$)
>
> SPIOUT (CS, SCLK, SDATA, LSBfirst, 1, str$)
> -First ERROR at line :11
>
>
> I just don't get it... If anyone can offer a simple solution to this, I would
be grateful.
> Thank you!
>
I'm sorry, the program is actually
#include
CONST CS = 8
CONST SCLK = 9
CONST SDATA = 10
CONST RST = 11
CONST LSBfirst = 0
CONST MSBfirst = 1
SUB sendData(data)
str$(0) = data
SPIOUT (CS, SCLK, SDATA, LSBfirst, 1, str$)
END SUB
> Hello everyone! I just purchased an ARMexpress LITE, and have a project going
with it already.
>
> I am trying to interface with an SPI device, and I cannot get the simplest of
things to work in the compiler.
>
> For instance, here is my program:
>
>
> #include
>
> SUB sendData(data)
> str$(0) = data
> 'SPIOUT (CS, CLK, DATA, LSBfirst, 1, str$)
> END SUB
>
>
> And I get the following errors:
>
>
> SUB sendData(data)
> -ERROR In Line PhilipsLCD_testing.bas: 11: parameter error1, found data)
>
> str$(0) = data
> -ERROR In Line PhilipsLCD_testing.bas: 12: Expected Integer Variable or IO,
found (0) = data
>
> SPIOUT (CS, SCLK, SDATA, LSBfirst, 1, str$)
> -ERROR In Line PhilipsLCD_testing.bas: 13: Expected string variable, found
str$)
>
> SPIOUT (CS, SCLK, SDATA, LSBfirst, 1, str$)
> -ERROR In Line PhilipsLCD_testing.bas: 13: Expected End Of Line, found str$)
>
> SPIOUT (CS, SCLK, SDATA, LSBfirst, 1, str$)
> -First ERROR at line :11
>
>
> I just don't get it... If anyone can offer a simple solution to this, I would
be grateful.
> Thank you!
>
I'm sorry, the program is actually
#include
CONST CS = 8
CONST SCLK = 9
CONST SDATA = 10
CONST RST = 11
CONST LSBfirst = 0
CONST MSBfirst = 1
SUB sendData(data)
str$(0) = data
SPIOUT (CS, SCLK, SDATA, LSBfirst, 1, str$)
END SUB