The barium isotopic anomalies found in meteoritic SiC grains are interpreted in the framework of the s-process nucleosynthesis occurring in carbon stars (type N) that suffer recurrent He shell instabilities on the asymptotic giant branch. In our calculations we use average thermal pulse conditions derived from stellar models to follow the neutron captures induced by the activation of the (C(alpha, n)O)-C-13-O-16 reaction and (marginally) by the (Ne(alpha, n)Mg)-Ne-22-Mg-25 one. This is done with an updated nuclear network extending from He to Po and taking into account the temperature dependence of the neutron capture cross sections. Asymptotic abundances of s-nuclei are achieved after about 15 thermal pulses. The He shell material is mixed to the surface after each pulse using simple prescriptions for dredge-up and mass loss. The solar system distribution of s-isotopes with A greater-than-or-equal-to 90 (the main component) is reproduced by models attaining a mean neutron exposure tau0 = 0.28 mbarn-1, while the explanation of the anomalous ratios Ba-134, Ba-138/Ba-136 observed in SiC requires models with lower mean neutron exposures, in the range tau0 = 0.14-0.17 mbarn-1. In view of the uncertainties affecting the cross sections of odd Ba isotopes, a choice for them is suggested to reproduce Ba anomalies in SiC. The Xe, Nd, and Sm anomalies recently measured in the same SiC grains are also analyzed; they show a clear s-signature and their interpretation support the C-star origin. The alternative scenario for the formation of the SiC grains, dealing with C-enriched Wolf-Rayet stars, is discussed.