Searching \ for '[SX] IR transmission with a palm Sony Clie' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ubicom/lib/io/index.htm?key=ir++ir
Search entire site for: 'IR transmission with a palm Sony Clie'.

Exact match. Not showing close matches.
PICList Thread
'[SX] IR transmission with a palm Sony Clie'
2005\11\16@132905 by Jean Brunetn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Jean Brunet wrote:

Hello,

I search to transmit 4 bytes to a Sony clie.

I try my code (your code exactly) but the bytes are not stable, and I am a negative result.

The IR diode is connecting at the ra.0 pin with a 220 ohm resistor. The other pin of the diode is at the ground.

My code is :


MesHor(0)=64
MesHor(1)=128
MesVert(0)=22
MesVert(1)=222

' empèche mesure en int pendant émission et affichage
StopIR = 1
'gosub @trame,DebTr
gosub @trame,MesHor(0)
gosub @trame,MesHor(1)
gosub @trame,MesVert(0)
gosub @trame,MesVert(1)
StopIR = 0
GOSUB Delay, 8, 1   ' pour laisser le temps de faire la mesure goto Main
' -------------------------------------------------------------------------
' Page 1 Code
' -------------------------------------------------------------------------
Page_1:
 ADDRESS $200
Trame:
temp0 = __PARAM1
GOSUB @Ir_Modulate, start_bit
GOSUB Delay, 2, 1
GOSUB Send_IR_Msg,temp0
GOSUB @Ir_Modulate, stop_bit
RETURN

'modérateur :
Send_IR_Msg:
 temp1 = __PARAM1              ' copy of message
 FOR idx = 0 TO 7              ' send 8 bits
   temp2 = 2 + temp1.0
    GOSUB Ir_Modulate, temp2    ' module
   temp1 = temp1 >> 1          ' shift bits right
   GOSUB Delay, 2, 1           ' inter-bit delay  
 NEXT idx
RETURN


IR_Modulate:
 temp3 = __PARAM1
 FREQOUT IrPin, temp3, IrFreq
RETURN


Delay:
 temp2 = __PARAM1
 temp3 = __PARAM2
 PAUSE temp2 * temp3
RETURN

Thanks for you help.

Jean
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=96647
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\11\20@092911 by Jean Brunetn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Jean Brunet wrote:

Hello

No responses at my problem. :confused:  
Can you done me the sequence of the IR trame of PDA Sony clié ?

Jean
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=96647#m97173
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\11\21@112847 by PJMontyn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, PJMonty wrote:

Jean,
You used a code sample to help write your program, correct?  Have you tried the code sample without changes to verify that it works?

[list]Thanks,
PeterM[/list]
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=96647#m97312
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\11\21@124724 by Jean Brunetn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Jean Brunet wrote:

Hi,
It was a long rechearch, but I am learning.
The Sx/B is too slow for this application. I am rewrite the listing in assembly code.

The protocole Irda is :
1 bit start, 8 bits of data, 1 bit stop.
If the bit is set , in Irda it is clear.
The 0 data is only set to 1.
The bit stop is also clear.
The bit start is naturely set to 1.

Timing :
At 38400 the pulse is 6.4 us in a square of 25 us.
The are 10 pulses of 25 us. (the clock)
The program work now with two interrupts timers, and I can read on my Pda a correct result.
I must to ajust the interval between two frames.
20 ms is correct ?

Jean
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=96647#m97325
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\11\21@162907 by PJMontyn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, PJMonty wrote:

Jean,
By "frames" I assume you mean a start bit, 8 bits of data, and a stop bit, right?  If so, you shouldn't need any time between them.  I'm not intimate with IRDA, but I assume the data stream timing should be like any UART.  As soon as your stop bit is finished, you should be able to generate your next start bit.  A normal UART doesn't need extra time between each byte of data, so I assume IRDA works the same.  
If you wait 20 ms between bytes, you're throwing away lots of bandwidth.  Sending 10 bits (1 start, 8 data, 1 stop) at 38400 means you should be able to send 3840 bytes per second or 1 byte every 1 / 3840 = .00026 sec = 0.26 ms.  By pausing 20 ms between bytes, you are throwing away the chance to transmit 20 ms / .26 ms = 76.92 bytes.  In other words, you'll only transmit something like 50 bytes per second.  Becuase of this, I doubt that waiting 20 ms is correct.

I have another question about your timing.  You say you're running at 38400, and that your clock runs at 25 us.  However, 1/38400 = .000026041, which means your clock should actually be running at 26 us.  While you can get away with some error in serial communications, this slower clock may be part of the problem in trying to communicate with the Clie.

[list]Thanks,
PeterM[/list]
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=96647#m97368
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

2005\11\22@145527 by Jean Brunetn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Jean Brunet wrote:

Peter,
Your mail is very interressant.

Y am appy that it'is possible to transmit two frames (a start bit, 8 bits of data, and a stop bit, I confirm ) in a little space of time.
1/38400 = .000026041. Yes, of course ! Also the pulse is 1/4 of 26 us = 6.5 us. My interrupt code is a 1 us int period. 7 us is also good.

Look my interrupt code, with two timer :

               sb        tf_square                   ; if set
               jmp        :st
               inc        Sq_freq                  ; time square pulse 26 us
               snz
               jmp        :tf_end               ; finish
               sb        Ir_set                    ; if set
               jmp        :no        
               setb        IrPin                     ; bit Tx  Irda
               inc        Freq_Tir                ;  time pulse  7 us
               sz
               jmp        :st                       ; end of pulse
:no                clrb        IrPin                   ; pulse 7 us terminate
               clrb        Ir_set                 ; flag end of pulse                
               mov        Freq_Tir,#Freq_BitIr                ; time pulse
               jmp        :st
:tf_end                clrb        tf_square                               ; end of square pulse
               mov        Sq_freq,#Freq_SqIr                    ; time square pulse        
:st                
The same code permit a bit set or a bit clear if Ir_set  flag is true or false.

In a main code
Ir_NoModulate
       clrb    Ir_set                ; signal off / or On if Ir_set is set.
       setb        tf_square        ;
:I2        snb        tf_square        ; when interrupt code is finish....
       jmp        :I2
       ret
And the trame :

trame
       call        Ir_Modulate        ; start bit
       mov        idx,#8
:t0        sb        temp0.0
       jmp        :no
       call        Ir_NoModulate        ; if  bit set, no  modulation
       skip
:no        call        Ir_Modulate
       clc
       rr        temp0
       decsz        idx
       jmp        :t0
       clc
               call        Ir_NoModulate     ' stop bit
               ret
Thank's
Jean
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=96647#m97531
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...