12.07.2015 Views

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

char I2C_RECEIVE_BYTE(char Last);void I2C_SEND_MESSAGE(char Device_ID, char AddrH, char Data);char I2C_RECEIVE_MESSAGE(char Device_ID, char AddrH);LCD FUNCTIONSvoid LCD03_SET_CURSOR(char FCL_CURSOR);void LCD03_CLEAR_SCREEN();void LCD03_BACKLIGHT_ON();void LCD03_BACKLIGHT_OFF();void LCD_WRITE_STRING( const unsigned char * pString );void LCD03_WRITE_INT(int ii);void LCD03_WRITE_BYTE(char ii);void LCD03_CLEAR_LINE(char line); // line 0-1-2-3STRING FUNCTIONSunsigned char STR_LEN( const char *p );bit STR_EQUAL( const char *p, const char *q );bit STR_PREFIX( const char *p, const char *q );void STR_COPY( char *p, unsigned char s, char *q, unsigned char n );bit CHAR_IN( char c, const char * s );bit STRING_IN( const char * p, const char * q );RS232/UART FUNCTIONSvoid UART_INIT_1200( void );void UART_INIT_2400( void );void UART_INIT_4800( void );void UART_INIT_9600( void );void UART_INIT_19200( void );void UART_INIT_57600( void );void UART_INIT_115200( void );void UART_INIT_250000( void );bit UART_CHAR_AVAILABLE( void );char UART_CHAR_RECEIVE( void );bit UART_SEND_IDLE( void );void UART_CHAR_SEND( char c );void UART_STRING_SEND( const char *p );void UART_STRING_RECEIVE(char *received,unsigned char received_size, unsignedint milli<strong>se</strong>conds,const char * terminate,const char * ignore);ADC FUNCTIONSunsigned int READ_ADC_INT_CHANNEL( unsigned char channel );unsigned char READ_ADC_BYTE_CHANNEL( unsigned char channel );For the AVR ATMEGA32:FLOWCODE 4 FOR AVR: the demo program: “PROTDEM_FCAVR_EMPTY” alreadycontains <strong>se</strong>veral pre-written macro’s that make the programming of the PROTONunder FC even easier. Just start with this EMPTY file to develop your own projects.We have also written a couple of demo programs in FC4 for AVR that can bedownloaded from the elektor website.WINAVR GCC C compiler under AVRSTUDIO (FREE!!): We have developed a library ofinstructions concerning the LCD, I2C, UART, Strings and A/D to make using the<strong>se</strong>functions a lot easier. This library is: “AVR_PROTON_LIB.c” andBart Huyskens <strong>Manual</strong> <strong>Elektor</strong> <strong>Proton</strong> V1.0 3 April 2011 17

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

Saved successfully!

Ooh no, something went wrong!