Download Print this page
Velleman VMA322 User Manual

Velleman VMA322 User Manual

2.4 ghz nrf24l01 wireless transceiver module (2 pcs)

Advertisement

Quick Links

VMA322
2.4 GHZ NRF24L01 WIRELESS TRANCEIVER MODULE (2 PCS)
USER MANUAL

Advertisement

loading
Need help?

Need help?

Do you have a question about the VMA322 and is the answer not in the manual?

Questions and answers

Summary of Contents for Velleman VMA322

  • Page 1 VMA322 2.4 GHZ NRF24L01 WIRELESS TRANCEIVER MODULE (2 PCS) USER MANUAL...
  • Page 2: Safety Instructions

     Nor Velleman nv nor its dealers can be held responsible for any damage (extraordinary, incidental or indirect) – of any nature (financial, physical…) arising from the possession, use or failure of this product.
  • Page 3 VMA322 Overview VMA322 This module based on Nordic nRF24L01, highly integrated, ultra-low power (ULP) 2 Mbps RF transceiver for the 2.4 GHz ISM (Industrial, Scientific and Medical) band. Nordic nRF24L01+ integrates a complete 2.4 GHz RF transceiver, RF synthesizer, and baseband logic including the Enhanced ShockBurst™ hardware protocol accelerator supporting a high-speed SPI interface for the application controller.
  • Page 4 VMA322 SPI_DIR = ( CE + SCK + CSN + MOSI); SPI_DIR &=~ ( IRQ + MISO); // attachInterrupt(1, _ISR, LOW);// interrupt enable Serial.begin(9600); init_io(); // Initialize IO port unsigned char status=SPI_Read(STATUS); Serial.print("status = "); Serial.println(status,HEX); // There is read the mode’s status register, the default value should be ‘E’...
  • Page 5 VMA322 * from nRF24L01 during write, according to SPI protocol **************************************************/ unsigned char SPI_RW(unsigned char Byte) unsigned char i; for(i=0;i<8;i++) // output 8-bit if(Byte&0x80) SPI_PORT |=MOSI; // output 'unsigned char', MSB to MOSI else SPI_PORT &=~MOSI; SPI_PORT|=SCK; // Set SCK high..
  • Page 6 VMA322 unsigned char reg_val; SPI_PORT&=~CSN; // CSN low, initialize SPI communication... SPI_RW(reg); // Select register to read from.. reg_val = SPI_RW(0); // ..then read register value SPI_PORT|=CSN; // CSN high, terminate SPI communication return(reg_val); // return register value /**************************************************/ /************************************************** * Function: SPI_Read_Buf();...
  • Page 7 VMA322 return(status); // return nRF24L01 status unsigned char /**************************************************/ /************************************************** * Function: TX_Mode(); * Description: * This function initializes one nRF24L01 device to * TX mode, set TX address, set RX address for auto.ack, * fill TX payload, select RF channel, datarate & TX pwr.
  • Page 8 VMA322 unsigned char rx_buf[TX_PLOAD_WIDTH]; unsigned char tx_buf[TX_PLOAD_WIDTH]; //*************************************************** void setup() SPI_DIR = ( CE + SCK + CSN + MOSI); SPI_DIR &=~ ( IRQ + MISO); // attachInterrupt(1, _ISR, LOW); // interrupt enable Serial.begin(9600); init_io(); // Initialize IO port unsigned char status=SPI_Read(STATUS);...
  • Page 9 VMA322 * Description: * Writes one unsigned char to nRF24L01, and return the unsigned char read * from nRF24L01 during write, according to SPI protocol **************************************************/ unsigned char SPI_RW(unsigned char Byte) unsigned char i; for(i=0;i<8;i++) // output 8-bit if(Byte&0x80) SPI_PORT |=MOSI;...
  • Page 10 VMA322 /**************************************************/ unsigned char SPI_Read(unsigned char reg) unsigned char reg_val; SPI_PORT&=~CSN; // CSN low, initialize SPI communication... SPI_RW(reg); // Select register to read from.. reg_val = SPI_RW(0); // ..then read register value SPI_PORT|=CSN; // CSN high, terminate SPI communication return(reg_val);...
  • Page 11 VMA322 SPI_RW(*pBuf++); SPI_PORT|=CSN; // Set CSN high again return(status); // return nRF24L01 status unsigned char /**************************************************/ /************************************************** * Function: RX_Mode(); * Description: * This function initializes one nRF24L01 device to * RX Mode, set RX address, writes RX payload width, * select RF channel, datarate &...
  • Page 12: Copyright Notice

    © COPYRIGHT NOTICE The copyright to this manual is owned by Velleman nv. All worldwide rights reserved. No part of this manual may be copied, reproduced, translated or reduced to any electronic medium or otherwise without the prior written consent of the copyright holder.
  • Page 13 • Velleman® can decide to replace an article with an equivalent article, or to refund the retail value totally or partially when the complaint is valid and a free repair or replacement of the article is impossible, or if the expenses are out of proportion.