Velleman VMA322 Скачать руководство пользователя страница 1

 
 

VMA322 

 

 

2.4 GHZ NRF24L01 WIRELESS TRANCEIVER MODULE (2 PCS) 

 

USER MANUAL 

  

 

 

 

Содержание VMA322

Страница 1: ...VMA322 2 4 GHZ NRF24L01 WIRELESS TRANCEIVER MODULE 2 PCS USER MANUAL ...

Страница 2: ...tions of the device before actually using it All modifications of the device are forbidden for safety reasons Damage caused by user modifications to the device is not covered by the warranty Only use the device for its intended purpose Using the device in an unauthorised way will void the warranty Damage caused by disregard of certain guidelines in this manual is not covered by the warranty and th...

Страница 3: ...d at least two RF modules one to transmit and the other to receive If you use a standard Arduino board you should use the Arduino board s 3 3 V pin VDD3V3 to provide power the nRF24L01 module has 1 9 3 6 V power voltage level Please note do not use 5 V pin VDD5V to provide power as this may destroy the module VMA322 VMA100 GND GND VCC 3 3V CS D8 CSN D9 SCK D10 MOSI D11 MISO D12 IRQ D13 Download th...

Страница 4: ...ata ready TX_DS interrupt SPI_RW_Reg FLUSH_TX 0 SPI_Write_Buf WR_TX_PLOAD tx_buf TX_PLOAD_WIDTH write playload to TX_FIFO if status MAX_RT if receive data ready MAX_RT interrupt this is retransmit than SETUP_RETR SPI_RW_Reg FLUSH_TX 0 SPI_Write_Buf WR_TX_PLOAD tx_buf TX_PLOAD_WIDTH disable standy mode SPI_RW_Reg WRITE_REG STATUS status clear RX_DR or TX_DS or MAX_RT interrupt flag delay 1000 Funct...

Страница 5: ...t MISO bit SPI_PORT SCK then set SCK low again return Byte return read unsigned char Function SPI_RW_Reg Description Writes value value to register reg unsigned char SPI_RW_Reg unsigned char reg unsigned char value unsigned char status SPI_PORT CSN CSN low init SPI transaction status SPI_RW reg select register SPI_RW value and write value to it SPI_PORT CSN CSN high again return status return nRF2...

Страница 6: ... Set CSN low init SPI tranaction status SPI_RW reg Select register to write to and read status unsigned char for i 0 i bytes i pBuf i SPI_RW 0 Perform SPI_RW to read unsigned char from nRF24L01 SPI_PORT CSN Set CSN high again return status return nRF24L01 status unsigned char Function SPI_Write_Buf Description Writes contents of buffer pBuf to nRF24L01 Typically used to write TX payload Rx Tx addr...

Страница 7: ...E_REG EN_AA 0x01 Enable Auto Ack Pipe0 SPI_RW_Reg WRITE_REG EN_RXADDR 0x01 Enable Pipe0 SPI_RW_Reg WRITE_REG SETUP_RETR 0x1a 500us 86us 10 retrans SPI_RW_Reg WRITE_REG RF_CH 40 Select RF channel 40 SPI_RW_Reg WRITE_REG RF_SETUP 0x07 TX_PWR 0dBm Datarate 2Mbps LNA HCURR SPI_RW_Reg WRITE_REG CONFIG 0x0e Set PWR_UP bit enable CRC 2 unsigned chars Prim TX MAX_RT TX_DS enabled SPI_Write_Buf WR_TX_PLOAD...

Страница 8: ...oid loop for unsigned char status SPI_Read STATUS read register STATUS s value if status RX_DR if receive data ready TX_DS interrupt SPI_Read_Buf RD_RX_PLOAD rx_buf TX_PLOAD_WIDTH read playload to rx_buf SPI_RW_Reg FLUSH_RX 0 clear RX_FIFO for int i 0 i 32 i Serial print Serial print rx_buf i HEX print rx_buf Serial println SPI_RW_Reg WRITE_REG STATUS status clear RX_DR or TX_DS or MAX_RT interrup...

Страница 9: ...1 shift next bit into MSB if SPI_IN MISO Byte 1 capture current MISO bit SPI_PORT SCK then set SCK low again return Byte return read unsigned char Function SPI_RW_Reg Description Writes value value to register reg unsigned char SPI_RW_Reg unsigned char reg unsigned char value unsigned char status SPI_PORT CSN CSN low init SPI transaction status SPI_RW reg select register SPI_RW value and write val...

Страница 10: ...r bytes unsigned char status i SPI_PORT CSN Set CSN low init SPI tranaction status SPI_RW reg Select register to write to and read status unsigned char for i 0 i bytes i pBuf i SPI_RW 0 Perform SPI_RW to read unsigned char from nRF24L01 SPI_PORT CSN Set CSN high again return status return nRF24L01 status unsigned char Function SPI_Write_Buf Description Writes contents of buffer pBuf to nRF24L01 Ty...

Страница 11: ...I_RW_Reg WRITE_REG RF_CH 40 Select RF channel 40 SPI_RW_Reg WRITE_REG RX_PW_P0 TX_PLOAD_WIDTH Select same RX payload width as TX Payload width SPI_RW_Reg WRITE_REG RF_SETUP 0x07 TX_PWR 0dBm Datarate 2Mbps LNA HCURR SPI_RW_Reg WRITE_REG CONFIG 0x0f Set PWR_UP bit enable CRC 2 unsigned chars Prim RX RX_DR enabled SPI_PORT CE Set CE pin high to enable RX device This device is now ready to receive one...

Страница 12: ...dress www velleman eu Use this device with original accessories only Velleman nv cannot be held responsible in the event of damage or injury resulting from incorrect use of this device For more info concerning this product and the latest version of this manual please visit our website www velleman eu The information in this manual is subject to change without prior notice COPYRIGHT NOTICE The copy...

Страница 13: ...n shocks falls dust dirt humidity and by the article as well as its contents e g data loss compensation for loss of profits consumable goods parts or accessories that are subject to an aging process during normal use such as batteries rechargeable non rechargeable built in or replaceable lamps rubber parts drive belts unlimited list flaws resulting from fire water damage lightning accident natural...

Отзывы: