RC5 problem

Peter KWS
Benutzer
Avatar
Gender: n/a
Age: 41
Posts: 18
Registered: 11 / 2011
Subject:

RC5 problem

 · 
Posted: 18.12.2013 - 12:17  ·  #1
Hi all. I have a question about RC5.

When I tested RC5 data transmission with Mega8/Tsop1736/Xtall 16Mhz

rutine

if RecvRC5(RXadresa, RXdata) then
Toggle(LED);
Endif;

work fine.

When I tested RC5 data transmission with Mega8/Tsop1738/Xtall 16Mhz

rutine

if RecvRC5(RXadresa, RXdata) then
Toggle(LED);
Endif;

work only when is ProcClock = 8000000Mhz. But Xtall is 16Mhz.

Any idea?

Thanks Peter.
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: RC5 problem

 · 
Posted: 18.12.2013 - 14:13  ·  #2
Hello Peter,

the first example runs with 8MHz? Or the second one? Its not clear for me.

rolf
Gunter
Administrator
Avatar
Gender:
Location: Frankfurt Main / Germany
Posts: 1697
Registered: 02 / 2003
Subject:

Re: RC5 problem

 · 
Posted: 18.12.2013 - 16:20  ·  #3
Hello Peter,

did you check, that the fuses of both megas are really set the same?
What happens with a test loop
loop
toggle (led);
mdelay (500);
endloop

Do you see the same blink frequency?
Peter KWS
Benutzer
Avatar
Gender: n/a
Age: 41
Posts: 18
Registered: 11 / 2011
Subject:

Re: RC5 problem

 · 
Posted: 18.12.2013 - 19:12  ·  #4
First example runs normaly with TSOP 1736 (36khz) / 16Mhz xtall and Procclock in program set normaly 16000000.
When i disconnect TSOP1736 and connect TSOP 1738 (38Khz), TX freq. change from 36khz to 38khz, program not detect RC5 Rcv. But when i change in program procclock to 8000000(xtall still 16Mhz) work fine, but example

Loop
Toggle(Led);
Mdelay(500);
Endloop;

Speed of toggle led is not 500ms.

Maybe is problem in programmer, i use ISP MK2 and AVRSTUDIO to write hex to MCU.
Peter KWS
Benutzer
Avatar
Gender: n/a
Age: 41
Posts: 18
Registered: 11 / 2011
Subject:

Re: RC5 problem

 · 
Posted: 18.12.2013 - 19:28  ·  #5
One mega8, one IR diode, one program and two tsop sensors 36 and 38
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: RC5 problem

 · 
Posted: 18.12.2013 - 23:05  ·  #6
Hello Peter,

please take an oscilloscope or similar and look onto the driver signal to the TSOP.
Here you should see the real clock frequency, 36 or 38kHz

rolf
Peter KWS
Benutzer
Avatar
Gender: n/a
Age: 41
Posts: 18
Registered: 11 / 2011
Subject:

Re: RC5 problem

 · 
Posted: 19.12.2013 - 17:38  ·  #7
Ok i try it, thanks and nice christmas for all :)
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 14 · Cache Hits: 14   126   140 · Page-Gen-Time: 0.031198s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI