Hardware test

The period is twice as long as what it should be. Is my clock 4MHz
instead of 8MHz? Or is my routine doing bad math?