Shop OBEX P1 Docs P2 Docs Learn Events
Cut ATN Line — Parallax Forums

Cut ATN Line

ArchiverArchiver Posts: 46,084
edited 2001-03-26 15:10 in General Discussion
On 26 Mar 01 at 11:44, the_coin_guy@y... wrote:

> Is there a quick way to cut the ATN line after programming so that
> hyperterminal can be used to read incoming info?

Corey-

Here's a 1997 message to the Stamp list from Beau Schwabe that I
saved. Looks like you want technique #2.

Steve


...The problem is with the ATN line on the StampII or DTR line
from the PC. There are THREE ways that I know of to work
around this problem either through software or hardware.

Manual Hardware Switch Method:

Stamp Side PC-Side (9-Pin connector)

Sout >
> RX(2)
Sin >
> TX(3)
ATN >---o----[noparse][[/noparse]SWITCH]
> DTR(4)
|
o--/\/\--o
4.7K |
GND >
o
> GND(5)


SWITCH - RUN(open) / PROGRAM(closed)



Automatic Hardware Switch Method: (Thanks Jeff Martin)

Stamp Side PC-Side (9-Pin connector)

Sout >
> RX(2)
Sin >
> TX(3)
ATN >---o--||
> DTR(4)
| C1
o--||--o
C2 |
GND >
o
> GND(5)


C1 & C2 = .1uF



Software Switch Method:

Stamp Side PC-Side (9-Pin connector)

Sout >
> RX(2)
Sin >
> TX(3)
ATN >
> DTR(4)
GND >
> GND(5)

Software Example for the StampII to "Send Info"
MainLoop:
DEBUG "The StampII is ALIVE!!!",cr
goto MainLoop


Software Example in QuickBasic to "switch" the DTR line:
CLS
OPEN "com1:9600,n,8,1,CD,CS" FOR RANDOM AS #1
COMaddress = &H3F8 'COM1 address location

DTR = 0 '0=OFF ; 1=ON
Value = (INP(COMaddress + 4) AND 254) + DTR
OUT COMaddress + 4, Value

WHILE 1
Data$ = INPUT$(LOC(1), #1)
PRINT Data$;
WEND

Comments

Sign In or Register to comment.