MCP215X Data Logger Demo Board User’s Guide
2.3.2.2
250-BYTE SECONDARY DEVICE (S) TO PRIMARY DEVICE DATA
TRANSFER PROGRAM DESCRIPTION
After the MCP215X Data Logger Demo Board has completed reset and the LCD mod-
ule indicates which switches to depress to select a program, depress switches S2 and
S3 simultaneously. The LCD module will indicate that the 250-byte S → P program is
selected.
You then need to specify the data transfer method. The host UART interface is
operating at 115,200 baud. There are two methods by which to accomplish this.
In the first method, the PIC16F877 will transfer data to the MCP2150 while the CTS
signal is low. This is the easiest method to implement. To select this method, depress
switch S2 . After depressing S2 , the LCD will indicate the mode of data transfer and that
it is waiting. The transfer will not commence until the PIC16F877 has received a data
byte from the Primary device.
In the second method, the PIC16F877 will transfer 64 bytes of the data table to the
MCP2150 after the falling edge of the CTS signal. This method gives the best data
throughput. To select this method, depress switch S3 . After depressing S3 , the LCD will
indicate the mode of data transfer and that it is waiting. The transfer will not commence
until the PIC16F877 has received a data byte from the Primary device.
The PIC16F877 follows the flow control of the MCP2150 to ensure that data is not lost.
The MCP2150 handles all the IrCOMM protocol for the data packets that it receives
from the PIC16F877.
After the table has completed transmission, the PIC16F877 returns to the routine that
asks for the data transfer method.
The program flow for the “250 Byte Secondary Device (S) to Primary Device (P) Data
Transfer” demo is shown in Figure 2-7.
The 250-byte data table transmitted from the MCP215X Data Logger Demo Board to
the Primary device is shown in Appendix D. “MCP215X 250-Byte Data Transmit
Table” . These values will be displayed in the Primary device’s terminal emulation
program window.
Note:
The byte sent by the Primary device is expected since most PDAs will not
establish a link until data is sent.
Depending on the PDA application program used (Palm? or Pocket PC),
the operation of the Connect button varies.
The PIC16F877 receives a single byte from the IrDA standard Primary device and then
a 250-byte table is transmitted back to the Primary device.
If you desire more than 250 bytes to be transferred, the source code is written to allow
this 250-byte table to be transmitted multiple times. At the beginning of the S → P Data
Transfer routine (routine has label S2Pxfer ), there is a #define for the TableCNTR .
This is set to ‘1’, but can be changed to allow the data table to be transmitted
“ TableCNTR ” time. TableCNTR should not be greater than D’255’ (8-bit value)
DS51516A-page 20
? 2004 Microchip Technology Inc.
相关PDF资料
MCP23X08EV BOARD EVALUATION FOR MCP23X08
MCP23X17EV BOARD EVAL FOR MCP23X17
MCP2515DM-PTPLS BOARD DAUGHTER PICTAIL MCP2515
MCP3905EV BOARD DEMO FOR MCP3905
MCP402XEV BOARD EVAL FOR MCP402X
MCP42XXEV BOARD EVALUATION MCP42XX
MCP43XXEV BOARD EVALUATION MCP43XX
MCP46XXDM-PTPLS BOARD PICTAIL DIGI POT MCP4XXX
相关代理商/技术参数
MCP2200 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:USB 2.0 to UART Protocol Converter with GPIO
MCP2200_11 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:USB 2.0 to UART Protocol Converter with GPIO
MCP2200_13 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:USB 2.0 to UART Protocol Converter with GPIO
MCP-220-00001-01 制造商:Supermicro Computer Inc 功能描述:HOT-SWAPPABLE HARD DRIVE TRAY BLACK - Bulk
MCP-220-00001-03 制造商:SUPER MICRO COMPUTER, INC. 功能描述:HOT-SWAP 3.5" DRIVE TRAY, SILVER - Bulk
MCP-220-00001-03(01) 制造商:SUPER MICRO COMPUTER, INC. 功能描述:SUPERMICRO SCA TRAY, BLACK - Bulk
MCP-220-00003-01 制造商:SUPER MICRO COMPUTER, INC. 功能描述:1U SPARE HOT SWAP DRIVE- BLACK (2ND GENERATION) - Bulk
MCP-220-00003-02 制造商:SUPER MICRO COMPUTER, INC. 功能描述:- Bulk