RF Modulation with 50 microsecond timing

Reisende

New Member
Hi all.

Before I start, I just want to say how impressed I am by the picaxe system itself and the forums as well. I have had many questions answered already, thanks to your patient and knowledgeable efforts. Thanks in advance for any advice!

So, I am working on an RF project, trying to create a modulation circuit for a 13.56 MHz system. I am hoping that I can use a picaxe to generate the control signal, but am running into some timing difficulties. Specifically, I need to be able to generate 50, 100, and 150 microsecond high pulses, separated by 10us lows. So far, I have been able to do everything except the 50us high using the pulsout command. Essentially, I am using the inherent processing time between commands for my timing. I am using a 28x1 with an external 16MHz crystal. The code below is test code, just trying to get the pulses sorted out.

Code:
'    *************************************
'    *    Testing of pulsewidths        *
'    * 50us, 100us, and 150us pulses    *
'    * are desired, with 10us low pauses    *
'    *************************************

setfreq em16
high 1

zero:                '100us pulse desired
    pulsout 1, 4    'gives approx. 10us low
    pulsout 1, 4    


one:                '150us pulse desired
    pulsout 1, 4
    pauseus 1
    pulsout 1, 4

'    ***
'    * Sring together to get total signal
'    ***

example:            'binary 0010110
    pulsout 1, 4    'start of modulation
    pulsout 1, 4    '0
    pulsout 1, 4    '0
    pauseus 1
    pulsout 1, 4    '1
    pulsout 1, 4    '0
    pauseus 1
    pulsout 1, 4    '1
    pauseus 1
    pulsout 1, 4    '1
    pulsout 1, 4    '0
    pauseus 10        'finish modulation
What I am seeing on the oscilloscope is a high signal, with 10 us low pulses separated by approximately 96us or 175us, both of which are within tolerance for the modulation. The remaining problem, though, is that the entire signal must be "framed" by a 50us high followed by a 150us high at the start, and ended with a 50us high followed by a 100us high.

Are there any tricks out there to cut down the processing time? Maybe (although I don't want to) converting it to assembler code and making some strategic changes? I do not have a 28x2 on hand, or I would try going to 32MHz or 40MHz.

Also, I am wondering how reliable the timing would be with varying temperature, etc.

Thank you, again, for any advice you may have!

-Scott
 

lahaye

Member
Gender;

Hi Scott,

I can't give you any advice on your actual question.

But may I give you some advice on your user name:
[Die] Reisende is the female word for traveller; you might wanna go for [der] Reisender... unless it's not a noun; verb: reisen (= to travel), adjektiv/adverb: reisende (= travelling), noun: [die/der] Reisende/r (= the traveller).
Maybe this is intended, but I must say I was slightly disappointed when I read your name at the end of the post :D


I am pretty sure that you haven't got an 28x2 on hand: they aren't sold yet.

Auf Wiedersehen

Florian
 

hippy

Ex-Staff (retired)
I need to be able to generate 50, 100, and 150 microsecond high pulses, separated by 10us lows

That seems unlikely to be achievable to me, even with an X2 at 40MHz but I could be proven wrong.

The PICAXE is an interpreter and even at fastest speeds the time taken to fetch, decode and execute the commands to change a pin state are going to take longer than the time periods you are needing.

The time it takes to fetch and decode each command will also depend on where exactly that command is in source code although the execution time should be consistent regardless.

You might be able to generate the pulse widths you want using HSEROUT or SPIOUT but there could still be an issue of inter-pulse gap timing.
 

Reisende

New Member
Hi Scott,
But may I give you some advice on your user name:
[Die] Reisende is the female word for traveller; you might wanna go for [der] Reisender... unless it's not a noun; verb: reisen (= to travel), adjektiv/adverb: reisende (= travelling), noun: [die/der] Reisende/r (= the traveller).
Maybe this is intended, but I must say I was slightly disappointed when I read your name at the end of the post :D

Auf Wiedersehen

Florian
Thanks for the tip. I guess I shouldn't have relied upon an internet-based translation app way back when I started using 'Reisende'. Do you happen to know if the same thing applies to the Norwegian word reisende / reisender? That's what I was going for in the first place. Now I just need to figure out how to change my username.

-Scott
 

Reisende

New Member
Hippy, do you happen to know if the PIC chips themselves would be capable of such short pulses? And if so, what would I need to use a picaxe chip running my own code? A programmer of some sort, I would immagine. Is this adviseable, or would you recommend pruchasing a blank PIC instead?

And yes, Hooter, this does involve an RFID smart card...I'm trying to write to it without using a full reader module.

-Scott
 

lahaye

Member
[OFF]

Hi Scott,
Don't change your username yet; I was assuming you were going for German.
I have no clue of Norwegian (obviously)... but two Online dictionaries have state that reisende is the male (or both?, do they have gender?) version of traveller. One of these sites can handle back an forth translation of 22 (or 23 with Turkish...;)) European languages plus some more. No idea whether it is good though, for dictionary use it seems fine.
As I am always looking for a one stop translation site (mainly dictionary use) I have bookmarked it. http://www.tranexp.com:2000/Translate/result.shtml for those who might be interested.
There is a Norwegian user on this forum (active in the last days) so you could always annoy him per PM ...:D. Midnightsun is the name (moonshine would have been more appropriate ;) )

-running out of smileys here-

Regards

[Edit]

I have written some wrong/unclear stuff in the initial post.
Let me confuse you a bit more:

In certain circumstances Reisende can also be the male form:

The traveller:
"Der Reisende" will refer to a male gender, the article (Der, bestimmt/defined) will take care of it, the same is true for:
"Die Reisende" This time Die indicates gender, the Noun is the same.

BUT

A traveller will be:
Ein Reisender. There is still an article (Ein, unbestimmt/undefined) which indicates gender but now the Noun has to change for correct grammar.
Eine Reisende.
In short:
"der Reisende" is correct German as is "die Reisende" and "eine Reisende"
"ein Reisende" is not correct German, it must be "ein Reisender".


Same goes for adverbs:


The adverb version for male is also reisende/reisender, depending of whether the article is defined or undefined.

"Der reisende Mann" correct; "Der reisender Mann" wrong
"Ein reisende Mann" wrong ; "Ein reisender Mann" correct


No article used:

Reisende (without any article) implies a female gender.
Reisender (without any article) implies a male gender.

Do this with driver (Fahrer) things will be more straight forward:
Faher (der/ein)
Fahrerinn (die/eine)


Oh yeah, conversion of articles (defined => undefined):
der/das: ein
die: eine


Although German is my mother tongue (and mom was a German teacher, as most of my relatives...) I have managed to confuse myself...but only temporary...:D



Florian
 
Last edited:

demonicpicaxeguy

Senior Member
Hippy, do you happen to know if the PIC chips themselves would be capable of such short pulses? And if so, what would I need to use a picaxe chip running my own code? A programmer of some sort, I would immagine. Is this adviseable, or would you recommend pruchasing a blank PIC instead?

And yes, Hooter, this does involve an RFID smart card...I'm trying to write to it without using a full reader module.

-Scott
it certainly is possible with a pic,

as for pic programmers i'd found the best value is in the microchip "pickit2" , they are only $35 odd usd and they work very well,

you'll also need a basic compiler unless you want to learn ASM , however if you post the basic code you want compiled i'm sure somone will be nie enough to do that
 

Reisende

New Member
Hi Scott,
Don't change your username yet; .....
Florian
Yeah, I already sent a PM to one of my Norwegian cousins. I'm sure I'll get the skinny from him. Thanks for pointing it out, though, I really should've checked with a native speaker before adopting it as my username.

-Scott

Just got a reply from my cousin...

"reisende" means traveler/vagabond and it's neither of the genders. We call the form "intetkjønn", which means "no gender".
So, I guess I'm fine with using Reisende
 
Last edited:

hippy

Ex-Staff (retired)
I'd go with demonicpicaxeguy; a PIC should be able to do what you want. PicKit2 would be my choice for programmer.

As for language choice, something free and which generates raw in-line assembler would be best - CC5X/CC8E would be my personal choice. To get the timing being looked for you'll need very good control over code generation. PICMicro Assembler would likely be necessary to achieve that or at least to ensure any compiler is generating what's required.

Microchip's free MPLAB includes MPSIM which has a Stopwatch facility which is very useful for getting bit-banged timing right.
 

womai

Senior Member
A raw PIC programmed in a compiled (as opposed to interpreted) language - not necessarily assembler - is certainly up to the task. At 1 MHz execution speed is 1 machine instructions microsecond, at 16 MHz it is 16 long. So microsecond resolution is very doable.

Wolfgang
 

Midnight Sun

New Member
Quote:
"reisende" means traveler/vagabond and it's neither of the genders. We call the form "intetkjønn", which means "no gender".

So, I guess I'm fine with using Reisende


Ahem, ahem, what kind of a Norwegian is your cousin? Reisende is masculine (hankjønn) not neuter.
So reisende means traveller, reisenden means the traveller (definate article) whereas reiseder is plural, ie travellers, which hopefully you are not, unless you are schitzophrenic, in which case you might be.

And I strongly object to using moonshine as a name, as this is the national sport of west Norway, and I live in Oslo. Besides I only brew beer and distill single malt whisky, but never ever moonshine, perish the thought;)

cheers
Hein
 

Midnight Sun

New Member
Nei da,
That is plain slander, I have been on summer holiday, climbing the peaks of northern Norway, and doing some Lofoten bagging in the midnight sun (peaks above 1000 m as apposed to 3000'). And there's a general derth of alcohol in that part of the world, unless one has the foresight of taking 2 kegs of home brew (36 l) with one. :D
 

Attachments

Michael 2727

Senior Member
I wonder how much googling/translating Mitsubishi did before naming their 4WD - Pajero.
I hear sales are booming in South America ;)
 
Top