Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Arduino proMicro connection problems

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-ARDUINO
View previous topic :: View next topic  
Author Message
s17fox

Bascom Member



Joined: 17 Apr 2008
Posts: 4

greece.gif
PostPosted: Sun Apr 05, 2020 5:16 pm    Post subject: Arduino proMicro connection problems Reply with quote

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
View user's profile
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 971

poland.gif
PostPosted: Mon Apr 06, 2020 7:16 am    Post subject: Reply with quote

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
View user's profile Visit poster's website
s17fox

Bascom Member



Joined: 17 Apr 2008
Posts: 4

greece.gif
PostPosted: Tue Apr 07, 2020 5:13 pm    Post subject: SOLUTIONS Reply with quote

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
View user's profile
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 971

poland.gif
PostPosted: Wed Apr 08, 2020 7:45 am    Post subject: Reply with quote

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 Very Happy

Simply in Bascom you have more control and must/or not add support for USB.

Back to top
View user's profile Visit poster's website
s17fox

Bascom Member



Joined: 17 Apr 2008
Posts: 4

greece.gif
PostPosted: Wed Apr 08, 2020 10:59 am    Post subject: Reply with quote

I always live to learn!!! (Socrates)
I have just bought it.
I’ll write news when I get it.
Thanks
George
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Wed Apr 08, 2020 2:29 pm    Post subject: Reply with quote

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
View user's profile Visit poster's website
s17fox

Bascom Member



Joined: 17 Apr 2008
Posts: 4

greece.gif
PostPosted: Sat Apr 11, 2020 11:02 pm    Post subject: Reply with quote

Dear Mr. Alberts,
Thank you for your immediate interest!
I would like to mention the following.
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Wed Apr 15, 2020 7:29 pm    Post subject: Reply with quote

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
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-ARDUINO All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum