Radio Frequency Communications in Arduino Projects by Yury Magda

Radio Frequency Communications in Arduino Projects by Yury Magda

Author:Yury Magda [Magda, Yury]
Language: eng
Format: azw3
Publisher: Yury Magda
Published: 2013-12-10T05:00:00+00:00


// int freq = 0xF7CC; F = 45.0 MHz

// int freq = 0xFA34; F = 50.0 MHz

// int freq = 0xFF3C; F = 65.0 MHz

int freq = 0xFA28; // F = 49.86 MHz

void WriteOsc(void)

{

digitalWrite(pSEN, HIGH); // the CS is brought HIGH

digitalWrite(pSEN, LOW); // Framing begins by bringing CS low

for (int i1 = 0; i1 < 16; i1++)

{

digitalWrite(pSCK, LOW); // SCK goes LOW

tmp = freq & 0x8000;

digitalWrite(pSDI, LOW);

if (tmp)

digitalWrite(pSDI, HIGH);

digitalWrite(pSCK, HIGH);

freq = freq << 1;

}

digitalWrite(pSEN, HIGH); // the end of the conversion

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.