Fix CW key-down/key-up waveform issue (TNX Dave, M0JTS). Fix index key-up waveform.

master
guido 2022-03-22 11:03:25 +01:00
rodzic c3114c99f0
commit 63fb397ee6
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -4,7 +4,7 @@
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define VERSION "1.02w"
#define VERSION "1.02x"
// Configuration switches; remove/add a double-slash at line-start to enable/disable a feature; to save space disable e.g. CAT, DIAG, KEYER
#define DIAG 1 // Hardware diagnostics on startup (only disable when your rig is working)
@ -1603,7 +1603,7 @@ public:
}
void powerDown(){
SendRegister(3, 0b11111111); // Disable all CLK outputs
SendRegister(24, 0b00000000); // Disable state: LOW state when disabled
SendRegister(24, 0b00010000); // Disable state: CLK2 HIGH state, CLK0 & CLK1 LOW state when disabled; CLK2 needs to be in HIGH state to make sure that cap to gate is already charged, preventing "exponential pulse is caused by CLK2, which had been at 0v whilst it was disabled, suddenly generating a 5vpp waveform, which is “added to” the 0v filtered PWM output and causing the output fets to be driven with the full 5v pp.", see: https://forum.dl2man.de/viewtopic.php?t=146&p=1307#p1307
SendRegister(25, 0b00000000); // Disable state: LOW state when disabled
for(int addr = 16; addr != 24; addr++) SendRegister(addr, 0b10000000); // Conserve power when output is disabled
SendRegister(187, 0); // Disable fanout (power-safe)
@ -2161,7 +2161,7 @@ void dsp_tx_cw()
#ifdef KEY_CLICK
if(OCR1BL < lut[255]) { //check if already ramped up: ramp up of amplitude
for(uint16_t i = 31; i != 0; i--) { // soft rising slope against key-clicks
OCR1BL = lut[pgm_read_byte_near(ramp[i])];
OCR1BL = lut[pgm_read_byte_near(&ramp[i-1])];
delayMicroseconds(60);
}
}
@ -3864,7 +3864,7 @@ void switch_rxtx(uint8_t tx_enable){
#ifdef KEY_CLICK
if(OCR1BL != 0) {
for(uint16_t i = 0; i != 31; i++) { // ramp down of amplitude: soft falling edge to prevent key clicks
OCR1BL = lut[pgm_read_byte_near(ramp[i])];
OCR1BL = lut[pgm_read_byte_near(&ramp[i])];
delayMicroseconds(60);
}
}