Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC UART - 38kHz or 56kHz carrier frequency?

Status
Not open for further replies.

eirikr

New Member
Hi all,

First I want to thanks all those who helped me with my previous questions...This is slightly off the micro controller topic but I am sure the gurus here can answer my questions or point me to the right direction ;-)

I am experimenting with a PIC based UART for IR serial communication between two PICs, but I am not sure what carrier frequency to use. I did some search on the internet but couldn't find the answer to my questions:

1. What are the advantage and disadvantage of using 38kHz? 56kHz?
2. Why 38kHz and 56kHz?
3. What factors determine the transmission speed between two PICs communicating via IR serial signal? The clock speed of the crystal? Does higher MHz crystal means higher transmission speed can be achieved?
4. For my experiement, I want to send a single ASCII character (N-7-1)from one PIC via IR to another PIC. The second PIC will then send the received character to a PC via RS232 and then echo the character back to the first PIC as acknowledgement and pause the transmission for a couple seconds. The encoding scheme is similiar to SONY's SIRC: 1-bit is 1.2ms, 0-bit is 0.6ms, a 0.6ms space between pulse and a 2.4ms header. I'd like to experiement with different transmission speed, but I am not sure how to calculate the transmission speed. I am using a 12F629 with a 4MHz ceremic resonator.
5. How do I increase the reliability of this transmission while maintaining a high speed transmission rate?
6. If I want to achieve the highest possible transmission speed, should I use a FIR irDA transceiver like those here? (http://www.vishay.com/ir-transceivers/)

I am using Panasonic PNA4602 and Vishay TSOP1138 IR detectors on the circuits. IR diode is Fairchild QEC113 (940nm, 24 degree emission angle)

Any help or point to the right direction will be greatly appreciated!

Thanks in advance!


Datasheets:
**broken link removed**

**broken link removed**

http://www.fairchildsemi.com/ds/QE/QEC113.pdf
 
eirikr said:
1. What are the advantage and disadvantage of using 38kHz? 56kHz?

I don't think it matters which you use, the usual frequencies are around 38KHz, 56KHz is just an alternative.

2. Why 38kHz and 56kHz?

I've always assumed the IR modulation frequency (38-40KHz) was chosen because it was already in use for driving ultrasonic remote controls - so they simply changed the transducers from ultrasonic to IR, and carried on using the same chips.

56KHz isn't commonly used, presumably it was added so you could have two systems working at the same time without causing too much interference. The old B&O TV's actually used a 100KHz carrier, which is why old OFA remotes wouldn't work on them.

3. What factors determine the transmission speed between two PICs communicating via IR serial signal? The clock speed of the crystal? Does higher MHz crystal means higher transmission speed can be achieved?

The clock speed doesn't matter, you can do very high serial speeds with a 4MHz clock - the main limit is the reliability of the transmission medium, the higher the data rate, the lower the reliability.

4. For my experiement, I want to send a single ASCII character (N-7-1)from one PIC via IR to another PIC. The second PIC will then send the received character to a PC via RS232 and then echo the character back to the first PIC as acknowledgement and pause the transmission for a couple seconds. The encoding scheme is similiar to SONY's SIRC: 1-bit is 1.2ms, 0-bit is 0.6ms, a 0.6ms space between pulse and a 2.4ms header. I'd like to experiement with different transmission speed, but I am not sure how to calculate the transmission speed. I am using a 12F629 with a 4MHz ceremic resonator.

There should be no problem with doing that, the SIRC system is simple and reliable.

5. How do I increase the reliability of this transmission while maintaining a high speed transmission rate?

Any scheme to increase reliability is going to reduce data rate, simply because you are sending more redundant data. As you have a two way path, you can send acknowledgements, and requests to resend, but it all slows things down.

6. If I want to achieve the highest possible transmission speed, should I use a FIR irDA transceiver like those here? (https://www.vishay.com/ir-transceivers/)

I was under the impression that the range of these was very low (which allows a high data rate - short range, strong reliable signal path).

What are you trying to do?.
 
1. What are the advantage and disadvantage of using 38kHz? 56kHz?

I assume the higher the frequency, the faster the bitrate you can send data. You would be generating this carrier frequency via the PIC's software. And so your choice will also depend on how close you can generate the desired frequency.

2. Why 38kHz and 56kHz?

It is some fraction of a very common crystal frequency. I once examined a remote controller and it used a 455Khz resonator to generate 38Khz. 455/38 equals 12. For battery operated controllers, power consumption is important and so the lower the frequency, the longer would the battery last. Bitrate isn't critical.

3. What factors determine the transmission speed between two PICs communicating via IR serial signal? The clock speed of the crystal? Does higher MHz crystal means higher transmission speed can be achieved?

It would largely depend on the response time of the IR sensor. The filter response is dependent on the carrier frequency.

5. How do I increase the reliability of this transmission while maintaining a high speed transmission rate?

By putting CRC checks. You can add few bits per N bits of data to detect and correct for 1-bit errors. This means choosing the right encoding to add reliability without reducing the bitrate. A strong signal would also be important.

6. If I want to achieve the highest possible transmission speed, should I use a FIR irDA transceiver like those here?

Pick ones with the fastest response. I.E., how many cycles of the carrier it takes to detect a 1 or a 0. A more sensitive receiver is also important.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top