Sorry to touch this area again, but...
This new computer of mine refuses to ID the ZX24a via the ethernet to serial bridge. The older computer was intermittent - some days OK, some not, for no good reason I could find.
So with this new one (the native serial port works fine), and the ethernet bridge, I did some testing by adding status displays to the ZLoad DLL source that you provided. In reading that source, I'm confused a bit and maybe you can explain...
The code in atn() multiplies period * duty, but duty is an integer rather than fraction less than one (e.g., 1 to 100%). The default period is 10mSec and the default duty is 1.
In another post here on this topic, I understood that DTR must toggle 3 or more times, where 20mSec <= period <= 50mSec (vs. the 10mSec I noted above). I also see that the IDE allows one to set the period < 20mSec. The duty cycle seems largely irrelevant because of the capacitor coupling to create a pulse, but duty cycle may be important to certain devices like ethernet bridges, so the default in the IDE might best be 50% or so.
Maybe a scope photo or two?
In addition to fiddling with wrote a visual basic 6 program that toggles DTR using the Windows functions
Code: Select all
Declare Function QueryPerformanceCounter Lib "kernel32.dll" (ByRef lpPerformanceCount As Currency) As Boolean
Declare Function QueryPerformanceFrequency Lib "kernel32.dll" (ByRef lpPerformanceFrequency As Currency) As Boolean
I wish there were a better or alternate way to force a download than this rather precarious DTR toggling scheme. At least, the AVR side IMO should be far less stringent about timing. And it would be good to allow use of RTS instead of DTR since not all devices implement DTR.