Asymmetries in the elastic and inelastic scattering of polarized protons from C and Si