Hi,
can you verify if it is really necessary to do this:
pinMode(_interrupt, INPUT);
and this:
CORE_PIN13_CONFIG = PORT_PCR_MUX(1); // Alt1 = PTC5. chip pin PTC5
// and then reassign pin 14 to SCK
CORE_PIN14_CONFIG = PORT_PCR_DSE | PORT_PCR_MUX(2); //
Cheers.
On Sunday, April 13, 2014 04:17:07 PM stevech wrote:
> Hmm. I can't recall where I downloaded this...
>
> On Sunday, April 13, 2014 12:07:54 AM UTC-7, mikem wrote:
> > Err,
> > that Teensy3 code is not in my original distribution.
> >
> > On Sunday, April 13, 2014 12:00:25 AM stevech wrote:
> > > The Teensy3 specific code below is in RF22.cppI downloaded from the
> > > distribution.
> > > I assume it will be in RadioHead. I didn't author it. I did correct an
> > > error in the SPI clock pin remapping, which is the last line of code
> >
> > below)
> >
> > > // Add by Adrien van den Bossche <
vand...@univ-tlse2.fr
> > > <javascript:>>
> > >
> > > > #if defined (__MK20DX128__) || defined (__MK20DX256__)
> > > > pinMode(_interrupt, INPUT);
> > > > #endif
> > > >
> > > >
> > > > // start the SPI library:
> > > > // Note the RF22 wants mode 0, MSB first and default to 1 Mbps
> > > >
> > > > _spi->begin();
> > > > //Serial.println("begin OK");
> > > > _spi->setDataMode(SPI_MODE0);
> > > > _spi->setBitOrder(MSBFIRST);
> > > > _spi->setClockDivider(SPI_CLOCK_DIV16); // (16 Mhz / 16) = 1 MHz
> > > >
> > > > // Add by Adrien van den Bossche
> > > > <
vand...@univ-tlse2.fr<javascript:>>