Now to something completely different


Closed Thread
Results 1 to 16 of 16
  1. #1
    Ted's's Avatar
    Ted's Guest

    Lightbulb Now to something completely different

    Now I am approaching a different task.

    I connected a TSOP-IR-Receiver to my device being run by a 16f628a. I want to control it via palmos 3.5 irda or own codes.

    Question: Who has already accomplished that task and can give me reliable sources?

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I remember seeing an APP note on the microchip site a couple of years ago that talk about a project like yours. Do a search there.

    Have you done any programming for the palm? If so, (just curious) what developer are you using?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Hi, the irda signal is not modulated; so, you first need to get rid of the TSOP-IR-Receiver.

    Adding irda capability to a PIC could be achieved a number of ways. Microchip themselves have irda codec solutions. Or, look up www.sirpic.com. The guy there, Ravi, specializes in Micro-to-irda solutions in varying degrees of customization. At this site, you'll also find a software-only irda implementation for PICs contributed by another person.

    Regards

    Anand

  4. #4
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I remember seeing an APP note on the microchip site a couple of years ago that talk about a project like yours. Do a search there.

    Have you done any programming for the palm? If so, (just curious) what developer are you using?
    I found it. Nice. One drawback is that the tsop is limited to - I guess - 1k bps meaning that the irda requiring 9600bps won't work so I'll have to work with my own codes and low-level. I hope that low - level does not mean assembler though.
    Last edited by Ted's; - 5th June 2008 at 00:16.

  5. #5
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ardhuru View Post
    Hi, the irda signal is not modulated; so, you first need to get rid of the TSOP-IR-Receiver.

    Adding irda capability to a PIC could be achieved a number of ways. Microchip themselves have irda codec solutions. Or, look up www.sirpic.com. The guy there, Ravi, specializes in Micro-to-irda solutions in varying degrees of customization. At this site, you'll also find a software-only irda implementation for PICs contributed by another person.

    Regards

    Anand
    Or modulate the signal. This is what I want to do. Being dependend on light situations has always been the greatest drawback of irda.

    Is there a sorce code on his site? I couldn't find any...

  6. #6
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

  7. #7
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Default

    I am using a vb-clone for palm programming.

    The only option is to use IrDA.

    If I use IrDA,open the connection and send the value 3211 using a baudrate of 38400 and having the TSOP attached to the pic, what should I receive and how do I convert it back to the value via pbp?

    Please no links this time. I want to see this problem solved step by step so I can create a code suitable according to this example.

  8. #8
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Ted, here are my views. Consumer IR, which uses modulation, has range, but cannot handle large data flows; that is why irda is not modulated, to enable a relatively higher bandwidth.

    You cannot, therefore, modulate and demodulate the raw irda at each end and expect good results (unless you design a complex data buffering system to be stuck in between).

    If you must use irda, you will have to accept the raw irda distance limitations.

  9. #9
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Default

    There is no need for high bandwidth.

    There is a need for emulating the 38khz carrier frequency using IrDA as IrDA is the only way to access the IR Port.

    What I found is that using a baudrate of 38400 makes the PIC-Device understand something(I made a LED flash each time the PIC recieves a High-Low and Low-High-change) but I cannot decode it as I don't understand it. It is no real rs-232-code.

    You can help me by sharing pseudo-code for my Palm Programme and PBP-Code for the receiving part.
    Last edited by Ted's; - 7th June 2008 at 10:36.

  10. #10
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Default

    I address this to all readers:

    There is no need for high bandwidth.

    There is a need for emulating the 38khz carrier frequency using IrDA as IrDA is the only way to access the IR Port.

    What I found is that using a baudrate of 38400 makes the PIC-Device understand something(I made a LED flash each time the PIC recieves a High-Low and Low-High-change) but I cannot decode it as I don't understand it. It is no real rs-232-code.

    You can help me by sharing pseudo-code for my Palm Programme and PBP-Code for the receiving part.
    Last edited by Ted's; - 7th June 2008 at 12:53.

  11. #11
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Default

    To the other users: Note that there are some closed source Palm remote control emulators being proof for doability.

    There is still a want for a solution.

  12. #12
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Sorry, there must have been an error of some kind.

    Many posts of the same message appeared.

    Also edited the last message, since it no longer applied.
    DT

  13. #13
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Thanks, Darrel.

    I have no idea why my message got posted repeatedly.

    I'm sorry for the inconvenience caused.

    Regards,

    Anand

  14. #14
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Default

    I accept your excuse.

    Darrel, do you have a recommendation on how to proceed regarding the main issue?

  15. #15
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Default RC5 Decoding

    I proceeded in the past. I succeeded in creating the signal, but decoding using pbp is a challenge.
    The code is rc5.
    Here is the pbpcode. Receiver means TSOP1740, 1 = No signal, 0 = Signal:

    Code:
    Palm:
    WHILE Receiver = 1
    WEND  
    WHILE Receiver = 0
    WEND  
    WHILE Receiver = 1
    WEND  
    ByteNumber = 5
    WHILE ByteNumber > 0
    --------Time = 0
    --------WHILE Receiver = 0
    ----------------Time = Time + 1
    ----------------Pauseus 10
    --------WEND
    --------IF Time > 140 THEN
    ----------------DeviceNr.0[ByteNumber-1] = 0
    --------ELSE
    ----------------DeviceNr.0[ByteNumber-1] = 1
    --------ENDIF
    --------ByteNumber = ByteNumber - 1
    --------Time = 0
    --------WHILE Receiver = 1
    ----------------Time = Time + 1
    ----------------Pauseus 10
    --------WEND
    --------IF Time > 140 THEN
    ----------------DeviceNr.0[ByteNumber-1] = 1
    --------ELSE
    ----------------DeviceNr.0[ByteNumber-1] = 0
    --------ENDIF
    --------ByteNumber = ByteNumber - 1
    WEND 
    ByteNumber = 6
    WHILE ByteNumber > 0
    --------IF Receiver = 1 THEN
    ----------------Time = 0
    ----------------WHILE Receiver = 1
    ------------------------Time = Time + 1
    ------------------------Pauseus 10
    ------------------------If Time = 254 THEN
    --------------------------------ByteNumber = 0
    ------------------------ENDIF
    ----------------WEND
    ----------------IF Time > 140 THEN
    ------------------------Content.0[ByteNumber-1] = 0
    ----------------ELSE
    ------------------------Content.0[ByteNumber-1] = 1
    ----------------ENDIF
    ----------------ByteNumber = ByteNumber - 1
    --------ELSE
    ----------------Time = 0
    ----------------WHILE Receiver = 0
    ------------------------Time = Time + 1
    ------------------------Pauseus 10
    ----------------WEND
    ----------------IF Time > 140 THEN
    ------------------------Content.0[ByteNumber-1] = 1
    ----------------ELSE
    ------------------------Content.0[ByteNumber-1] = 0
    ----------------ENDIF
    ----------------ByteNumber = ByteNumber - 1
    --------ENDIF
    WEND
    Goto Palm
    Content and DeviceNr are always 0xFF. Why is this so?

    If you have questions, ASK!

    Thank you.

  16. #16
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

Similar Threads

  1. PBP projects for R/C models
    By malc-c in forum Code Examples
    Replies: 771
    Last Post: - 21st October 2016, 12:56
  2. EasyHID and USB for Newbies??
    By Squibcakes in forum USB
    Replies: 68
    Last Post: - 26th November 2015, 22:41
  3. completely incompetent
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th February 2006, 21:07

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts