Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - HOW TO: IrCOMM in OFD

HOW TO: IrCOMM in OFD

Discuss interfacing hardware with PocketC and OrbForms Designer

Postby kda406 on Mon Jun 27, 2005 10:20 am

Originally posted 12/16/2003:

For those of you who, like me, do a lot of IR, you need to know that OrbForms Designer supports the use of IrCOMM! :D IrCOMM is much more robust than raw IR. It does things in the background for you such as ID negotiation, encapsulation, CRC16, automatic retransmit, automatic baud rate negotiation, and much much more.

Now that I know how to use IrCOMM, I'll probably never go back to raw IR. If you are communicating from PDA to PDA, then just specify IrCOMM and you're done. If you are communicating from PDA to a discrete device such as a micro controller, you can use the MicroChip MCP2150. The MCP2150 will make your uC think you are using raw IR with no encapsulation, but in reality you are getting the benefits of a fully encapsulated protocol without the hassle. 8)

To use the IrCOMM library simply use 0x6972636D instead of a port name like this:
if(ser.open(0x6972636D,115200)==false) { ...

You won't use serial.settings with IrCOMM, so remove those statements, and replace the port name with the above number. That's all you will probably have to do to change your raw IR apps to IrCOMM. Enjoy! :)

-Kyle
kda406
 
Posts: 86
Joined: Wed Sep 10, 2003 1:24 pm
Location: Atlanta, GA, USA

Postby kda406 on Mon Jun 27, 2005 10:22 am

Originally Posted 06/01/2004:

After a long wait, MicroChip has released a new silicon revision that covers up the new Palm problem. To ensure you are getting the version of the MCP2150 that works with all Palms add, "RVC" to the end of your part number when ordering. For example:
MCP2150T-I/SORVC

As far as communications goes (for the somewhat OT part of this thread), on the PIC end, connect the MCP2150 to the PIC and simply open a serial communication using serial routines like those found in the CCS C compiler. All serial communications broadcast from the MCP2150 via your transceiver will be IrCOMM encoded. On the PDA, open the IrCOMM port like this:
if(ser.open(0x6972636D,115200)==false) { ...

Now you can communicate bidirecionally with a PDA and uC. If you can't, then first try getting the uC to communicate with a PC via a serial cable. If that works, then reconnect the MCP2150 and check your PDA routines by communicating between PDAs using the IrCOMM library. If that also works, but you still cannot communicate between uC and PDA, then you may have a tranceiver problem.

-Kyle
kda406
 
Posts: 86
Joined: Wed Sep 10, 2003 1:24 pm
Location: Atlanta, GA, USA

Postby kda406 on Mon Jun 27, 2005 10:24 am

Orignally posted 12/21/2004:

For my applications I don't use a crystal, I use a 11.0592 MHz oscillator which is also used to clock my microprocessor(s). Therefore I cannot offer any advice on the use of the 22 pF caps and crystal connections, except to make sure your connections to the ground plane or ground returns from your capacitors are very short.

Crystal signals are very small and hard to see. Make sure your oscilloscope is using 10x probes so your input capacitance doesn't swamp out the signal you are looking for.

For my typical applications I am tying my pins like this:
1 = 5V
2 = TXD of my transceiver
3 = RXD of my transceiver
4 = Normally high (active low) reset signal from uC. This allows my uC to reset the EnDec if it gets in a bad mode.
5 = GND
6 = 5V
7 = TX signal from the uC
8 = RX signal going to the uC
9 = N.C.
10 = N.C.
11 = GND
12 = CTS line to uC. I use this to prevent the uC from transmitting and overrunning the 2150's buffer.
13 = GND
14 = 5V
15 = N.C.
16 = 11.0592 MHz osciallator (5V signal)
17 = Anode of a current limited LED. A nice "link light" feature for feedback from the circuit board that a link has been established. This LED works even if the uC is not ready.
18 = 5V

I make no guarantees that this will work for your application. ;)

For further help on setting up the MCP2150, I suggest you contact http://support.microchip.com/, create an account, and send them your tech question. They typically get back to me on things in less than one business day. Their tech support is in the western portion of the United States of America, so you can plan accordingly.

I hope this helps.

-Kyle
kda406
 
Posts: 86
Joined: Wed Sep 10, 2003 1:24 pm
Location: Atlanta, GA, USA

Postby kda406 on Mon Jun 27, 2005 10:32 am

To finish out the "How To" let me mention that OrbForms Designer now supports IrCOMM a tiny bit more easily. Basically, the update is that the serial communications address has been defined in OFD, so you no longer need to use the hex address. Here is how I typically open my IrCOMM library:

Code: Select all
bool irdaOpen() {
   ser.close();
   if(ser.open(serIrComm,115200)==false) {   // Open the IrCOMM library
      alert("Failed to open IR port.  You must have an IR port to use this program.");
      return(0);
   }
   return(1);
}


I hope this helps.

<b><u>Please start a new topic with a new thread if you have any hardware or software questions, and use a subject that refers to the specific problem you are having.</u></b>

-Kyle
kda406
 
Posts: 86
Joined: Wed Sep 10, 2003 1:24 pm
Location: Atlanta, GA, USA

Postby rolser on Sat Dec 03, 2005 2:47 pm

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by kda406</i>
<br />Orignally posted 12/21/2004:

For my applications I don't use a crystal, I use a 11.0592 MHz oscillator which is also used to clock my microprocessor(s). Therefore I cannot offer any advice on the use of the 22 pF caps and crystal connections, except to make sure your connections to the ground plane or ground returns from your capacitors are very short.

Crystal signals are very small and hard to see. Make sure your oscilloscope is using 10x probes so your input capacitance doesn't swamp out the signal you are looking for.

For my typical applications I am tying my pins like this:
1 = 5V
2 = TXD of my transceiver
3 = RXD of my transceiver
4 = Normally high (active low) reset signal from uC. This allows my uC to reset the EnDec if it gets in a bad mode.
5 = GND
6 = 5V
7 = TX signal from the uC
8 = RX signal going to the uC
9 = N.C.
10 = N.C.
11 = GND
12 = CTS line to uC. I use this to prevent the uC from transmitting and overrunning the 2150's buffer.
13 = GND
14 = 5V
15 = N.C.
16 = 11.0592 MHz osciallator (5V signal)
17 = Anode of a current limited LED. A nice "link light" feature for feedback from the circuit board that a link has been established. This LED works even if the uC is not ready.
18 = 5V

I make no guarantees that this will work for your application. ;)

For further help on setting up the MCP2150, I suggest you contact http://support.microchip.com/, create an account, and send them your tech question. They typically get back to me on things in less than one business day. Their tech support is in the western portion of the United States of America, so you can plan accordingly.

I hope this helps.

-Kyle
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
rolser
 
Posts: 2
Joined: Tue Jun 21, 2005 10:05 am


Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest

cron