This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

UART_Routines.h

By: a guest on Nov 5th, 2010  |  syntax: C++  |  size: 0.93 KB  |  views: 169  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //**************************************************************
  2. //******** FUNCTIONS FOR SERIAL COMMUNICATION USING UART *******
  3. //**************************************************************
  4. //Controller: ATmega168 (Clock: 8 Mhz-internal)
  5. //Compiler: AVR-GCC
  6. //Version : 2.0
  7. //Author: CC Dharmani, Chennai (India)
  8. // www.dharmanitech.com
  9. //Date: 26 Feb 2009
  10. //**************************************************************
  11.  
  12. //**************************************************
  13. // ***** HEADER FILE : UART_routines.h ******
  14. //**************************************************
  15.  
  16. #ifndef _UART_ROUTINES_H_
  17. #define _UART_ROUTINES_H_
  18.  
  19.  
  20. #define CHAR 0
  21. #define INT  1
  22. #define LONG 2
  23.  
  24.  
  25. #define TX_NEWLINE {transmitByte(0x0d); transmitByte(0x0a);}
  26.  
  27. unsigned char receiveByte(void);
  28. void transmitByte(unsigned char);
  29.  
  30. void transmitHex( unsigned char dataType, unsigned long data );
  31. void transmitString_F(char*);
  32. void transmitString(unsigned char*);
  33.  
  34.  
  35. #endif
clone this paste RAW Paste Data