DF Robot Leonardo V1.2 & Xbee Programming Question - Page 1
Forum section: electronics / beginners

author: Olegkuskhov
author_rank: Contributor
timestamp: August 13, 2024, 01:31:51 am
content: 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-12VInput Voltage (limits): 6-12VMicrocontroller:ATmega32u4Operating Voltage: 5VInterface: Micro USBCompatible with Arduino R3 series pin mappingDirectly support Xbee and XBee form factor wifi,bluetooth and RF modulesExtend D14~D16 digital pins with 5v power supplyClock Speed 16 MHzSize: 70x55x14mmDigital I/O Pins: 20PWM Channels: 7Analog Input Channels: 12DC Current per I/O Pin: 40 mADC Current for 3.3V Pin: 800 mAFlash Memory 32 KB (ATmega32u4) of which 4 KB used by bootloaderSRAM: 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?

author: xvr
author_rank: Frequent Contributor
timestamp: August 13, 2024, 02:58:54 pm
content: 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/leonardoandhttps://docs.arduino.cc/hardware/leonardo/

author: Ian.M
author_rank: Super Contributor
timestamp: August 13, 2024, 04:38:14 pm
content: That's an odd one:https://www.dfrobot.com/product-832.htmlWithout 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 withAtmel 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\caterinaIf you are using OSX or Linux or need more help for FLIP, seehttps://support.arduino.cc/hc/en-us/articles/4408887452434-Flash-USB-to-serial-firmware-in-DFU-modebut 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/

author: RobtP
author_rank: Contributor
timestamp: August 13, 2024, 06:15:31 pm
content: Could this be a missing driver?This kind of thing...https://support.arduino.cc/hc/en-us/articles/4412955149586-If-your-board-does-not-appear-on-a-port-in-Arduino-IDE