Softrock_Auto_BPF-LPF

Back in 2012 David, 2E0DPQ (now M0WID) released v 16.01 his modification of the PE0FKO AVR code for the Softrock. This, written for the ATTiny861 and a RXTX enabled four of that chip's pins to output a signal for each of the Softrock's four BPF ranges while maintaining the PTT and CW function.
Later v 16.02 used these four pins to output in BCD giving 16 possible ranges. The switching frequencies on both versions are all configurable using CFGSR.

This was unfortunately forgotten when several years later broadbanding the Softrock Ensemble was discussed. The subject was recently revived here the 16.02 hex is there as an attachment.
Here I present the basic steps, Dave suggests some switching arrangements but that's up to you.

At (Group membership required)  https://groups.yahoo.com/neo/groups/softrock40/files/M6DPW/AVR-FirmwareV16.02_ATTiny861.zip is Dave's v16.01/2 firmware for the ATTiny 861 to replace the ATTiny45/85 in Softrocks. This will give ABPF signals in the RXTX so band-specific switching may be made.
The source code is also with the firmware.

In that zip is the firmware Version 16.01  AVR-FirmwareV16.02_ATTiny861\old\ATTiny861 (The .hex file.)
Version 16.02 in the zip here AVR-FirmwareV16.02_ATTiny861\AVR-FirmwareV16.02_ATTiny861\Studio6\SI570\ATTiny861
At AVR-FirmwareV16.02_ATTiny861\AVR-FirmwareV16.02_ATTiny861\Studio6\SI570 is the text file main.c. This shows how Dave modified Fred's code to make the switching possible. In it are the fuse settings required for the ATTiny.
Fuse high byte:
0xdd = 1 1 0 1   1 1 0 1     RSTDISBL disabled (SPI programming can be done) [OR 4V3 Brownout?? 1101 1100  0xdc see bottom of page]
Fuse low byte:
0xe1 = 1 1 1 0   0 0 0 1   +------- CKSEL 3..0 (clock selection -> HF PLL)[16MHz]
The extended fuse is 0xff

Programming the ATTiny861 AVR Bob's page for beginners here was useful. The ATTiny 45/85 are fundamentally the same.

USBasp

I could not get my parallel programmer to recognise the ATTiny861 so tried my USBasp with my own makeshift connections. An example on eBay from UK, (This has the updated firmware) even cheaper direct from China.

For programming/testing I made up a simple board with a 20 DIL socket, makeshift connector for USBasp and 8 pin header.
Red/blue wires 5V/Gnd.
Red and blue wires 5V/Gnd 0V

UABasp pins to ATTiny861 pins 
 ASP  Pin
 Function Tiny861 Pin
 1 MOSI 1
 5 RST 10
 7 SCK 3
 9 MISO 2
 4, 6, 8, 10
 Ground 6, 16
The standard 10 pin ASP plug has a 5V feed on pin 2 and could be used to power the ATTiny when programming.

ATTiny861 pins to 8 DIL header pins as ATTiny45/85. Header for testing in an Ensemble. The same connections will be required for the finished product, the extra switching taken from the ATTiny861.


ATTiny pins to 5V power, only a few mA required.  -ve 6, 16.  +ve 5, 15.
Insert ATTiny, connect USBasp and 5V

Struggling with AvrDude helps you understand what is happening, KhazamaAVRProgrammer does make AvrDude easier to use with a USBasp programmer. http://www.khazama.com/project/programmer/ There is a link to the programmer hardware there, probably up to date. If, as I did you search Ebay for "USBasp" then you may see the warnings I describe below. Yes, Khazama's old but does the job. Otherwise AverDude is much more recent but is Command prompt. There is a good, big manual on line. http://www.nongnu.org/avrdude/
Another with a GUI is ExtremeBurner

With my USBasp AvrDude gave the warning "warning: cannot set sck period. please check for usbasp firmware update." and Khazama also.
It may be updated but I advise you not to try as I found others said on other pages "Ignore it". I ignored it and it has worked without a problem.

But notes about updating at the bottom of this page.
If you have an updated USBasp then this ISP CLK Speed setting is required


Khazama:- Select ATTiny861, Command - Fuses and....
First set the fuses as shown. They may be set by the mouse in the boxes at the bottom, the drop-downs show what is actually selected.
Fuse configuration, For 5V Softrock control I think this is best with the Brown-out at 4V3.
[The fuse settings are often specified as hex numbers. The boxes represent hex numbers. So above H-Fuse is 0xDC, L E1, E 01, Lock 03, See bottom of page for PonyProg settings]

 "Write All" [Not updated ASP ignore all Khazama's warnings and there are a lot!]
Then load the .hex file. Again warnings from non-updated USBasps.

Select the hex file then write:-

Note:- the .eep file does not need to be loaded or written.

Now if you have an Ensemble RX or RXTX the 8 pin header may be inserted the correct way round in the ATTiny 45/85 socket. Plug in the USB.

Dave mentioned this ATTiny was not always recognised. I found a problem too. The first ATTiny861 I programmed did not seem as if it would ever work. Then I inserted the 8 pin header in the wrong way round! When I noticed it had got very hot, when cooled down I put it in the correct way round and it was recognised, driver installed and was no trouble after that. DO NOT USE THIS "CURE".
The second one seemed the same, just would not be recognised. This time I noted that when unpowered there was a small residual voltage on the 5v line. I shorted that to ground briefly and then re-applied the USB. It worked and continues to be recognised!
This is very unscientific, a reason and cure needs to be found. The third chip I tried was the same, shorting the 5V line to ground (unpowered!) made it recognised.The 4th had no problem, I used a different brownout fuse setting but this is probably not related.
Since then I have had NO problem with recognition of the ATTinys I have programmed, this was only evident immediately after programming.


When recognised by Windows the driiver may be requested, if you have had a Softrock (or USBasp) tell Windows to automatically install it.
All my Softrocks are now identified as USBasps but that does not matter, the driver is the same.





The four ATTiny861 pins now give the frequency-dependent signals. Four for v16.01, an implemented total of 13 BCD combinations for v16.02.
These may be edited.

v16.01 Simple Switching, may be configured as required.

 CGGSR Filter No
 BandPin 20 PA0
 Pin 19 PA1
Pin 18 PA2
Pin 17 PA3
Frequency MHz
To MHz
 0 160m 1    03
 1 80-60m
  1   3 6
 2 40-30m   1  6 14
 3 20-10m    1 14>


v16.02 BCD Preset Switching, may be configured as required.
Hex output on the band pins, according to the following table:

 CFGSR filter No.
 BandPin 20 PA0
 Pin 19 PA1
Pin 18 PA2
Pin 17 PA3
Frequency  MHz
 To MHz
 0 160m 1 0 0 0 0 3
 1 80m 0 1 0 0 3 5
 2 60m 1 1 0 0 5 6
 3 40m 0 0 1 0 6 9
 4 30m 1 0 1 0 9 12
 5 20m 0 1 1 0 12 16
 6 17m 1 1 1 0 16 20
 7 15m 0 0 0 1 20 23
 8 12m 1 0 0 1 23 26
 9 10m 0 1 0 1 26 30
 10 6m 1 1 0 1 30 60
 11 4m 0 0 1 1 60 100
 12 2m 1 0 1 1 100 200
 13 17cm 0 1 1 1 200* 600
 14 23cm 1 1 1 1 600* >
 15  00
0
 0  
Unless the Si570 is set to "A" grade the higher frequency settings will not work. (and unless the Si570 is "A" grade it will not!) The * ones will not

//**                                          2        1    0    1    1        13        100-200MHz    12
//**                                          70cm    0    1    1    1        14        200-600MHz*    13        13*** Not implemented due to overflow
//**                                          23cm    1    1    1    1        15        >600MHz*        14, 15    *** Not implemented due to overflow
//**
//**                                  Frequency limits can be changed using CFGSR.

CFGSR (or HDSDR ExtIO):- Select the "RX freq", "Edit" type in the upper limit and "Save".
Start at the lowest range, edit entering the highest LO frequency for that range.
Note that the switch change points are at the Local Oscillator (centre) frequency. Do not make the switching points too close to the transmit band edges, otherwise it might be possible for the wrong LPF to be selected.
To enable PTT the "Enable Filter" box on the ABPF tab must NOT be ticked.


I installed v 16.02 in my LF Ensemble below, only 3 selections are required. Above shows my configuration of v 16.02 to use single outputs of the ATTiny861. Refer to the 16.02 chart above, bands 0,1,3 are used. (Band 2, pins 19, 20 high is briefly selected between 530-531KHz.)

Pin usage on the ATiny861:

 1// PB0 = spare   20// PA0 = Band range 0/BCD1
 2// PB1 = I2C SDA to Si570
  19// PA1 = Band range 1/BCD2
 3// PB2 = spare   18// PA2 = Band range 2/BCD4
 4// PB3 = I2C SCL to Si570   17// PA3 = Band range 3/BCD8
5  5V
  16 Gnd
6 Gnd
  15 5V
 7// PB4 = spare   14// PA4 = PTT to Softrock
 8// PB5 = USB +Data line   13// PA5 = CW from Softrock
 9// PB6 = USB -Data line   12// PA6 = Spare
 10// PB7 = !RESET   11// PA7 = Aux PTT Out for PA relay*
* Not implemented.

Thoughts.
The 4 outputs of v16.01 will not be sufficient to fully broadband a Softrock RXTX. The RX could have a ABPF like that that used with the v8/9 RX. But LPFs would be limited.
Using v 16.02 a chip like the 4028 BCD to Decimal decoder could give 10 (or 11 all off) separate switch signals.
QRP Labs do switched LPFs.http://qrp-labs.com/ultimatelpf.html   Also good BPFs for use with 16.02 many narrow ones, or could be reconfigured for wider bandwidth.. Can also be used with the switching boards. Or, maybe multiple FST3253s? Maybe you can find the automatic BPF board that was produced for earlier Softrocks.
QRP Labs also do a 5W amplifier or various mods in the Yahoo group, Ed GM3SBC comes to mind. https://groups.yahoo.com/neo/groups/softrock40/files/GM3SBC%20QRO%20Modifications/
Lots of discussions on broadbanding the RXTX in the Yahoo group. One https://groups.yahoo.com/neo/groups/softrock40/conversations/messages/84767
Note Roger, VE7VV's experiences with spurious emissions and his suggestion of another switched filter after the mixer. All modified equipment requires careful testing. Differing designs and construction techniques produce different problems.


MISC NOTES BELOW

I wrongly loaded Dave's .eep file........ NOT necessary!

Then error messages are given when CFGSR is started,  This will probably never be seen but it appears to mean a corrupt Eeprom that might be recovered by the steps below.

use the "Init" tab to set as a Softrock RXTX, again after "Default Init" is pressed Windows again might ask for a driver.

The Si570 tab's "Factory Default" was required before things looked good....but not before. Then everything worked correctly.
"Factory Default" enables the BPF, remove tick.


Below Dave's ATTiny861 mounted on a Softrock Ensemble. Programmed and tested before mounting permanently.

Pins13, 14, 16 single wires through ATTiny85 holes, other connections with coloured wires.

A 0.01uF SM decoupling 5V under the board. Pin 6 grounded with a wire through a hole drilled in the PCB, soldered under.
I am following Roger, VE7VV's multiband LF version of the Ensemble with switched 7 pole LPfs from QRPLabs and, possibly switched TX mixer LPFs.


My progressing copy of Roger's multiband LF Ensemble. Minimum LO ~55KHz. Note Roger and I have seen the PA stage oscillating at 35-65MHz. (One sign of this is a high TX standing current.) Roger's latest document should be read (refresh page) for up to date information.
BN73-302 used throughout, turns adjusted to suit.
ATTiny 869 switches the LPF relays directly. 160m plug in TX mixer LPF fitted.
The 7 pole LPFs are not enough to block reception of the x3 long and medium wave broadcast station on the two lower bands. Another 7 poles are so maybe I'll double up. (A work-round is to shift the LO slightly, an image moves away.) This is work in progress, also the LPF TX harmonic rejection although I consider it adequate does not seem as good as it should be.


I used the QRP Labs switched filter board but found it was not too easy to swap the switching polarity. The relays have integral diodes. I think the best way would be to mount the relays under the board, that would reverse the integral diodes position on the board...
Yes, for positive activation reverse the diodes, reverse the relays. Ground the +5V pin and feed +5V @ 28mA to the switching pins.
This will make the assembly a little higher but as it's for home built projects that should not be a problem. But one could mount the filters on the other side of the board and  fit those in reverse top to bottom.

CFGSR, for this LF Ensemble with an extra /16 set multiply to 64 - Save. Then set ABPF as retailed above.
HDSDR:- If you are going to use the lowest frequencies set the tune offset negative, eg -10000Hz. Then using a 96KHz soundcard keypad tuning will work to about 46KHz, tuning lower will have to be done manually unless you set it to -50000Hz. The lowest frequencies might be better received by simply connecting an antenna to the soundcard and using HDSDR set for a mono input.


AvrDude fuse setting avrdude -c usbasp -p t861 -U lfuse:w:0xe1:m -U hfuse:w:0xdd:m -U efuse:w:0xff:m

3rd chip:- Loaded fuses V16.01 hex. [And wrongly the .eep] SrockATTiny861\old\V16_01Studio6 [Done in a few minutes now!!]
Recognised after shorting 5V line to ground [NO POWER!]
CFGSR error, set Init RXRX.
"Si570" tab, click "factory default".
V 16.01 has just the four band select pins, each one high in turn. Configurable with CFGSR.

4th chip High fuse set for 4V3 BOD, not sure if it made any difference but was recognised first time USB was applied. I really do not know if this is a good idea...But I have reprogrammed this chip several times with instant recognition. Erasing does not alter fuse settings.

Updating USBasp:- (Not necessary if you just ignore the warnings.)

[Or you can get them with the latest firmware http://www.ebay.co.uk/itm/131241223483 ]

Described on two pages as described hereAnd here this page confirms there is no need to update and also gives some fuse changes if you do.

Roger's page makes it look difficult. I just obtained another usbasp, linked the two jumper pins (JP2) on the new one, connected the two usbasps together with the 10 pin cable and used the old asp to program the new, just as described above. ONLY the asp that is doing the programming connected to USB. (still got the warning-ignored) Now the new asp works without any warnings. The hex file is in the .gz at usbasp.2011-05-28.tar.gz\usbasp.2011-05-28\bin\firmware. I found it easy but note the warning. When I then tried to read or write with the updated firmware I got a message that looked like a "libusb0" error but all I needed was to set Khazama's ISP speed to "Auto".




I have also used my serial programming adaptor and PonyProg as described here.

The PonyProg fuse settings as read from the ATTiny861. Here the hex numbers are represented in the rows by UNTICKED boxes. (Tick=0 No tick=1) But the blanked-out boxes are confusing.
Top line Lock 03. 2nd Extended 01. 3rd High DD, 4th Low F1

But now I think 3rd High is best at DC, with BODLEVEL0 ticked. [Or 1101 1100]

As a check read the fuses also save the Flash and EEprom to a file. Mine were not the same size as the original but 11973 and 1245. (Original 13988, 572)

Below settings Dave used, I think this gives no "Brown Out" my setting above certainly works, maybe better?


First configuration use this for 3 volt operation.


Comments