Bs2 & lcd problem
sport270
Posts: 82
I've got some issues with a program I'm running on a bs2 that displays hz on a 2x16 back lit serial lcd. On a couple of them the lcd seems to shut off, from thermal overload of the 7805 to the lcd. But the one I'm working on right now in the field, it seems the bs2 is shutting down, because the lcd is still showing back light on, just no characters... One other problem is that I have the bs2 counting pulses on a shaft for 1/2 second then *2 to get the correct speed. Problem is that when it gets to 650ish.... it starts back over to 1 and keeps rising as the speed increases. It should be showing in the 720 range and I also have a low speed alarm monitoring it. So the user has to set the alarm at like 5 -10 instead of like 670.... not sure why it won't display over 650 but wondering if that problem could be resetting or locking up the bs2
Comments
But you're only getting 300 or so in the 1/2 sec period, so that should be fine. It almost sounds like your variable is a byte when it should be a word.
Cheers,
The sensor is a mag pickup coil that faces a 37tooth gear.
I take the .5 sec reading and *162 then /100 to get it into hz/rpm then *2 to get correction to full second reading.
would it not work to just take the 430 hz and first /100 then *162 to get to same corrected reading but not go past the over run limit…?
You are quite right that changing the order of manipulations will give generally the same solution as Jon's suggestion to just grab a smaller number by shortening the input window.
Cheers,