GeneRF v1.8 1. Using ........................................................ - ANumSofts

I = Inverted Manchester (Manchester symbol '0' is coded with 2 bits "01" , whereas Manchester ... 1 Manchester bit, and then the baudrate is divised by two.
240KB taille 2 téléchargements 239 vues
GeneRF v1.8 ___________________

1. 2. 3. 4.

5.

6.

Using.................................................................................................... 2 Program parameters............................................................................... 2 Frames and Scripts list ........................................................................... 2 Frame parameters.................................................................................. 2 Name ............................................................................................................. 2 Content .......................................................................................................... 2 Bit duration ..................................................................................................... 3 Settle time ...................................................................................................... 3 Modulation type ............................................................................................... 3 Parasites ......................................................................................................... 3

Script parameters .................................................................................. 3 Name ............................................................................................................. 3 Syntax ............................................................................................................ 3 Allowed functions ............................................................................................. 4 Test................................................................................................................ 5

Script sample ........................................................................................ 5

Presentation GeneRF program allows drive a PLL to send RF frames. With this program, it is possible to : - send predefined frames ASK and FSK - run scripts with frames sendings, loops, delays.

1. Using Before, you must define the COM number (Menu Program / Hardware settings). Set a connection to ANum module (Menu Program / Hardware settings). The ANum module Led must light on. Select a frame or a script and then send it. If the ANum module not respond after transmitting, deconnect and reconnect.

2. Program parameters Some parameters can be defined for all the frames. With it, you can modify the content of a frame without edit it. Click to Configuration.. button, define up to 3 field with corresponding parameters. Ex: Name : Pressure Unit : PSI Coef : 2.0 Offset : 2.2 Now, in you the Content field of a frame, instead write a value P8(5Ah), write the parameter P8(Pressure@). Every time you click on Send button, or the frame must be send in a script, the frame content is evaluated again.

3. Frames and Scripts list This list shows all defined frames and scripts. When you click one, parameters are displayed just below. 'F' icons represent Frame and 'S' icons represents Scripts. A selected frame or script can be copied, deleted, modified or sent (for a frame) or executed (for a script). You can create a new frame or a new script, but parameters will be empty by default.

4. Frame parameters Name It's the frame name. This name will be displayed in the list. All characters are authorized.

Content It's the frame description. Syntax : Mode Nbits ( Value ) Mode Nbits ( Value ) Mode Nbits ( Value ) … Mode is designed by a letter : M = Manchester (Manchester symbol '0' is coded with 2 bits "10" , whereas Manchester symbol '1' is coded "01") I = Inverted Manchester (Manchester symbol '0' is coded with 2 bits "01" , whereas Manchester symbol '1' is coded "10") R = Repetition (repetition of Value) N = Normal (binary) S = Biphase-S (symbol '0' is coded "01" or "10", symbol '1' is coded "00" or "11", edge for each symbol) P = PWM (symbols '0' and '1' are coded as defined in Parameters Configuration window) Nbits indicates number of bits to represent Value. Value can be written : - in decimal with 'd' at the end (ex: 172d) - in hexadecimal with 'h' at the end (ex: A2h) - in binary with 'b' at the end (ex : 10101100b)

Ex : N12(A2h) M3(101b) N12(A2h) M3(000101b) R500(10b) N3(111b) S6(2Ch) P2(10b)

represents represents represents represents represents represents

12 bits : "000010100010" 3 Manchester bits : "011001" 18 bits : "000010100010011001" 1000 bits : "10101010..1010" 15 bits : "111001011001010" 6 bits : "110100"

Important : - in Repetition mode, Value must be always in binary - in other modes as Repetition, Nbits is limited to 32 bits - N mode can be used to specify Mark or Space symbols in Manchester or Biphase-S coding (time violation).

Bit duration This field defines the bit duration (20.0µs..680.8µs with a resolution of 200ns) Important : The bit duration is the time to send one normal bit. When you want to send Manchester bits, you need 2 bits for 1 Manchester bit, and then the baudrate is divised by two. For example, if the bit duration is 128.0µs, the NRZ baudrate is 7812bds and Manchester baudrate is 3905bds.

Settle time This feld represents the time between PLL wake up and first bit to transmit (see Fig2 on schematic). (0.0ms .. 60.0 ms with a resolution of 0.1ms).

Modulation type ASK of FSK (see Fig2 and Fig3 on schematic).

Parasites Parasites can be added to datas, to simulate bad transmission or bad reception. See schematic for more details. Bounce : bounce on every edge of data (10.0µs .. 99.4µs with a resolution of 600ns). Jitter : add a jitter of +/- value (10µs .. 99 µs with a resolution of 1µs) Glitch : generate a glitch on a precise bit, with a precise duration (1.0µs .. 154.0µs with a resolution of 600ns).

5. Script parameters Name It's the script name. This name will be displayed in the list. All characters are authorized.

Syntax A script is composed of keywords. All keywords must be separated by a character ' ' or ',' or ')' or '('

Labels Labels are used to specify a location in the script for jump. Every label must have ':' character at the end. Ex: Loop: ..

If (V0 = 10) Goto Loop:

Variables It is possible to use up to 256 variables named "V0" to "V255". These variables can be named for more readability (See Defines).

Defines Defines allow to associate a name to a variable or a constant. Ex : #define Counter V0 #define Increment 1

Comments Comments begin with a ';' character. Ex : ; Comment Delayms(100) ; Comment

Allowed functions Legend : C = Constant S = String with " " delimiters V = Variable (V0..V255) L = Label

Delayms(C) Script is stopped during C ms Ex : Delayms(100)

; to wait 100ms

Important : - this delay is not precise ~10ms

Send(S) Send a frame. You can use list box to select a defined frame for more facilities. Ex : Send("Trame 1bis") Important : - before the frame is executed, datas are transmitted to ANum module (4..10ms). It's important when many frames are sent one after another.

V=C Variable V will content C Ex : V0 = 10

V = V + C and V = V - C Calculation on variables Ex : V0 = V1 + 2 V0 = V0 - 1

If (V cond C) Goto L Tests on variables. If condition is true, go to specified label. Possible conditions are : "=", "", ">", "=", "