Pages

Tuesday, February 26, 2013

Dual RFM12B board testing notes

Now I have tidyied up the messy wiring.  A summary below.

1. RPI SPI0 (Gnd, CLK, MOSI, MISO, nSEL0, nSEL1).

2. 3V3

3. RFM12B #1, #2 (Gnd, CLK, MOSI, MISO, nSEL, xMcuClk, nIRQ)


def Rfm12bTest3b(spiChannelNumber, spiDeviceNumber):

    PrintDoubleSpaceLine("*** Start Test 3b 2013feb2601 ***")


The test program Test3b below can set the RFM's external mcu clock to 2MHz.  Next step is to test the nIRQ.

    rfm12bSpi = spidev.SpiDev()
    OpenSpiChannel(rfm12bSpi, spiChannelNumber, spiDeviceNumber)

    Rfm12bSendCommand2(rfm12bSpi, SetExternalMpuClockFrequency2Mhz)
 
    Rfm12bSendCommand2(rfm12bSpi, TurnOnWakeupXtlLvd)

    for i in range (100000):
        Rfm12bSendCommand2(rfm12bSpi, WakeUpEvery2Ms)
        time.sleep(0.005)
        Rfm12bSendCommand2(rfm12bSpi, ClearInterrupt)
time.sleep(0.010)
 
    Rfm12bSendCommand2(rfm12bSpi, TurnOffWakeupTurnOnXtlLvd)

    PrintDoubleSpaceLine("*** Stop Test 3b ***")

.END



No comments:

Post a Comment