Page 1 of 1

Serial port issues & Arduino pro 3.3v

Posted: Sat Mar 06, 2021 5:43 pm
by mnfisher
So - this is probably related to other issues - but couldn't find the topic :-( If one of the other VCs wants to move this across then please do...

I tried to program an Arduino Pro (maybe it's a mini?) 3.3v. This doesn't have a USB port and programming is via a FTDI convertor.

Anyway - using the Pro mini 3.3v seems to use 19200 baud and 168processor - so no joy. Swapped to Pro 3.3v (328) and tried again - here I got the dreaded 'can't open COM6' error (which has been mentioned before - can't open //./com6)

I copied the command line and tried to find where the problem lies. (Using a simple 1s flasher as an example)
"C:\Program Files (x86)\Flowcode\Common\Compilers\avr\bin\avrdude.exe" -p m328 -P com6 -b 57600 -c arduino -D -U flash:w:"flash.hex"
- is where the problem lies.

There are two issues here
1) need -p m328p (not m328) - a fcdx problem? The clock is also force to 16MHz - where the 3.3v version is 8MHz
2) The serial port issue - this fails with 'cannot open serial port //./com6' - however - simply removing the space before com6
-PCOM6
works perfectly. Adding the space back - stops it working.

However - I'm not sure why, since AVRDUDE should ignore the space. - but the two changes make programming reliable in this case. Would it be possible to do a test to one of the fcdx files / one of the batch files to see if this fixes the problem.

As mentioned above - someone else had reported this (couldn't open com4) ...

Martin

Re: Serial port issues & Arduino pro 3.3v

Posted: Sat Mar 06, 2021 9:42 pm
by LeighM
Very interesting.
We'll pick this up on Monday

Re: Serial port issues & Arduino pro 3.3v

Posted: Sat Mar 06, 2021 10:30 pm
by mnfisher
It's strange - I modified: avrc_arduinoA.bat -
:ProgFlash
@SET AVRDUDEcmd="%~dp0..\bin\avrdude.exe" -p m328p -P%ComPort% -b %BaudRate% -c %2 -D -U flash:w:"%FileName%"
@SHIFT
@GOTO Send

:Config
@SET AVRDUDEcmd="%~dp0..\bin\avrdude.exe" -p m328p -P%ComPort% -b %BaudRate% -c %2 -u
So I'm forcing a m328p MCU (which obviously isn't great) and getting rid of the space after -P (it was -P %ComPort%).. This works well - allowing upload from within Flowcode 8-) (tested in v8 - but the problem persists in v9 so hopefully the same fix should work...)

I looked at modding one of the fcdx files - but there is one mighty CRC at the start of the file, I'm worried that I'll break something...

Martin

Re: Serial port issues & Arduino pro 3.3v

Posted: Sun Mar 07, 2021 8:26 am
by LeighM
Thanks Martin
Modding an FCD won't break anything.
Flowcode just uses the checksum to mark the file as non genuine