#BATCHNAME RX 913.0 MHz PN15 BER 40kbps
# 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 GFSK.
S2 F143

### Set RX Packet Parameters ###
# Disable automatic RX Packet Handling
S2 B000
# Set Preamble Length = 5 nibbles (20 bits)
S2 B405
# Set Preamble Detection Threshold = 4 nibbles (16 bits)
#   (This may need to change depending upon PN sequence)
S2 B520
# Set SYNC word length = 4 Bytes:  Sync Word 3 & 2 & 1 & 0
S2 B306
# The SYNC word values below may need to be modified for each PN sequence.
S2 B600
S2 B703
S2 B8FF
S2 B9F7

### Set RX Modem Parameters (from Excel Register Calculator) ###
# 40KBPS data rate, 20kHz dev, Mod Index=1, XtalTol=1/1, BW=83.2kHz
S2 9C02
S2 A064
S2 A101
S2 A247
S2 A3AE
S2 A402
S2 A591
# 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 (with increase GPIO drive)
#   (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
