» Home

» Products

» Interfaces

» Lab

» Downloads

» Buy It

» Contact

» Links

|
» Lab » Hello Palm in Framed mode via IrTx
|
| Project: | Hello Palm in Framed mode via IrTx |
| Source Code: | PIC Assembler |
| PIC: | 16F628 |
| Interface: | IrTx |
| Authors: | Waldemar Neto & Ravi Deo |
| Last Updated: | 7th April 2005 |
|
Project Description
This sample PIC project is based upon the typical "Hello World" program.
The PIC transmits the string "Hello Palm" repeatedly via Infra-red (using raw SIR mode).
It demonstrates the use of framed data infra-red transmission and reception capability, end to end
(PIC to IrTx to Palm). This project is most useful for PDAs which do not support raw SIR mode, but do support
framed mode (such as Palm Zire 21). Check the PDA compatability page for
further information.
Hello Palm in Framed mode via IrTx
: Zip file containing Source ASM and Binary HEX files for 16F628 (approx 3KB).
The following schematics show the circuit setup for using the PIC16F628.
The Infra-red bit-stream output from the PIC (pin 8) feeds the Infra-red transmitter unit (IrTx).
It is possible to use a 4MHz 3-pin ceramic resonator as the clock source (less the capacitors and middle pin to ground).

The sample source code assumes use of an external 4MHz crystal oscillator or (external clock XT mode)
on the PIC16F628 / PIC16F84.
The source code comprises of the following subroutines:
TxChIr: Standard SirPic subroutine to transmit char via Infra-Red
IrPulse0: transmits a '0' bit pulse
IrPulse1: transmits a '1' bit pulse
SpWaitDelay: Standard SirPic delay routine
Note that each variable length data packet is framed with a starter and trailer byte.
The start of frame byte is hex:C0, and the trailer byte is hex:C1.
The encapsulated data packet should not contain either of these characters.
SirPic Communication and Options settings should be configured as shown below (Note: Port=Framed).

On starting the SirPic log session, you should see the following data being captured.

For PDA users which have raw SIR support, try switching back to raw SIR mode,
and you can see the unfiltered framing characters (0xC0 and 0xC1).
|
|