In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Glenn_Webber wrote: Hi, I am trying to get a SX28 to talk to a nRF905 [color=#0000ff][color=#0000ff][2] void[/color][/2][/color][color=#0000ff][color=#0000ff][2]void[/color][/2][/color][color=#008000][color=#008000][2]// Port I/O configuration: 0=output, 1=input [/color][/2][/color][color=#008000][color=#008000][2]//TX_EN

[/color][/2][/color][color=#008000][color=#008000][2]//TRX_CE

[/color][/2][/color][color=#008000][color=#008000][2]//PWR_UP

[/color][/2][/color][color=#008000][color=#008000][2]//CD

[/color][/2][/color][color=#008000][color=#008000][2]//AM

[/color][/2][/color][color=#008000][color=#008000][2]//DR

[/color][/2][/color][color=#008000][color=#008000][2]//CSN

[/color][/2][/color][color=#008000][color=#008000][2]// nRF initial modes

[/color][/2][/color][color=#008000][color=#008000][2]// Rx mode

[/color][/2][/color][color=#008000][color=#008000][2]// Standby mode

[/color][/2][/color][color=#008000][color=#008000][2]// Power down

[/color][/2][/color][color=#008000][color=#008000][2]// Chip Select Not = enabled

[/color][/2][/color][color=#0000ff][color=#0000ff][2] void[/color][/2][/color][color=#0000ff][color=#0000ff][2]void[/color][/2][/color][color=#0000ff][color=#0000ff][2] unsigned[/color][/2][/color][color=#0000ff][color=#0000ff][2]char[/color][/2][/color][color=#0000ff][color=#0000ff][2]unsigned[/color][/2][/color][color=#0000ff][color=#0000ff][2]char[/color][/2][/color][color=#0000ff][color=#0000ff][2] unsigned[/color][/2][/color][color=#0000ff][color=#0000ff][2]char[/color][/2][/color][color=#0000ff][color=#0000ff][2] while[/color][/2][/color][color=#0000ff][color=#0000ff][2] return[/color][/2][/color][color=#0000ff][color=#0000ff][2] void[/color][/2][/color][color=#0000ff][color=#0000ff][2]void[/color][/2][/color][color=#0000ff][color=#0000ff][2]int[/color][/2][/color][color=#008000][color=#008000][2]//Sets center frequency together with HFREQ_PLL [/color][/2][/color][color=#008000][color=#008000][2]//Output power, Band 433 or 868/915 MHz

[/color][/2][/color][color=#008000][color=#008000][2]//Tx and Rx Address width

[/color][/2][/color][color=#008000][color=#008000][2]//RX payload width

[/color][/2][/color][color=#008000][color=#008000][2]//Tx payload width

[/color][/2][/color][color=#008000][color=#008000][2]//CRC check. Crystal oscillator frequency.

[/color][/2][/color][color=#008000][color=#008000][2]//Write nRF configuration

[/color][/2][/color][color=#0000ff][color=#0000ff][2]for[/color][/2][/color][color=#008000][color=#008000][2]//Write TX Address

[/color][/2][/color][color=#0000ff][color=#0000ff][2]for[/color][/2][/color][color=#0000ff][color=#0000ff][2] void[/color][/2][/color][color=#0000ff][color=#0000ff][2]char[/color][/2][/color][color=#0000ff][color=#0000ff][2]int[/color][/2][/color][color=#008000][color=#008000][2]//Write TX Payload [/color][/2][/color][color=#0000ff][color=#0000ff][2]for[/color][/2][/color][color=#008000][color=#008000][2]// Start transmitting

[/color][/2][/color][color=#0000ff][color=#0000ff][2]while[/color][/2][/color][color=#008000][color=#008000][2]// Wait for transmission to finish

[/color][/2][/color][color=#0000ff][color=#0000ff][2] void[/color][/2][/color][color=#0000ff][color=#0000ff][2]void[/color][/2][/color][color=#0000ff][color=#0000ff][2]int[/color][/2][/color][color=#0000ff][color=#0000ff][2]char[/color][/2][/color][color=#008000][color=#008000][2]//Read RX Payload [/color][/2][/color][color=#0000ff][color=#0000ff][2]for[/color][/2][/color][color=#0000ff][color=#0000ff][2]if[/color][/2][/color][color=#800000][color=#800000][2]'o'[/color][/2][/color][color=#800000][color=#800000][2]'n'[/color][/2][/color][color=#0000ff][color=#0000ff][2]else[/color][/2][/color][color=#0000ff][color=#0000ff][2]if[/color][/2][/color][color=#800000][color=#800000][2]'o'[/color][/2][/color][color=#800000][color=#800000][2]'f'[/color][/2][/color][color=#800000][color=#800000][2]'f'[/color][/2][/color][color=#0000ff][color=#0000ff][2]else[/color][/2][/color][2] USBsend(SpiRxBuf);

} I have tryed the Shiftout and Shiftin but have had no luck, I need a SPI. Thanks Glenn [/2] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=355205 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)