NRF24L01 правильно ли работает по показаниям из порта?

NewUser__
Offline
Зарегистрирован: 14.08.2021
STATUS		= 0x00 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=0
RX_ADDR_P0-1	= 0xffffffffff 0x0000000000
RX_ADDR_P2-5	= 0xff 0x00 0xff 0xff
TX_ADDR		= 0xffffffffff
RX_PW_P0-6	= 0x00 0x00 0xff 0xff 0x00 0x7f
EN_AA		= 0x00
EN_RXADDR	= 0x00
RF_CH		= 0xff
RF_SETUP	= 0xff
CONFIG		= 0xff
DYNPD/FEATURE	= 0xff 0xff
Data Rate	= 1 MBPS
Model		= nRF24L01+
CRC Length	= 16 bits
PA Power	= PA_MAX
ARC		= 15
00000000000000001111111111111111222222222222222233333333333333334444444444444444555555555555555566666666666666667777777777777777

0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

00000ff0f0eddbba99767689aaccdeefe0ffffff1100fff0f000eddbba98776778abccceee0ff0e0010ff0ff1f000ffeccb998877678aaacccedffefffff00ff

01131001222f0f0110ecddddb9889abbcbde1f000010110003110f0f00fffefddaa9aabaaaadefffe012110f010010f0110f100ffcbcabbb8a8bdeeef0012010

bcdee0efdff0eefecefffddeffeecddcdaabbbcaacccdeeeed0f0ffeedeeffddeef0fdedccbbabbbabbabddededf10fefffeeffdde0ffdeeffcbcbbbbabbbbcd

ba878899968abdbbdeedbceeedbcdeedcceedddedcbb898898679ab9bddeebceeecceeedccdeeddcdedccaa98766889a89cdddcdeeeccdeeddcdeedcceeeddab

eeedeefeedddcca8a9a9899bbbccededdeefedeefededefedeefedcaaa9989a9aaabcceddeefeddeefeddeffddcefeddbcba977a99889bccdcedeededeeeddde

f0f000ffff000fee0f0f000ffcddcdddcbbbceee10e1e0ff0ff1f0fdfe0e1efef0eeddcbdcbccebdeeeff0fffff0ff00e0000effff0eeecdcddbbcdcbefeeff0

deeeddeffeef00f00110ee1fff0220ff010ef20fccefecd0ffddefffe221ff0fffeff01f0f10ef10fdeffeccdefddd0ffeff01f210fe0fffe101fe1000eeefec

11fffffe0f00efedefeeeefcefd000e0f0eeeff0f1ef0000ef1efffefdedfffce00ffe00f0f0ffef0000f000eff00ff00efeedecfd0ffed0001ff1efeef11001

ff0001100fff00e110fe0ffffeefeed1ffee0feed0eff1f0f00f001f11f1ee00ed0ffffcffd0d00efdeef0e010f00efff02fff010fffe0ef0efedf00efffeeee

Вот что пишет в порту.

 

Вот программа, которая проверяет:

#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"

RF24 radio(9,10); // инициализировать модуль на пинах 9 и 10 Для Уно
//RF24 radio(9,53);// Для Меги

const uint8_t num_channels = 128;
uint8_t values[num_channels];
void setup(void)
{
  Serial.begin(9600);
  printf_begin();
  radio.begin();
  radio.setAutoAck(false);
  radio.startListening();

  radio.printDetails();  // Вот эта строка напечатает нам что-то, если все правильно соединили.
  delay(5000);              // И посмотрим на это пять секунд.

  radio.stopListening();
  int i = 0;    // А это напечатает нам заголовки всех 127 каналов
  while ( i < num_channels )  {
    printf("%x",i>>4);
    ++i;
  }
  printf("\n\r");
  i = 0;
  while ( i < num_channels ) {
    printf("%x",i&0xf);
    ++i;
  }
  printf("\n\r");
}
const int num_reps = 100;

void loop(void)
{
  memset(values,0,sizeof(values));
  int rep_counter = num_reps;
  while (rep_counter--) {
    int i = num_channels;
    while (i--) {
      radio.setChannel(i);
      radio.startListening();
      delayMicroseconds(128);
      radio.stopListening();
      if ( radio.testCarrier() )
        ++values[i];
    }
  }
  int i = 0;
  while ( i < num_channels ) {
    printf("%x",min(0xf,values[i]&0xf));
    ++i;
  }
  printf("\n\r");
}
int serial_putc( char c, FILE * ) {
  Serial.write( c );
  return c;
}

void printf_begin(void) {
  fdevopen( &serial_putc, 0 );
} 

 

NewUser__
Offline
Зарегистрирован: 14.08.2021

Ой. Я не правильно подключил оказывается. Вот показания после правильного подключения:

STATUS		= 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1	= 0xe7e7e7e7e7 0xc2c2c2c2c2
RX_ADDR_P2-5	= 0xc3 0xc4 0xc5 0xc6
TX_ADDR		= 0xe7e7e7e7e7
RX_PW_P0-6	= 0x20 0x20 0x20 0x20 0x20 0x20
EN_AA		= 0x00
EN_RXADDR	= 0x02
RF_CH		= 0x4c
RF_SETUP	= 0x07
CONFIG		= 0x0f
DYNPD/FEATURE	= 0x00 0x00
Data Rate	= 1 MBPS
Model		= nRF24L01+
CRC Length	= 16 bits
PA Power	= PA_MAX
ARC		= 0
00000000000000001111111111111111222222222222222233333333333333334444444444444444555555555555555566666666666666667777777777777777

0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

00000000000000000000000000000000000000000000000000000000002222222122222222220000000000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000000000000002222122222222222220000000000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000000000110004343222222222123230000000000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000000000100003122343223323332220000000000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000000000000002222213222332233220001000000000000000000000000000000000000000000000000

00001100221111111110000000011122212223322222332110000100112333432123333332211111100000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000010000000002312222221233222231001111111100000011100000000000000000000000000000000

00001111121122220120110110122222223244343111100000000000000233444422222222220000000000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000000000000002133332212222221220000000000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000000000000003332222222122222220000000000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000000000000002224323443232222220000000000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000000000000001223333221222222120000000000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000000000000003333122223323122220000000000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000000000000001222223323322221220000000000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000000000000001343333322222222210000000000000000000000000000000000000000000000000000

И еще вопрос. Если хотя бы есть цифры( не нули), значит, модуль рабочий?