Many folks use a coffee grinder to grind spices. You should have a separate grinder for just spices as spice oils left behind can effect the taste of coffee ground after spices.
Another vote for electric coffee grinder. I have 4 or 5 of those things (not sure why). One of coffee, one for spices, and the remaining for backup I guess.