TTL programming cable
TTL programming cable
I bought one of these
http://www.coolcomponents.co.uk/catalog ... cts_id=356
thinking it would be useful for programming devices in the field at TTL level such as my 328 projects, but I see from the pinouts there is no DTR, so is this going to work ?
thanks
http://www.coolcomponents.co.uk/catalog ... cts_id=356
thinking it would be useful for programming devices in the field at TTL level such as my 328 projects, but I see from the pinouts there is no DTR, so is this going to work ?
thanks
Re: TTL programming cable
Since there is no DTR signal, it will not work for the "normal" downloading mode. It will, however, work with the DTR-less downloading method that uses a special "ATN character" to get the ZX into command mode.FFMan wrote:I see from the pinouts there is no DTR, so is this going to work ?
- Don Kinzer
Yes. The ZX needs to be configured to recognize the same "ATN character" that is designated in the IDE. An upcoming release of the compiler supports a new, simpler way to set the ATN character in the ZX. For compiler versions prior to v3.0.3, however, you have to do it the "hard way" as illustrated in the example code below.FFMan wrote:[A]re there other changes to make ?
Code: Select all
Dim atnChar as Persistent Byte Based &H13
Sub Main()
atnChar = &H04
' other program code here
End Sub
Note, also, that Persistent Memory address &H13 will retain the value you've set it to even if you comment out the assignment line shown above and download the compiled program again. This means that to disable the ATN Char method you must download a program that explicitly sets Persistent Memory location &H13 to a value greater than 31 (&H1f), preferably &Hff.
It is important to be aware that when the ATN Char is set to a value in the range &H00 to &H1f, the ZX will respond to receipt of that byte value on Com1 by going to ZX command mode even if it wasn't the IDE/downloader that sent it. This means that you must choose the ATN character carefully in order to avoid values that might be sent by some external device connected to Com1.
- Don Kinzer
Yes. The DTR/ATN method is always enabled. The ATN Character method is just added to that when the Persistent Memory location is set to a value in the range &H00 to &H1f.FFMan wrote:If i enable ATN chr mode does the 'normal' method still function i.e. is this method available in addition ?
- Don Kinzer
TTL programming cable
> ... ATN Character [] Persistent Memory location is set to a value in
the range &H00 to &H1f...
Should that read &H01 to &H1f ? Is zero a valid ATN character?
the range &H00 to &H1f...
Should that read &H01 to &H1f ? Is zero a valid ATN character?
Tom
Re: TTL programming cable
Yes, it is. You'll notice that the "spin control" for the ATN character on the Options | Serial Port Options... dialog allows you to adjust the value from 0 through 31.GTBecker wrote:Is zero a valid ATN character?
- Don Kinzer
TTL programming cable
> ... 0 through 31...
Well. I've been setting it to zero thinking I was disabling the
ATN_Char OS capture. I'll bet this solves a puzzling bug.
To disable the COM1 ATN OS capture, then, persistent &H13 needs to be
anything but 0-31? FF?
Tom
Well. I've been setting it to zero thinking I was disabling the
ATN_Char OS capture. I'll bet this solves a puzzling bug.
To disable the COM1 ATN OS capture, then, persistent &H13 needs to be
anything but 0-31? FF?
Tom
Tom
Re: TTL programming cable
The value &HFF is the recommended "Off" state but anything above &H1f (31 decimal) will have the same effect.GTBecker wrote:To disable the COM1 ATN OS capture, then, persistent &H13 needs to be anything but 0-31? FF?
This was alluded to in a thread a while back. See the ninth entry at:
http://www.zbasic.net/forum/about649.html
- Don Kinzer