MCP6548 comparator circuit isn't working
I’m glad to see you got your first circuit working.

Just a little note.

First rail to rail Op Amp is a negative input wave “inverting precision peak detector” that produces a positive output at x1 gain.

Since the comparator only detects  inputs greater than the reference voltage so the negative peak detector is somewhat unnecessary if you expect positive input peaks to be symmetrical. 

Thus you can go directly into the comparator.