Searching \ for '[pic] a tight code chalenge 455Khz burst...' 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/microchip/devices.htm?key=pic
Search entire site for: 'a tight code chalenge 455Khz burst...'.

Exact match. Not showing close matches.
PICList Thread
'[pic] a tight code chalenge 455Khz burst...'
2009\07\29@125714 by Steve Smith

flavicon
face
Guys:
During a program I have to periodically make a burst of 455Khz pulses and
stop when a pin changes state....

Using an pic 12F510 I can get an 8Mhz internal osc that gives me about 4
instructions to manufacture this burst and sense the end. It goes something
like this

               Code                                cycles (500ns )
       Bsf        GPIO,outbit                        ;0                6
       btfss        GPIO,inrxbit                ;1
       goto        main                                ;
       bcf        GPIO,outbit                        ;3
       goto        $-4                                ;4


best I can do is 5... Anybody got any better ideas I am trying to get a one
chip solution in the smallest possible space and it needs a comparator

TIA

STeve

               


2009\07\29@131459 by Dario Greggio

face picon face
Steve Smith ha scritto:
> Guys:
> During a program I have to periodically make a burst of 455Khz pulses and
> stop when a pin changes state....

Hi Steve,
I did something similar using PWM module, to generate a 1MHz carrier
modulated @1KHz to create a "small AM transmitter".

Maybe you can do the same, using a suitable Crystal.

Dario

2009\07\29@132635 by M.L.

flavicon
face
On Wed, Jul 29, 2009 at 12:56 PM, Steve Smith<spam_OUTxygaxTakeThisOuTspamblueyonder.co.uk> wrote:
> best I can do is 5... Anybody got any better ideas I am trying to get a one
> chip solution in the smallest possible space and it needs a comparator
>

movlw output_bit
xorwf gpio,f
btfss gpio,input_pin
goto $-2

--
Martin K.

2009\07\29@132954 by Tamas Rudnai

face picon face
Hi Steve,

I think the situation is a bit worse. First of all you need 4 instruction
cycles, not 4 instructions... GOTO takes 2...
Secondly, 455kHz means you need to toggle the port bit at every 2nd cycle,
not every 4th.

If a little glitch is acceptable you may can try something like this:

LOOP:
 BSF   GPIO,outbit
 BTFSS    GPIO,inrxbit
 BCF   GPIO,outbit
 BTFSS    GPIO,inrxbit
 BSF   GPIO,outbit
 BTFSS    GPIO,inrxbit
 BCF   GPIO,outbit
 BTFSS    GPIO,inrxbit
...
... doing this for a while makes a continuous signal
...
 BSF   GPIO,outbit
 BTFSS    GPIO,inrxbit
 BCF   GPIO,outbit
 BTFSS    GPIO,inrxbit
 GOTO   LOOP ; glitch occures!

 GOTO   MAIN

But I think you should go for a mid-range device instead where you have
interrupts and PWM module as Dario suggested...

Tamas



On Wed, Jul 29, 2009 at 5:56 PM, Steve Smith <.....xygaxKILLspamspam@spam@blueyonder.co.uk> wrote:

{Quote hidden}

> -

2009\07\29@133035 by M.L.

flavicon
face
On Wed, Jul 29, 2009 at 1:26 PM, M.L.<mspamKILLspamlkeng.net> wrote:
> On Wed, Jul 29, 2009 at 12:56 PM, Steve Smith<.....xygaxKILLspamspam.....blueyonder.co.uk> wrote:
>> best I can do is 5... Anybody got any better ideas I am trying to get a one
>> chip solution in the smallest possible space and it needs a comparator
>>
>
> movlw output_bit
> xorwf gpio,f
> btfss gpio,input_pin
> goto $-2
>
> --
> Martin K.
>

Will probably make a read/modify/write problem I believe.
possibly add a nop between xorwf and btfss. Will still be fewer
cycles. Remember that a goto is 2 cycles not 1.

Other variations are possible. The better solution is to use a PIC
with interrupts and a timer, or more than one PIC.

--
Martin K.

2009\07\29@134218 by Dario Greggio

face picon face
Tamas Rudnai ha scritto:

> But I think you should go for a mid-range device instead where you have
> interrupts and PWM module as Dario suggested...

ah ok :) I'm sorry - those cheapest ones don't have PWM...

thanks Tamas

2009\07\29@134758 by Steve Smith

flavicon
face
Tamas
Thanks for the pointer...
I am trying to get the whole thing inside a 3.5mm jack plug to convert a
stream of data into IR at 455Khz... I have it working at 40Khz but the data
rate is far too slow...

I could get away with 250Khz but there dosen't seem to be any receivers
rated to that they are either 56K or 455K I have been looking at the
TSOP7000 as an RX optimised around 455K

STeve


{Original Message removed}

2009\07\29@135722 by Marcel Duchamp

picon face
Steve Smith wrote:
> Tamas
> Thanks for the pointer...
> I am trying to get the whole thing inside a 3.5mm jack plug to convert a
> stream of data into IR at 455Khz... I have it working at 40Khz but the data
> rate is far too slow...
>
> I could get away with 250Khz but there dosen't seem to be any receivers
> rated to that they are either 56K or 455K I have been looking at the
> TSOP7000 as an RX optimised around 455K
>
> STeve

What's the acceptable bandwidth?  How close to 455 kHz does your signal
need to be?

2009\07\29@140144 by Mark Rages

face picon face
On Wed, Jul 29, 2009 at 12:47 PM, Steve Smith<EraseMExygaxspam_OUTspamTakeThisOuTblueyonder.co.uk> wrote:
> Tamas
> Thanks for the pointer...
> I am trying to get the whole thing inside a 3.5mm jack plug to convert a
> stream of data into IR at 455Khz... I have it working at 40Khz but the data
> rate is far too slow...
>
> I could get away with 250Khz but there dosen't seem to be any receivers
> rated to that they are either 56K or 455K I have been looking at the
> TSOP7000 as an RX optimised around 455K
>
> STeve
>
>
> {Original Message removed}

2009\07\29@141756 by Steve Smith

flavicon
face


-----Original Message-----
From: piclist-bouncesspamspam_OUTmit.edu [@spam@piclist-bouncesKILLspamspammit.edu] On Behalf Of
Marcel Duchamp
Sent: 29 July 2009 18:57
To: Microcontroller discussion list - Public.
Subject: Re: [pic] a tight code chalenge 455Khz burst...

Steve Smith wrote:
> Tamas
> Thanks for the pointer...
> I am trying to get the whole thing inside a 3.5mm jack plug to convert a
> stream of data into IR at 455Khz... I have it working at 40Khz but the
data
> rate is far too slow...
>
> I could get away with 250Khz but there dosen't seem to be any receivers
> rated to that they are either 56K or 455K I have been looking at the
> TSOP7000 as an RX optimised around 455K
>
> STeve

What's the acceptable bandwidth?  How close to 455 kHz does your signal
need to be?

Marcel

Probably about 425-480K to ensure the receiver has its best sensitivity
that's above its 60% level much outside that then the responsiveness falls
off. I think its possible to tweak the micro up a bit by careful choice of
the osccal variable

Receiver data here

http://info.hobbyengineering.com/specs/Vishay-TSOP7000.pdf

Steve

2009\07\29@170229 by Harold Hallikainen

face
flavicon
face
As someone suggested, a PIC with PWM would be a lot easier to use. Just
change the PR register. Someone else suggested an RC oscillator. I did
something similar to transmit 10kbps over 1.8MHz on IR. The IR also
carries FM audio at 2.3MHz and 2.8MHz. I'm using an LTC6907 oscillator.
The frequency is set by a resistor go ground. I lifted the bottom of that
resistor and added 100 ohms to ground. I drive the top of the 100 ohm
resistor with 3.3V logic through about 10k to give a deviation of +/-
100kHz (200kHz PP). On the receive side, I use an SA639, upconverting the
1.8MHz to 10.7MHz, running through a couple ceramic filters and a ceramic
quadrature detector. I use an LTC6202 as a photodiode preamp. I bias the
diodes through a tunable inductor that becomes resonant at 1.8MHz when
combined with the photodiode capacity.

Harold



--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

2009\07\29@171734 by Bob Blick

face
flavicon
face

On Wed, 29 Jul 2009 17:56:53 +0100, "Steve Smith"
<KILLspamxygaxKILLspamspamblueyonder.co.uk> said:
> Guys:
> During a program I have to periodically make a burst of 455Khz pulses and
> stop when a pin changes state....

Can you put it into an infinite loop and use the MCLR pin to break it
out? The recovery time is a bit long but maybe your application allows
it, and that way you could make a very tight loop that didn't need to
check any pins.

Cheers,

Bob

--
http://www.fastmail.fm - mmm... Fastmail...

2009\07\29@173504 by Isaac Marino Bavaresco

flavicon
face
Bob Blick escreveu:
> On Wed, 29 Jul 2009 17:56:53 +0100, "Steve Smith"
> <RemoveMExygaxTakeThisOuTspamblueyonder.co.uk> said:
>  
>> Guys:
>> During a program I have to periodically make a burst of 455Khz pulses and
>> stop when a pin changes state....
>>    
>
> Can you put it into an infinite loop and use the MCLR pin to break it
> out? The recovery time is a bit long but maybe your application allows
> it, and that way you could make a very tight loop that didn't need to
> check any pins.
>
> Cheers,
>
> Bob
>  

Or use the interrupt pin as a "goto 4".

Regards,

Isaac
__________________________________________________
Faça ligações para outros computadores com o novo Yahoo! Messenger
http://br.beta.messenger.yahoo.com/

2009\07\29@195255 by Djula Djarmati

flavicon
Steve Smith wrote:
{Quote hidden}

You can try something like this:

        goto    StartTx

; Outputs 454.54kHz at GPIO,OUTBIT
; until GPIO,INRXBIT is set
; Fosc=8.00Mhz
; Complete loop takes 11us = burst of 5 periods
TxLoop  bcf     GPIO,OUTBIT     ;
        nop                     ;
       bsf     GPIO,OUTBIT     ;9us/8.8us
        nop                     ;
        bcf     GPIO,OUTBIT     ;
        nop                     ;
StartTx bsf     GPIO,OUTBIT     ;0us/0us (11us/11us)
        nop                     ;
        bcf     GPIO,OUTBIT     ;
        nop                     ;
        bsf     GPIO,OUTBIT     ;2us/2.2us
        nop                     ;
        bcf     GPIO,OUTBIT     ;
        btfsc   GPIO,INRXBIT    ;
        goto    EndTx           ;
        bsf     GPIO,OUTBIT     ;4.5us/4.4us
        nop                     ;
        bcf     GPIO,OUTBIT     ;
        nop                     ;
        bsf     GPIO,OUTBIT     ;6.5us/6.6us
        goto    TxLoop          ;

EndTx   nop


Djula

2009\07\29@233804 by John Coppens

flavicon
face
On Wed, 29 Jul 2009 17:56:53 +0100
"Steve Smith" <spamBeGonexygaxspamBeGonespamblueyonder.co.uk> wrote:

> During a program I have to periodically make a burst of 455Khz pulses
> and stop when a pin changes state....

You won't be able to generate 455 exactly, so give that up, and generate
1/3 of that (or even 1/5). Then couple the output to a 455 kHz IF
transformer to filter it. As the harmonics are odd, energy will be
only 1/3, but you'll have more time to dedicate to generating the exact
frequency.

John

2009\07\30@003139 by Jinx

face picon face
> You won't be able to generate 455 exactly

Not perhaps with a 50:50 duty. A different duty cycle or even
an average frequency may do. For example a few cycles of
450kHz and a few of 460kHz


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