Работаем с USB стеком nRF24LU1+. Часть 1

USB nRF24LU1+. , SDK, Hello World.
, , WinUSB . USB. , .




ebay. 2 SPI . . reset. ISP . .


, ( ). SPI ftdi, arduino . nrf24le1.

nRF24LU1+ :
  • nRF24l01+ 2.4
  • full speed USB 2.0
  • 8 Intel MCS 51
  • 16 32


:

256 (IRAM). 2 (SRAM) , . .

Keil, nRFgo SDK Hello World


Keil nRFgo SDK. , (, ).
. . Compiler, HAL LIB nRFgo SDK. Projects

├───compiler
│   ├───c51
│   ├───common
│   └───icc8051
├───hal
│   ├───nrf24l01p
│   ├───nrf24le1
│   └───nrf24lu1p
├───lib
│   ├───adns7530
│   ├───assertions
│   ├───crypt
│   ├───display
│   ├───eeprom
│   ├───eeprom255
│   └───rf_test
└───projects
     └───HelloWolrd

Keil. Project — New uVision Prject. , . , .

, ( Source Group 1 — Add New Iteam)

, UART «Hello World!»

#include <stdio.h>
#include "nrf24lu1p.h"
#include "hal_uart.h"
#include "hal_delay.h"

char putchar(char c)
{
  hal_uart_putchar(c);
  return c;
}

void putstring(char *s)
{
  while(*s != 0)
    putchar(*s++);
}

void main(void)
{
	P0DIR = 0x00;
	hal_uart_init(UART_BAUD_57K6);
	EA = 1;

  for(;;)
  {
		putstring("\r\nHello World!\r\n");
		delay_ms(1000);
   }
}

:
hal\nrf24lu1p\hal_uart.c
hal\hal_delay.c

, ,
Include Path .
— Options.

Output Create HEX file.
51 Include
..\..\hal;..\..\hal\nrf24lu1p;..\..\compiler\c51;..\..\compiler\common;

. hex . . HID , . .
.


, UART Hello World.

. USB, , WinUSB .

Source: https://habr.com/ru/post/zh-CN382873/


All Articles