Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change switch on push button #3

Open
DG0JG opened this issue Dec 4, 2018 · 5 comments
Open

Change switch on push button #3

DG0JG opened this issue Dec 4, 2018 · 5 comments

Comments

@DG0JG
Copy link

DG0JG commented Dec 4, 2018

Hello Jamarju

Is it possible to change the code that the relays no longer switch but only make a short pulse ?
Unfortunately, I am not so experienced in the programming of the PIC

@jamarju
Copy link
Owner

jamarju commented Dec 4, 2018

On main.c, where it says:

        if ((capsensor_is_button_pressed() || extrigger_read()) && !heartbeat_outage()) {
            switch_toggle();
        }

do:

        if ((capsensor_is_button_pressed() || extrigger_read()) && !heartbeat_outage()) {
            switch_on();
            CLK_125KHZ();
            DELAY_125KHZ(pulse time in ms);
            CLK_4MHZ();
            switch_off();
        }

CLK_125KHZ momentarily underclocks the PIC to minimize power usage during the pulse.

(not tested).

@DG0JG
Copy link
Author

DG0JG commented Dec 12, 2018

Hello Jamarju
Unfortunately I have problems with the firmware
I exchanged the PIC for a new one to have the original one
I compiled your firmware and transferred it with an ELNEC programmer via the ISP port
After the transmission and installation in the existing power board, the red LEd lights up briefly and the blue lights are constantly lit.
Unfortunately, however, via the sensor keys no switching possible
do you have an idea what it could be?
I will try again tomorrow with a PICKit3 to program

regards
Stephan

@jamarju
Copy link
Owner

jamarju commented Dec 13, 2018 via email

@DG0JG
Copy link
Author

DG0JG commented Dec 13, 2018

Hello Jamarju
the software works with the PicKit3
but two small problems are
I have the version with two relays (where would I change something?)
And the relay should wear as long as I press on the sensor surface
short on the sensor surface short pulse
long on the sensor surface press long pulse

could you help me there?

regards
Stephan

@jamarju
Copy link
Owner

jamarju commented Dec 14, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants