From the Mosfet switching saga I have a program running on the 28x1, approx. 2500 bytes. Basic functions (and subs) are:
1a Read preset alternator capacity (4 pin DIP switch) on 4 input pins
(do once only at power up)
1 Monitor battery V (anal.pin), initiate charge if V below preset level
2 Read throttle position (simple pot/R V-divider) on anal. pin
3 Read current (LEM HASS 50-400A) closed loop Hall Effect on anal. pin
4 From 1a and 1-2 above (max capacity,% bat., % throt) calculate new required Amps
5 Compare current Amps with required and Increase/Decrease PWM accordingly
6 Go back and do it all again.
This all works very well, untill the real world happens and strange unexplicable things occur to mess up gas production.
I would like to store in non-vol. memory the following:
Max bat.V, Min bat V, Max total Amps (min=0), Max Amps per cell(up to 6).
How would I go about reading(and storing) individual cell Amps without doing it EVERY cycle over and over which seems unneccessary, but still get that "something has gone wrong" type of moment. Along with analogue reads and pausing, a cycle is approx. every second.
Is it "another brick in the wall" or "we don't need no education" ? It feels like I'm under a Lead Zepelin !
Manie
1a Read preset alternator capacity (4 pin DIP switch) on 4 input pins
(do once only at power up)
1 Monitor battery V (anal.pin), initiate charge if V below preset level
2 Read throttle position (simple pot/R V-divider) on anal. pin
3 Read current (LEM HASS 50-400A) closed loop Hall Effect on anal. pin
4 From 1a and 1-2 above (max capacity,% bat., % throt) calculate new required Amps
5 Compare current Amps with required and Increase/Decrease PWM accordingly
6 Go back and do it all again.
This all works very well, untill the real world happens and strange unexplicable things occur to mess up gas production.
I would like to store in non-vol. memory the following:
Max bat.V, Min bat V, Max total Amps (min=0), Max Amps per cell(up to 6).
How would I go about reading(and storing) individual cell Amps without doing it EVERY cycle over and over which seems unneccessary, but still get that "something has gone wrong" type of moment. Along with analogue reads and pausing, a cycle is approx. every second.
Is it "another brick in the wall" or "we don't need no education" ? It feels like I'm under a Lead Zepelin !
Manie
Last edited: