ADC

( IUT de Cachan - Version 12/2011 )
Source files are a variation of the Microchip MPLAB C18 libraries
Available functions :
void ADC_init(void);
///////////////////////////////////////////////////////////////////////////////
// Function name : ADC_init
// Return value : none
// Parameters : none
// escription : based on the description of the Hitachi HD44780
// this function initializes the ADC
///////////////////////////////////////////////////////////////////////////////
Initialization of the ADC.
This function configures the ADC.
void ADC_clear(void);
///////////////////////////////////////////////////////////////////////////////
// Function name : ADC_clear
// Return value : none
// Parameters : none
// Description : clears the ADC
///////////////////////////////////////////////////////////////////////////////
This function clears the ADC.
void ADC_position(char line, char column);
///////////////////////////////////////////////////////////////////////////////
// Function name : ADC_position
// Return value : aucune
// Parameters : char line
// line number (0 or 1)
// char column
// column number (0 to 15)
// Description : place the cursor on the cell (line, columns)
///////////////////////////////////////////////////////////////////////////////
Positions the cursor on the display.
The top-left position is (0,0).
colonne 0x | colonne15 | |
| | | | |
ligne 0 - |
X X X X X X X X |
X X X X X X X X |
ligne 1 - |
X X X X X X X X | X X X X X X X X |
void ADC_putc(unsigned char lettre);
///////////////////////////////////////////////////////////////////////////////
// Function name : ADC_putc
// Return value: none
// Parameters : unsigned char letter
// ASCII code of the character to display
// Description : displays a character on the display and takes care of
// special characters \n \f \b
///////////////////////////////////////////////////////////////////////////////
Displays a character at the cursor position.
The cursor is displaced one cell on the right.
Special characters are interpreted (see below).
int ADC_printf(const rom char *f, ...);
///////////////////////////////////////////////////////////////////////////////
// Function name : ADC_printf
// Return value : none
// Parameters : const rom char *f
// format string
// for a complete description of the allowed commands,
// see MPLAB_C18_Libraries_51297f.pdf §4.7
// the float format (%f) is partially implemented
// ...
// variables to convert
// Description : displays a message on ADC
///////////////////////////////////////////////////////////////////////////////
The printf functions for the ADC.
For a full description of the allowed formats, see MPLAB_C18_Libraries_51297f.pdf §4.7
Supported special characters :
\n carriage return (ne works only to pass form line 0 to 1)
\b to go back one cell
\f to clear the screen
Connections :
Pins - ADC
D0 - E
D1 - RS
D2 - RW
D3 - not connected
D4-D7 - Data[4..7]