Shanay Walker was found dead in her bed in Nottingham in July 2014.
Juanila Smikle, 53, of Easegill Court, Top Valley, is accused of cruelty to Shanay and to four other children, dating back to 2011.
Mrs Smikle's daughter Kay-Ann Morris, 24, of Nottingham, denies murdering Shanay, her niece, and charges of cruelty against two other children.
Ms Morris elected not to give evidence at the trial at Nottingham Crown Court.
Describing her own childhood, Mrs Smikle told the jury she had been routinely beaten with tree branches while growing up in Jamaica in the 1960s and 1970s.
She described being "peppered", meaning that a vinegar, salt and chilli pepper solution was poured on to her genitals.
She said her upbringing made her think beatings and "pepperings" were right and fair.
The court heard how Mrs Smikle beat each of her own eight children in Jamaica but when she moved to the UK, she realised it was not acceptable.
She said Kay-Ann and her twin sister Kerry-Ann would "never forgive me for beating them because they're hurt and vexed."
However, the court was told that in January 2007, Kay-Ann was "peppered" by her sister at the instigation of Mrs Smikle after she had lied about having sex.
At this point, Kay-Ann Morris broke down in the dock.
The jury was told that within a few months of this incident both twin daughters had moved out of the home.
Subsequently Kay-Ann and Shanay came back to live with Mrs Smikle.
Asked by the defence if she had ever smacked Shanay, Mrs Smikle replied: "Never".
The trial continues.
A woman accused of harming her seven-year-old granddaughter has told a court she was beaten as a child.