Skip to main content

TDM2506 RA4M1 Mini

Tổng quan

RA4M1 Mini tương thíthích phần mềm  với Arduino Uno R4 Minima Development Kit một board pháphát triển vi điều khiển nhỏ gọn với nhiều giao diện kỹ thuật số. Về phần cứng, sử dụng chip R7FA4M1AB3CFM, được trang bị vi xử 32-bit Cortex-M4®M4® đơn nhânhân, đơn vị nh toátoán dấu chấm động (FPU), hỗ trợ tần số xung nhịp n đến 48MHz. Bộ nhớ ch hợp gồm 256KB ROM, 32KB SRAM 8KB EEPROM, giúgiúp tăng khả năng tương thíthích với nhiều ngoại vi khákhác nhau, hỗ trợ linh hoạt cho c ứng dụng.

Về phần mềm, bạn thể sử dụng Arduino IDE để lập trìtrình, giúgiúp việc pháphát triển ứng dụng nhanh chóchóng, dễ ng.

Sử dụng chung source với Arduino Uno R4 Minima giúgiúp dễ ng pháphát triển c ứng dụng trêtrên arduino.

Sản phẩm TDM2506-Mini (Mặt trước)

Sản phẩm TDM2506-Mini (Mặt sau)

image.png

RA4M1_Bottom.jpg

nh năng nổi bật

  • Vi điều khiển Renesas RA4M1 dựa trêtrên kiến trútrúc ARM Cortex-M4, tốc độ hoạt động 48MHz, ch hợp FPU.

  • Bộ nhớ: 256KB flash, 32KB SRAM, 8KB EEPROM.

  • Ngoại vi: ADC 14-bit, DAC 12-bit, bộ điều khiển CAN, giao diện USB 2.0, LED RGB ch hợp.

  • Bảo mật: Hỗ trợ a firmware, khởi động an toàtoàn, chống giả mạo, đảm bảo an toàtoàn cho dữ liệu hệ thống.

  • Tương thíthích cao, hỗ trợ nhiều giao diện ngoại vi, mở rộng linh hoạt.

  • Thiết kế -đun castellated, cho phéphép n trực tiếp o board mạch chủ.

  • Hỗ trợ Arduino IDE, giúgiúp người ng pháphát triển nhanh chóchóng thuận tiện hơn.

Sơ đồ châchâ

ch thước mạch

Hướng dẫn set up lập trìtrình  trêtrên Arduino IDE

Bạn tiến nh i đặt set up flash firmware theo link i hướng dẫn ở cuối trang trước khi nạp code qua Arduino IDE.

Sau khi hoàhoàn tất quáquá trìtrình flash firmware giao diện arduino IDE sẽ hiện như vầy.

image.png

Bạn tiến nh nạp lần đầu với chương trìtrình hello world đơn giản với code mẫu.

void setup() {
  // Initialize serial communication at 115200 baud rate
  Serial.begin(115200);
  
  // Wait for serial port to connect (needed for some Arduino boards)
  while (!Serial) {
    ; // Wait for serial port to connect
  }
}

void loop() {
  // Print "Hello, World!" to the Serial Monitor
  Serial.println("Hello, World!");
  
  // Wait for 1 second (1000 milliseconds)
  delay(1000);
}

Sau khi nạp lần đầu port của mạch sẽ xuất hiện đâây kết quả hiển thị trêtrên Arduino IDE.

image.png

Chương trìtrình đãã chạy thàthành ng COM của board đãã hiển thị trêtrên n nh những lần sau bạn chỉ cần chọn đúúng com nạp code.

Code mẫu điều khiển led RGB

Dưới đâây code mẫu điều khiển led RGB trêtrên mạch ng châchân 6 của mạch.

#include <Adafruit_NeoPixel.h>

// Define the data pin and number of LEDs
#define DATA_PIN 6    // P106 (Pin 6 on Arduino R4)
#define NUM_LEDS 1    // One LED

// Create NeoPixel object
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, DATA_PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  // Initialize the NeoPixel strip
  strip.begin();
  strip.setBrightness(50); // Set brightness (0-255, 50 is ~20% to avoid overheating)
  strip.show(); // Initialize all pixels to 'off'
  
  // Initialize serial communication for debugging (optional)
  Serial.begin(115200);
  while (!Serial) {
    ; // Wait for serial port to connect
  }
  Serial.println("Addressable RGB LED Control Started");
}

void loop() {
  // Red
  setRGB(255, 0, 0); // Full Red, no Green, no Blue
  Serial.println("Red");
  delay(1000);
  
  // Green
  setRGB(0, 255, 0); // No Red, full Green, no Blue
  Serial.println("Green");
  delay(1000);
  
  // Blue
  setRGB(0, 0, 255); // No Red, no Green, full Blue
  Serial.println("Blue");
  delay(1000);
  
  // White
  setRGB(255, 255, 255); // Full Red, Green, Blue
  Serial.println("White");
  delay(1000);
  
  // Purple
  setRGB(255, 0, 255); // Full Red, no Green, full Blue
  Serial.println("Purple");
  delay(1000);
  
  // Off
  setRGB(0, 0, 0); // No Red, no Green, no Blue
  Serial.println("Off");
  delay(1000);
}

// Function to set RGB LED color
void setRGB(uint8_t red, uint8_t green, uint8_t blue) {
  strip.setPixelColor(0, strip.Color(red, green, blue)); // Set color for the first (and only) LED
  strip.show(); // Update the LED
}

i nguyênguyên:

Xem thêthêm: 

Hướng dẫn Flash Firmware Bootloader Arduino cho chip 

image.png