#BATCHNAME RX 913.0 MHz PN9 BER OOK 10kbps
# Revision Date:  12/16/2009
# This script is appropriate for use with EZRadioPRO:
#  443x-T-B1-B-x (or DKDB1) Split TX/RX RF Test Card
#  443x-T-B1-D-x Direct Tie RF Test Card
#  Do NOT use with 443x-T-B1-A-x (or DKDB0) AntDiv RF Test Card
#  Do NOT use with 443x-T-B1-C-x (or DKDB2) Single Antenna RF Test Card
#    (GPIO pins are not available for control of AntDiv or RF Switch)

# Set SDN Pin 20 = LOW
L6
# Set VDD:  1.8V=V54, 2.4V=V7E, 3.0V=V98, 3.3V=VA1, 3.6V=VA9
VA1
# Apply Software Reset
S2 8780

# Adjust Crystal for zero freq error (User may need to modify this value)
S2 8971

### Set Desired Receive Frequency = 913.0 MHz ###
S2 F575
S2 F6A2
S2 F780

# Select TR Data Clock out via GPIO, Direct Mode OOK.
S2 F141

### Set RX Packet Parameters ###
# Disable automatic RX Packet Handling
S2 B000
# Set Preamble Length = 4 nibbles (16 bits)
S2 B404
# Set Preamble Detection Threshold = 2 nibbles (8 bits)
#   (This may need to change depending upon PN sequence)
S2 B510
# Set SYNC word length = 3 Bytes:  Sync Word 3 & 2 & 1
S2 B304
# The SYNC word values below may need to be modified for each PN sequence.
S2 B686
S2 B7F4
S2 B8DC

### Set RX Modem Parameters (from Excel Register Calculator) ###
# 10KBPS data rate, BW=100kHz
S2 9C35
S2 A032
S2 A102
S2 A28F
S2 A35C
S2 A402
S2 A591
S2 AC28
S2 AD7D
S2 AE27
# Disable AFC (the length of "preamble" pattern found within a
#   PN sequence is not sufficient in length to settle AFC.)
S2 9D00
S2 E960

### Configure GPIOs ###
# Set GPIO0 = OFF (not used)
S2 8B1F
# Set GPIO1 = RXDATA output
#   (GPIO1 is conveniently hard-wired to SMA connector on Load Board)
S2 8C94
# Configure GPIO2 = RXCLK out (with increased GPIO drive)
#   (GPIO2 is conveniently hard-wired to SMA connector on Load Board)
#   This RXCLK signal may be used to clock the RXDATA into a
#   BER Analyzer.
S2 8D8F

### Turn Receiver ON ###
S2 8704
