Rewrote most of it. Now will display the rounded value digit on seven segment display, need to test with source higher then 5v next