Bandswitch Transmit Lockout

 


Sometimes computer control makes things TOO easy.  With my automated station running 7 instances of PowerSDR controlling 7 different radios and with bandswitching occurring automatically when I switch from one GUI to the next, it is too easy to switch bands while transmitting, or to start transmitting as one is switching bands, when one is in the midst of a busy contest.  In order to prevent bandswitching while transmitting or initiation of the transmit sequence while bandswitching is occurring, I made a Bandswitch-Transmit Lockout device that prevents such hot-switching. 

Once again, I used a Parallax Propeller.  I used PS2504-5 optoisolators on both input and output.  Rather than use the PTT inputs from the footswitches for the PTT controls for this project, I used the PTT outputs from each of the 7 radios.  I made this choice so that the lockout would be effective even if I actuated the transmit cycle 'in software' from one of the PowerSDR GUIs.   The device is capable of handling up to 8 separate PTT inputs [all 'ground to activate PTT'] and Pins 2,7,8,9, and 15 from the computer's LPT port [these control bandswitching].  Outputs are up to 8 PTT outputs which go to sequencers for each band, and Bandswitching signals that correspond to pins 2,7,8,9, and 15 from the computer's LPT port that go to the N3FTI bandswitch except under appropriate 'lockout' conditions.

The device consists of the Propeller Proto Board USB and two custom boards that I had made at  ExpressPCB using their MiniBoard service.  One board receives and controls the PTT signals [PTT Control Board], and the other board receives and controls the LPT Bandswitch signals [Bandswitch Control Board].  Bmp schematic and ExpressPCB .sch and .pcb files for the PTT Control Board are here.  Bmp schematic and ExpressPCB .sch and .pcb files for the Bandswitch Control Board are here. 

The code is listed below, and also in this hyperlink.  The .spin file is here.

The code is written for up to 7 PTT lines and would need to be modified very slightly to use all 8 included in the hardware.

{{ LPTLockOut.spin

BandSwitch Lockout by W3SZ June 18, 2010

Takes arbitrary 4-bit LPT input and outputs 4-bit code to match standard of N3FTI, PackRats Logging Interface Board

Will not bandswitch if any of 7 PTT lines is activated

Will not activate PTT if bandswitch is occurring

Receives Bandswitch signals from Writelog via INA[3..0]

Sends Bandswitch signals out via OUTA[11..14]

Receives PTT signals from SDRs via INA[10..4]

Sends PTT signals out via OUTA[15..25]

' The input signal matrix is as follows:

' Band A B C D

' 50 0 0 0 0

' 144 1 0 0 0

' 222 0 1 0 0

' 432 1 1 0 0

' 903 0 0 1 0

' 1296 1 0 1 0

' 2304 0 1 1 0

' 3456 1 1 1 0

' 5760 0 0 0 1

' 10G 1 0 0 1

' 24G 0 1 0 1

' 47G 1 1 0 1

'

' A = LPT pin 2 Least Significant

' B = LPT pin 7

' C = LPT pin 8

' D = LPT pin 9 Most Significant

' Grnd = LPT pin 15

' The output signal matrix is as follows:

' Band A B C D

' 50 0 0 0 0

' 144 1 0 0 0

' 222 0 1 0 0

' 432 1 1 0 0

' 903 0 0 1 0

' 1296 1 0 1 0

' 2304 0 1 1 0

' 3456 1 1 1 0

' 5760 0 0 0 1

' 10G 1 0 0 1

' 24G 0 1 0 1

' 47G 1 1 0 1

'

' A = LPT pin 2 Least Significant

' B = LPT pin 7

' C = LPT pin 8

' D = LPT pin 9 Most Significant

' Grnd = LPT pin 15

LPT Pin 2 connects to Pin 0

LPT Pin 7 connects to Pin 1

LPT Pin 8 connects to Pin 2

LPT Pin 9 connects to Pin 3

Pin 11 connects to LPT Pin 2 out

Pin 12 connects to LPT Pin 7 out

Pin 13 connects to LPT Pin 8 out

Pin 14 connects to LPT Pin 9 out

The 74LS75 Latch can go on either input or output

}}

 

CON 'set the clock constants

_clkmode = xtal1 + pll16x

_xinfreq = 5_000_000

OBJ 'include at least the Conduit Object

vp:"Conduit"

VAR

long temp[4],freq,oldfreq,stack[22],PTT,tempPTT[7]

 

PUB Main

vp.share(@temp,@tempPTT)

cognew(toggle(5_000_000), @stack)

convlpt

PUB toggle(Delay)

' dira[16]~~

' repeat

' !outa[16]

' waitcnt(Delay + cnt)

PUB convlpt

dira[11..21]~~

dira[0..10]~

repeat

temp:=INA[3..0]

tempPTT:=INA[10..4]

PTT := tempPTT[0] + (2*tempPTT[1]) + (4*tempPTT[2]) + (8*tempPTT[3]) + (16*tempPTT[4]) + (32*tempPTT[5]) + (64*tempPTT[6])

freq := temp[0] + (2*temp[1]) + (4*temp[2]) + (8*temp[3])

if freq == oldfreq

case PTT

'

0: P0

1: P1

2: P2

4: P3

8: P4

16: P5

32: P6

64: P7

' OTHER: P0

case freq

'

0: F50

1: F144

2: F222

3: F432

4: F903

5: F1296

6: F2304

7: F3456

8: F5760

9: F10G

10: F24G

11: F47G

12: F75G

13: F120G

14: F142G

15: F241G

OTHER: F50

elseif PTT == 0

oldfreq:=freq

case freq

'

0: F50a

1: F144a

2: F222a

3: F432a

4: F903a

5: F1296a

6: F2304a

7: F3456a

8: F5760a

9: F10Ga

10: F24Ga

11: F47Ga

12: F75Ga

13: F120Ga

14: F142Ga

15: F241Ga

OTHER: F50a

else

PTT:= 0

outA[15..21]:= %0000000

PUB F50

outA[11..14]:= %0000

PUB F144

outA[11..14]:= %1000

PUB F222

outA[11..14]:= %0100

PUB F432

outA[11..14]:= %1100

PUB F903

outA[11..14]:= %0010

PUB F1296

outA[11..14]:= %1010

PUB F2304

outA[11..14]:= %0110

PUB F3456

outA[11..14]:= %1110

PUB F5760

outA[11..14]:= %0001

PUB F10G

outA[11..14]:= %1001

PUB F24G

outA[11..14]:= %0101

PUB F47G

outA[11..14]:= %0110

PUB F75G

outA[11..14]:= %0111

PUB F120G

outA[11..14]:= %1000

PUB F142G

outA[11..14]:= %1001

PUB F241G

outA[11..14]:= %1010

PUB F50a

outA[11..14]:= %0000

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F144a

outA[11..14]:= %1000

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F222a

outA[11..14]:= %0100

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F432a

outA[11..14]:= %1100

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F903a

outA[11..14]:= %0010

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F1296a

outA[11..14]:= %1010

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F2304a

outA[11..14]:= %0110

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F3456a

outA[11..14]:= %1110

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F5760a

outA[11..14]:= %0001

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F10Ga

outA[11..14]:= %1001

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F24Ga

outA[11..14]:= %0101

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F47Ga

outA[11..14]:= %0110

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F75Ga

outA[11..14]:= %0111

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F120Ga

outA[11..14]:= %1000

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F142Ga

outA[11..14]:= %1001

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB F241Ga

outA[11..14]:= %1010

oldfreq := freq

waitcnt(150_500_000 + cnt)

PTT:=0

outA[15..21]:= %0000000

PUB P0

outA[15..21]:= %0000000

PUB P1

outA[15..21]:= %1000000

PUB P2

outA[15..21]:= %0100000

PUB P3

outA[15..21]:= %0010000

PUB P4

outA[15..21]:= %0001000

PUB P5

outA[15..21]:= %0000100

PUB P6

outA[15..21]:= %0000010

PUB P7

outA[15..21]:= %0000001

The code is compiled using the free Propeller Tool software by Parallax.

Copyright 1997-2010 COPYRIGHT Roger Rehr W3SZ. All Rights Reserved

Brought to you by the folks at W3SZ