Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

UPDI
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 971

poland.gif
PostPosted: Tue Sep 20, 2022 5:45 pm    Post subject: Reply with quote

Hello. For some reasons MSC UPDI don`t want work for me. I was try 4K7, 2K7 and 1K resistors with FT232RL and CH340. Different baud form 115200 and even Latency 2 in FTDI driver...
I will be trying but for now I want to fast download my code under development for AVR128DB32.
I have SNAP probgrammer and it connect into my uC normally. So I spent some time to learn how to use it from command line. So now I can share the parameters needed for use it with Bascom External Programmer.

Program names "ipecmd.exe" so in Bascom field "Program" I type : C:\Program Files\Microchip\MPLABX\v6.00\mplab_platform\mplab_ipe\ipecmd.exe

Parameters are "TP" for ToolProgrammer so it is "-TPSNAP", uC is called "Part" so "-PAVR128DB32", flash uC is "-F" so in Bascom "-F{FILE}" and you must add "-M" it means memory and if not specified something specific then entire uC will be programmed.
So whole "magic parameter" is :" -TPSNAP -PAVR128DB32 -F{FILE} -M"

It works.
PS. I will be trying to connect with MCS UPDI. If someone have some idea to test then I wilingly try.





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

Administrator



Joined: 09 Apr 2004
Posts: 5922
Location: Holland

blank.gif
PostPosted: Tue Sep 20, 2022 6:51 pm    Post subject: Reply with quote

i assume you got the version from the SLA right?
i use 1K resistor and made a number of program adapters now. they all work perfect.
I use cp2102 based virtual COM adapters. maybe that is the difference. it should not matter. i also made a max232 based variant.
the baud should be 115200 or 22500. but the DA and DB also support way higher 1600000 which i use.
i used 5V and 3V3. i have no idea why it would not work for you.
the options for DTR pin and RTS pin you can set to anything when you do not use them.
i do not have time to lookup ftdi adapter but i really doubt if that would matter.

you use the adapter exclusive for the updi? or did you add a mux or something?

_________________
Mark
Back to top
View user's profile Visit poster's website
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 971

poland.gif
PostPosted: Tue Sep 20, 2022 6:58 pm    Post subject: Reply with quote

Yes. SLA version 2085.005 but downloaded after announce about 2085/6
FTDI is used only for UPDI without any addons. "Resistor bare version" Very Happy
I will be keep on trying.
Someday I have PL2003 but not anymore. Maybe I search my drawer for CP adapter Very Happy
There must be small detail...

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

Bascom Expert



Joined: 26 Mar 2014
Posts: 971

poland.gif
PostPosted: Tue Sep 20, 2022 10:44 pm    Post subject: Reply with quote

Success! Very Happy
I have some diagnostics equipment/interfaces for cars so I know some tweaks for FTDI and other converters.
Now I reduce the buffers for this FT232RL and everything work like a charm Wink
I made screens for others.



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

Administrator



Joined: 09 Apr 2004
Posts: 5922
Location: Holland

blank.gif
PostPosted: Wed Sep 21, 2022 7:01 pm    Post subject: Reply with quote

good finding ! i will add this to the help for those that use the FT232.
_________________
Mark
Back to top
View user's profile Visit poster's website
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 971

poland.gif
PostPosted: Wed Sep 21, 2022 9:01 pm    Post subject: Reply with quote

Sience AVR128DB32 Reset pin is not active by default is there a chance that "Reset micro SHIFT+F4" from Bascom IDE can be implemented into MCS UPDI?
I saw in the logs that this is happen so only SHIFT+F4 should be connected (I think but may be wrong) Very Happy
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5922
Location: Holland

blank.gif
PostPosted: Fri Sep 23, 2022 8:39 pm    Post subject: Reply with quote

i can add but ...
there are 2 options, one the quickest is the actual reset on the processor pin using the dtr or rts when that option is set.
the disadvantage is that you need to program the pin since it is not by default in reset mode

and there is the option to use the updi protocol to reset the chip.

_________________
Mark
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5922
Location: Holland

blank.gif
PostPosted: Tue Sep 27, 2022 8:42 am    Post subject: Reply with quote

added but not tested yet
but as i work on a big project with 64da64 i will test it for sure

_________________
Mark
Back to top
View user's profile Visit poster's website
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 971

poland.gif
PostPosted: Tue Sep 27, 2022 4:50 pm    Post subject: Reply with quote

My secret private project Very Happy -> https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=15062&start=0&postdays=0&postorder=asc&highlight=
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5922
Location: Holland

blank.gif
PostPosted: Wed Sep 28, 2022 10:12 am    Post subject: Reply with quote

i uploaded a new beta to SLA. it has the requested feature but it is not tested yet.
the simulator COM support was added and tested.
and so are interrupts which did not work properly either for xtiny.
the help is not updated. this is the reason the release is not public yet.

super nice project! i will comment to that later Smile

_________________
Mark
Back to top
View user's profile Visit poster's website
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 971

poland.gif
PostPosted: Wed Sep 28, 2022 5:39 pm    Post subject: Reply with quote

With my AVR128DB32 Reset over UPDI works perfectly Wink
Button and shortcut SHIFT+F4 tested!
I can use PF6 (TQFP32) as I/O

Thanks Wink
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5922
Location: Holland

blank.gif
PostPosted: Sat Oct 08, 2022 10:28 am    Post subject: Reply with quote

yes works for me too. good indeed to have this working.
i also understand the advantage now.

_________________
Mark
Back to top
View user's profile Visit poster's website
monkye

Bascom Member



Joined: 17 Dec 2010
Posts: 1

germany.gif
PostPosted: Mon Nov 27, 2023 4:09 pm    Post subject: Reply with quote

albertsm wrote:
another update for the updi programmer. get it from the SLA area. it fix a problem where the updi interface was not properly reset.
this update performs very good at 1600000 baud.

there was no feedback about the 12 v pulse.
but the mliab-snap will be supported in either 2086 or 2087.

mod 25 may : by mistake i wrote R28 but must indeed be R48, just for readers that do not read all, i edited this post so the right resistor is shown.


On the Microchip site (https://onlinedocs.microchip.com/pr/GUID-B8A8AF65-98E6-4501-ADBD-81945BD4B42F-en-US-4/index.html?GUID-26A0D98B-232C-4628-8E4B-59DDD2376102) I‘ve understood, the 12V pulse must injected after POR. IMHO would it be better to:
1. Switch on the power of XTiny
2. after 1ms inject the 12V pulse to UPDI/RESET Pin
3. and 100…500 microseconds later starts the programmer

But how can I synchronize the POR before the 12V pulse starts?


Sorry for my bad English

Uwe
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Goto page Previous  1, 2, 3
Page 3 of 3

 
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