To clarify, it seems you want to detect the presence of 12 V AC in a processor that apparently has 5 V digital inputs.
Here is a simple circuit:
The positive halves of the AC input signal will turn on the transistor, which drives the output line low. D1 prevents the transistor from getting damaged by excessive B-E reverse voltage during the negative half of the input waveform.
The output will pulse at the AC input frequency. This can be easily dealt with in firmware similarly to switch debouncing. For example, let's say the input AC frequency is never less than 50 Hz. That means a complete cycle takes 20 ms or less, with the output low for roughly half that time. Consider the AC input to be present within 15-20 ms of the output being low.
If this is just supposed to react on a human time scale, then you can use 50 ms debouncing. I've found that to be just below where humans perceive a delay from pressing a button to a perceived action.