View previous topic :: View next topic |
Author |
Message |
s17fox
Joined: 17 Apr 2008 Posts: 4
|
Posted: Sun Apr 05, 2020 5:16 pm Post subject: Arduino proMicro connection problems |
|
|
Hello from Greece.
I have bought from ebay a pro Micro USB board. M32U4 CPU
It works perfect with the Arduino IDE as Leonardo
I tried to connect it to BASCOM environment but I can’t find the combination at programmer menu.
Can anybody help me?
Thanks
G.Kordogiannis |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Mon Apr 06, 2020 7:16 am Post subject: |
|
|
You should configure external programmer like this screen shows:
So you should have Avrdude too.
Once again parameters are : -p atmega32u4 -c avr109 -P com43 -b 57600 -V -D -U flash:w:"{FILE}":i |
|
Back to top |
|
|
s17fox
Joined: 17 Apr 2008 Posts: 4
|
Posted: Tue Apr 07, 2020 5:13 pm Post subject: SOLUTIONS |
|
|
Dear Sir,
Thank you for your fast reaction!!!
I have already installed Arduino IDE 1.8.12.
FOR MORE INFORMATION UNZIP REPLY01 AND READ THE DOC FILE
THANKS
GEORGE |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Wed Apr 08, 2020 7:45 am Post subject: |
|
|
Cause m32u4 have bullit in support for USB that board dont have any USB to USART converter. Because of that this board should be cheaper...and Arduino IDE add support for this USB firmware to every sketch.
Because I have USB addon I also add support for USB to my programs for that board and look -> I send this message via USB straight from Bascom terminal to this LCD -> it works
Simply in Bascom you have more control and must/or not add support for USB.
|
|
Back to top |
|
|
s17fox
Joined: 17 Apr 2008 Posts: 4
|
Posted: Wed Apr 08, 2020 10:59 am Post subject: |
|
|
I always live to learn!!! (Socrates)
I have just bought it.
I’ll write news when I get it.
Thanks
George |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5921 Location: Holland
|
Posted: Wed Apr 08, 2020 2:29 pm Post subject: |
|
|
The sample you tried probably uses a so called CDC driver.
But there are 2 things :
- programming the processor
- having serial com over the USB
the programming works a bit odd. i looked at it long time ago. when you switch to 1200 baud the board will see this as a reset.
but i also remember that different COM port numbers were created.
at the end i did not found it worth it to support it. it is way simpler/quicker to use a normal boot loader, or to use AVRDUDE.
then there is using the USB port for serial com. that is a question of using a CDC usb. the usb add on has a sample for that.
but remember that this processor also has a USART which you can use. you only need to connect it to a max232 leverl converter or usb-serial converter in order to use it.
i would only use this AVR processor for an USB device , not for 'normal' devices. _________________ Mark |
|
Back to top |
|
|
s17fox
Joined: 17 Apr 2008 Posts: 4
|
Posted: Sat Apr 11, 2020 11:02 pm Post subject: |
|
|
Dear Mr. Alberts,
Thank you for your immediate interest!
I would like to mention the following. |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5921 Location: Holland
|
Posted: Wed Apr 15, 2020 7:29 pm Post subject: |
|
|
BASCOM-AVR was made to support AVR processors. It was not made to support arduino hardware. Of course since arduino has a lot of cheap china hardware it is obvious to use it since it also has an AVR processor. But while BASCOM solves the boot loading the same for all processors using the MCS Boot loader, arduino uses a lot of different methods.
And even for some boards there are variants.
We have no intention to support all that. But as mentioned before, you can use AVRDUDE. In fact arduino calls avrdude.
Older arduino use stk500 v1 protocol, later version use the stk500 v2 or an older AN 910 variant. Some times a reset it performed by changing to a low baud. and some boot loaders use multiple virtual COM ports.
with the introduction of the USB capable AVR, atmel also included a boot loader using USB. The software is FLIP. bascom supports FLIP but it depends on the files of the installation of FLIP.
So FLIP must be working before bascom can use this method.
Then there is the way the FLIP boot loader works : it must be triggered by a reset using HWB pin. you keep HWB low, press reset, release reset, then release HWB.
this will put the chip into DFU mode where you can use FLIP/bascom to program the chip.
After a reset, the chip then runs the normal code.
In windows device manager you can see the mode.
This works well and we used it a lot in custom projects.
arduino might have a different loader programmed for whatever reason. i really do not know. i do not have that leonardo board. so i do not know if they use the atmel/microchip FLIP boot loader, or that they altered it with a custom boot loader.
i do not see a button for HWB. so it can be the case that they altered it in order not to use HWB pin.
And then there is the usage of the USB port. The M32U4 has a USART for normal serial com as you were used too. But it also has the USB interface.
The USB interface can be used to make an USB device. For example a key board or a mouse.
Or you can make a CDC which emulates a COM port. When you use an FTDI chip to get a serial port they are also a CDC device, creating a virtual COM port.
The USB Add on has a CDC example which shows how to send/receive data to the USB.
arduino will have similar code when using the USB port. Or they combined a CDC virtual com with a boot loader. _________________ Mark |
|
Back to top |
|
|
|