UART-Process by ISR
(1) taking advance of [Maestro] application module, Application Maestro
for PIC18 series.
I'd been trying that UART2TCPBridge sample for reference of my apps, but fail..~_~
(2) make sure that pic18 system-clock rate
2a. PIC18net.2 board based
2b. In the "HardwareProfile.h", we found that..
(line156)
..
#ifdefine (PICDEMNET2) ||..
#define GetSystemClock() (41666667ul) //HZ
..
The system clock is "41.67MHZ".
2c. Maestro utility for USART interrupt by C, instead of Assembly
By default installation, the installed folder is "C:\Program Files\Microchip\MpAM".
2d. baudrate: 19200 bps
2e. have the 3 files putting into "the whole project"..
(1) UARTIntC.c
(2) UARTIntC.h
(3) UARTIntC.def
2f. In the main function of initialized state
call this function, "UARTIntInit()" calling.
2g. using the below pressure-testing code for Receiving and Sending..
...
//pressure testing for UART-communication by -----.---, 2010/04/03
if(!vUARTIntStatus.UARTIntRxBufferEmpty)
{
UARTIntGetChar(&chData);
if(!vUARTIntStatus.UARTIntTxBufferFull)
UARTIntPutChar(chData);
}//end of UART RCV-buffer not EMPTY
...
(3) pressure-testing, (N/G).. how come?!
2010年4月3日 星期六
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言