Author Topic: DF Robot Leonardo V1.2 & Xbee Programming Question  (Read 170 times)

0 Members and 1 Guest are viewing this topic.

Offline OlegkuskhovTopic starter

  • Contributor
  • Posts: 16
  • Country: id
DF Robot Leonardo V1.2 & Xbee Programming Question
« on: August 13, 2024, 01:31:51 am »
I have this Board DF Robot Leonardo V1.2 & Xbee. Below I attach how the board looks like. I'm sorry for the low picture resolution. Below is the specification of the development board.

Input Voltage (recommended): 7-12V
Input Voltage (limits): 6-12V
Microcontroller:ATmega32u4
Operating Voltage: 5V
Interface: Micro USB
Compatible with Arduino R3 series pin mapping
Directly support Xbee and XBee form factor wifi,bluetooth and RF modules
Extend D14~D16 digital pins with 5v power supply
Clock Speed 16 MHz
Size: 70x55x14mm
Digital I/O Pins: 20
PWM Channels: 7
Analog Input Channels: 12
DC Current per I/O Pin: 40 mA
DC Current for 3.3V Pin: 800 mA
Flash Memory 32 KB (ATmega32u4) of which 4 KB used by bootloader
SRAM: 2.5 KB (ATmega32u4)
EEPROM: 1 KB (ATmega32u4)

This board use Atmega 32u4. I read somewhere on the internet, this chip has built in USB. To my surprise, when i try to plug it in to my pc. I can't find any port detected. The traditional arduino board has serial chip like ch340. I don't see it here. I can't find any documentation on the internet regarding this issue. Have anyone try to program it via usb?. If so, what driver needs to be installed or what step i need to do?. Or i can just go with icsp programming. I have no usbasp at this time. Should i buy it?
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 384
  • Country: ie
    • LinkedIn
Re: DF Robot Leonardo V1.2 & Xbee Programming Question
« Reply #1 on: August 13, 2024, 02:58:54 pm »
It should work (Atmega32u4 really implements USB and do not require any USB-SERIAL bridge)
Docs: https://github.com/arduino/docs-content/tree/main/content/hardware/02.hero/boards/leonardo and https://docs.arduino.cc/hardware/leonardo/

 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12995
Re: DF Robot Leonardo V1.2 & Xbee Programming Question
« Reply #2 on: August 13, 2024, 04:38:14 pm »
That's an odd one: https://www.dfrobot.com/product-832.html
Without an XBee module plugged in, and with nothing on the extra sensor interface connector (which breaks out the SPI pins from the ISP header), it should be 100% Arduino Leonardo compatible.  Try double-clicking its reset button twice to force bootloader mode.  It should then appear as a serial port for  8 seconds, giving just enough time to upload a sketch to it that doesn't break USB Serial support.  Clone bootloaders may give you less time.

N.B. Arduino IDE 2.x can be problematic and may not react fast enough to grab the new serial port before it goes away again - use the classic v1.8x IDE, and in Preferences, turn on verbose output during upload.   When you see the message that it is searching for the upload port (a line reading PORTS with a list of COM ports in brackets after it), double click reset, and the IDE should detect the bootloader port and use it, even if a different port is nominally selected in the IDE.

If it *NEVER* appears as a COM port, either its got a hardware problem (but check you are using a known good host port and USB cable), or it may simply not have the Arduino Leonardo serial bootloader installed.  As ATmega32U4 chips are shipped from the factory with a DFU bootloader installed, (and your board has a pulldown on PE2/HWB), you may be able to reprogram it with Atmel FLIP.  Assuming you have the v1.8x IDE installed, you'll find the Leonardo Caterina bootloader hex file in %ProgramFiles(x86)%\Arduino\hardware\arduino\avr\bootloaders\caterina
If you are using OSX or Linux or need more help for FLIP, see https://support.arduino.cc/hc/en-us/articles/4408887452434-Flash-USB-to-serial-firmware-in-DFU-mode but ignore the firmware location as the Uno/Mega serial bridge firmware is useless to you - you need the Leonardo Caterina bootloader firmware.

Worst case you may need to use ISP programming to flash it with the Caterina bootloader.  If you've got another 5V AVR Arduino, there is no need to buy an USBasp (though its certainly useful to have one) as you can run the ArduinoISP sketch on the good Arduino to use it as a programmer for the one with a messed-up bootloader.  See: https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/
 

Offline RobtP

  • Newbie
  • Posts: 6
  • Country: gb
 
The following users thanked this post: Ian.M


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf