It appears to be a 1 or 2 real from Lima Peru. Visible date is 1677 but that also looks like an overdate or underdate.
It is a cob from the Potosi mint, 1747, assayer q. I cannot read the denomination. If it is about 3.3g, then it would be a 1 real. Double that for a 2 reales.