Plan on a couple of weeks. First stop should be Astoria area. Next stop maybe Tillamook area. Then maybe Newport, then Florence or possibly Reedsport. CoosBay, Port Orford and finally end up in Brookings. A couple days in each town should give you ample time to explore each area except CoosBay which is the gateway to the Oregon Dunes. If your interested then maybe three days for dune riding.
Best time to visit the Oregon coast is mid to late August to the end of September. But you should plan and expect rain even that time of year. The coast is a diverse experience with lots to see and do.