Communication Pic/UART <=> modem
bonjour tout le monde,
voila j'aimerais commander un moden 56K Olitec V90 via la liaison RS232 d'un pic 18F, donc utilisation de l'uart.
j'ai fait qq recherche et je programme donc une fonction qui accède au modem :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| #ifndef __APELLE_H
#define __APELLE_H
#include "TCPIP Stack/UART.h"
#include "TCPIP Stack/TCPIP.h"
#include "usart.h"
#include "stdlib.h"
//#include "p18f97j60.h"
#include <usart.h>
#include <stdio.h>
void APELLE (void)
{
static TICK t = 0;
OpenUSART ( USART_TX_INT_OFF &
USART_RX_INT_OFF &
USART_ASYNCH_MODE &
USART_EIGHT_BIT &
USART_CONT_RX &
USART_BRGH_HIGH,
64 );
if(TickGet() - t >= TICK_SECOND/2)
{
//t = TickGet();
LED5_IO ^= 1;
}
putrsUSART("AT\r");
CloseUSART();
} |
mais on me retourne
Code:
1 2 3 4 5 6 7 8
|
MPLINK 4.12, Linker
Copyright (c) 2007 Microchip Technology Inc.
Error - could not find definition of symbol 'OpenUSART' in file 'C:\PPP\MainDemo.o'.
Errors : 1
Link step failed.
BUILD FAILED: Thu Aug 30 12:39:06 2007 |
alors que OpenUSART est bien la dans usart.h
Code:
void OpenUSART (PARAM_SCLASS unsigned char config, PARAM_SCLASS unsigned spbrg);
merci pour votre aide ;-)