View previous topic :: View next topic |
Author |
Message |
Netzman
Joined: 25 Nov 2005 Posts: 131 Location: Graz
|
Posted: Sat Apr 30, 2022 10:26 pm Post subject: |
|
|
something like this (discrete boost converter)?
_________________ LCD Menu | Proportional Fonts |
|
Back to top |
|
|
enniom
Joined: 20 Oct 2009 Posts: 537
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Mon May 02, 2022 4:53 pm Post subject: |
|
|
the discrete one is simple to make. not depending on specific chips. but that is personal. for some product i was looking for 12v generation for OLED. And that was a problem since all the usual chips are hard to get.
Or have way too much power or are too expensive.
for the circuit i can use a transistor or opto coupler to enable 12V. But i wonder how to protect the tx/rx pins. they probably do not like the 12V. normaly i would use a tranzil but that will absorb the 12V too.
relay will work but i do not like them.
So we have USB-serial converter with TX/RX on ttl level. the resistor goes from TX to RX. And this means that RX is connected direct to the UPDI. So a 12V pulse will go right into the RX pin and also via the resistor into TX. _________________ Mark |
|
Back to top |
|
|
plouf
Joined: 19 Jan 2012 Posts: 78 Location: Athens,Greece
|
Posted: Mon May 02, 2022 7:34 pm Post subject: |
|
|
But why a mosfet ,which act a switch to have problem ?
Anyway a practical and cheap is cd4050 buffer (for digital signaling) or cd4066 as analog switches
Cheap and easily available...
Offcourse pc817 opto transisotr are cheap too . But cd. Solution is four in one package. _________________ Christos |
|
Back to top |
|
|
Netzman
Joined: 25 Nov 2005 Posts: 131 Location: Graz
|
Posted: Mon May 02, 2022 8:43 pm Post subject: |
|
|
imho a simple current protection should do the job:
Code: | +12V pulse
------------------------------------+
|
|
TX +-----+ +-----+ | UPDI
---------+ 10K +----+----+ 1K +----+--------
+-----+ | +-----+
|
RX |
--------------------+ |
depending on the sink/source capabilities of the I/Os and if they are equipped with an internal ESD protection diode, most are (ex. AVRs have 20mA sink/source and protection diodes, FTDI232R@5V has 2 mA and protection diodes)
btw, I've found this: https://www.avrfreaks.net/comment/2616176#comment-2616176
br _________________ LCD Menu | Proportional Fonts |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Tue May 03, 2022 8:27 am Post subject: |
|
|
i like 4066 which i used before.
the simple current limit is simpler. nowadays i can imagine all chips have some protection. but since it is connected to the usb and thus my PC, i do not want to take risks.
i implemented the following :
in options you can select for DTR and RTS pin the following behavior :
NONE
program/data
HV program
none will do nothing
program/data will work as it works now for DTR : it will set DTR during programming so you can use DTR to switch between data and programming
HV program will create the pulse
of course you need to connect a circuit.
i do not know yet how i can check if this is working. _________________ Mark |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Wed May 04, 2022 8:33 am Post subject: |
|
|
ok, i also had a new look at the programming speed. previous attempts and communication with microchip support did not lead to a fix.
but after yet a lot of tries, it now works at higher baud rates.
not all updi processors have a high clock but DA/DB series have a 32 Mhz clock with max 1.6 MBps.
That makes a difference !
The only odd thing : when i read 128 KB it goes very fast.
The programming is however still relatively slow. ok there is more overhead for the programming, but still it seems odd.
to send data, the software sends a byte, then checks the returning data (since tx/rx are connected all data you sent you receive as well) and ack is checked.
for receiving chucks you can use a pointer and you get data back, that works well. but when sending chunks it does not work. the updi get confused somehow.
i tried smaller package size and while it appeared to work, but it did not for a larger file.
for now i settle at packet size of 2, and will check later. _________________ Mark |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Wed May 04, 2022 12:37 pm Post subject: |
|
|
i uploaded a test version to the SLA section. if you have access, you can test it.
write speed turns out to be a problem of the usb-serial driver. some chip might suffer more than others.
ft232 has a setting for latency which should be set to 1mS when it is higher. otherwise ft232 will not work.
ok, that is about it. a better way is to use hardware like a processor. normally i would create one with bascom but as there are cheap programmers available it is better so allocate resources to implementation of those. _________________ Mark |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Tue May 10, 2022 9:30 am Post subject: |
|
|
i uploaded a new version since there was a problem with DA processors.
turned out that DB and DA series have the family ID right and left aligned. 'AVR ' vs ' AVR'
tested with real DA processor. works perfect and programming is very fast. at least compared to the older version of the programmer. _________________ Mark |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Sun May 22, 2022 1:35 pm Post subject: |
|
|
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.
came a long way with this.
notice that this snap programmer is great but requires r48 to be removed and it need a firmware update.
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. _________________ Mark
Last edited by albertsm on Tue May 24, 2022 8:20 am; edited 1 time in total |
|
Back to top |
|
|
JC
Joined: 15 Dec 2007 Posts: 586 Location: Cleveland, OH
|
Posted: Mon May 23, 2022 3:12 pm Post subject: |
|
|
Hi Mark,
Thank you for all of your continued work on this!
Also, I'm looking forward to the SNAP programmer support.
I will no longer have to load Studio just to use this programmer!
Jay |
|
Back to top |
|
|
enniom
Joined: 20 Oct 2009 Posts: 537
|
Posted: Mon May 23, 2022 10:27 pm Post subject: |
|
|
Mark,
the Microchip information seems to show that R48 (not 28) is removed in the SNAP programmer?
E |
|
Back to top |
|
|
enniom
Joined: 20 Oct 2009 Posts: 537
|
Posted: Mon May 23, 2022 10:29 pm Post subject: |
|
|
Thanks Netzman for updating the circuit diagram.
The first one had an error for transistors Q1 and Q3?
E |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Tue May 24, 2022 8:32 am Post subject: |
|
|
EDC, i tried to install with absolute minimum files. So first i only installed the required drivers. That made the programmer work for windows (device working correct)
But i did not want to install all the files so i tried your method too. it recognized the programmer but i could not get it to work with UPDI.
Then it turned out i had to create an AVR project which required to install the total package , and only then it would do an update of the firmware.
I performed this on a VM.
Your post suggest a simpler way but i could not get that to work. So it was kind of complicated to get it to work (when you do not want to install mlab-X)
I will test this later again with a different unit on a new PC. Could be the unit.
Maybe you already had mlab-X installed?
I hope that new snap users can share their experience here. _________________ Mark |
|
Back to top |
|
|
|