Advertisement
Guest User

UART_Routines.h

a guest
Nov 5th, 2010
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.93 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement