183
C-Control Pro Mega Series
© 2008 Conrad Electronic
int i;
char str[
10
];
str=
"test"
;
i=
0
;
// initialize serial port with 19200baud, 8 bit, 1 stop bit, no parity
// 20 byte receive buffer - 15 byte send buffer
Serial_Init_IRQ(
0
,buffer,
20
,
15
,SR_8BIT|SR_1STOP|SR_NO_PAR,SR_BD19200);
while(str[i]) Serial_Write(
0
,str[i++]);
// display string
}
6.16
SPI
Presently the SPI interface is used on the Applicationboard to receive USB data from the Mega8
controller. In the future additional functions will be available to support SPI communication to other
devices.
6.16.1 SPI_Disable
SPI Functions
Syntax
void SPI_Disable(void);
Sub SPI_Disable()
Description
The SPI will be disabled and the corresponding ports can be used otherwise.
Disabling the SPI interface will prevent usage of the USB interface on the application board. On the
other hand, if you don't use the USB interface, SPI_Disable() will allow to use these ports for other
purposes.
Parameter
None
6.17
Strings
One part of these string routines is implemented in the Interpreter, another can be called up after
appending library "String_Lib.cc". Since the functions in "String_Lib.cc" are realized through
Bytecode they are slower when executed. Library functions however have the advantage that they
can be taken from the project by omitting the library in case they are not needed. Direct Interpreter
functions are always present, will however take up flash memory.
There is no explicit "String" data type. A string is based on a character array. The size of the array
Summary of Contents for C-Control Pro Mega Series
Page 1: ... 2008 Conrad Electronic C Control Pro Mega Series ...
Page 9: ...VIII Inhalt 2008 Conrad Electronic ...
Page 10: ...Part 1 ...
Page 17: ...Part 2 ...
Page 23: ...Part 3 ...
Page 41: ...32 Hardware 2008 Conrad Electronic 3 3 5 3 Component Parts Plan ...
Page 57: ...48 Hardware 2008 Conrad Electronic 3 4 5 3 Component Parts Plan ...
Page 58: ...Part 4 ...
Page 91: ...82 IDE 2008 Conrad Electronic ...
Page 92: ...Part 5 ...
Page 135: ...126 Compiler 2008 Conrad Electronic 31 1F US 63 3F 95 5F _ 127 7F DEL ...
Page 136: ...Part 6 ...
Page 231: ...Part 7 ...
Page 240: ......