We study single error-correcting codes for the asymmetric channel with input and output alphabets being {0, 1,…, a — 1⩽. From an abelian group G of order N with elements g0 = 0, g1,…, gN—1, Constantin and Rao (1979, Inform. Contr.40, 20–36) define Vg = {(b1,b2,...,bn−1) ∈ {O, 1,..., a − 1 }N−1 | ∑N−1i−1 bigi 0 g} and show that Vg correct single errors. We give explicit expressions for the size and weight distribution of these codes. We further give a short discussion of some constant weight codes obtained by a similar construction.