[hpsdr] Penelope PTT
Gerd Loch
g.loch at nt-electronics.de
Mon Aug 18 08:08:35 PDT 2008
Hi Phil,
I have interrupts in the usb datastream (audio is popping) for whatever
reason.
I found that these interrupts in the usb-datastream (fifo empty) lead to a
condition where HAVE_SYNC is 0. As PTT_OUT directly depends on HAVE_SYNC the
ptt-relais is switched off for some milliseconds. It can be avoided by
delaying the ptt switch off not before HAVE_SYNC is 0 longer than xx sec.
In my new version PTT_OUT is switching off 1,4 sec after i.e. you disconnect
the usb cable. My ptt-relais is now steady.
Here the code:
assign have_sync = (got_sync && (Rx_used > 3)) ? 1'b1 : 1'b0;
reg have_sync_relais;
reg [26:0] valid_count; // there will be a delay of 1,4s
always @ (posedge IFCLK) begin
if (!have_sync)
begin
if(!valid_count[26])
begin
valid_count <= valid_count + 26'b1;
end
else
begin
have_sync_relais <=0;
end
end
else //hat sync
begin
have_sync_relais <=1;
valid_count <= 26'b0;
end
end
and later in Code:
assign PTT_out = (Rx_control_0[0] && have_sync_relais) ? 1'b1 : 1'b0; //
inhibit PTT if no sync
73, Gerd
DJ8AY
1219072115.0
More information about the Hpsdr
mailing list