--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I was looking at the ChangeBias function in quisk_hardware.py
Looking at ;
self.pc2hermeslitewritequeue[0:5] = 0x7d,0x06,i2caddr,0x30,value1
self.WriteQueue(1)
I see from your suggestion that the bus id is 0x7d. i2caddr and value1 are obvious.
My question is, what are the 2nd and fourth parameters for? (0x06 and 0x30)?
Thanks in advance.
73
Martin
VK7MA
0x3d | [31:24] | I2C2 cookie, must be 0x06 to write |
0x3d | [23] | I2C2 stop at end (0=continue, 1=stop) |
0x3d | [22:16] | I2C2 target chip address |
0x3d | [15:8] | I2C2 control |
0x3d | [7:0] | I2C2 data |
73
Martin
VK7MA
Cut and pasted at the end of this post is the code I am using below from C:\Python27\Lib\site-packages\quisk\hermes (please forgive me, I am using windows for now :)). I have modified the ChangeBand function.
One thing that I have noticed is when Quisk first starts I get a timeout on WriteQueue(). Once I change a band all is good. Not sure why.
Thanks everyone for he assistance.
Nice job with Quisk too Jim. Very versatile!
73
Martin
VK7MA
def ChangeBand(self, band):
# band is a string: "60", "40", "WWV", etc.
BaseHardware.ChangeBand(self, band)
self.band = band
self.ChangeBandFilters()
self.SetTxLevel()
#Below added by VK7MA to change external amplifier band filter.
ex_i2caddr = 0x21
ex_iodir = 0x00
ex_ioreg = 0x00
ex_gpio = 0x09
hl2_bus_id = 0x7d
self.pc2hermeslitewritequeue[0:5] = hl2_bus_id,0x06,ex_i2caddr,ex_ioreg,ex_iodir
self.WriteQueue(1)
if band == "160":
ex_value = 0b00000001
elif band == "80":
ex_value = 0b0000010
elif band == "60":
ex_value = 0b0000100
elif band == "40":
ex_value = 0b0000100
elif band == "30":
ex_value = 0b0001000
elif band == "20":
ex_value = 0b0001000
elif band == "17":
ex_value = 0b0001000
elif band == "15":
ex_value = 0b0010000
elif band == "12":
ex_value = 0b0010000
elif band == "10":
ex_value = 0b0010000
else:
ex_value = 0b0000000
self.pc2hermeslitewritequeue[0:5] = hl2_bus_id,0x06,ex_i2caddr,ex_gpio,ex_value
self.WriteQueue(1)