BFGminer and CGminer are both the biggest mining softwares written in C and both are open sourced and readily available to download on github. But remember that depending on how you are designing your miner. The atmega328p can only handle so much data and limited memory that you will need a host computer to hook up.
Also at this point in time there isn't alot of development and availability of bare asic chips. You might want to look at Sfards for their development board to get started. I know that Sidehack and his team are getting very close to finishing their Gekkoscience boards based on the antminer bm1384 asic chip which looks absolutely amazing. I wouldn't discourage you but you have the community (both this and arduino) to help out.