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.

The game set a new record for the most-watched event in US television, beating last year's audience of 112.2 million.
Viewing peaked at 120.8 million during the last quarter, which saw the New England Patriots beat the Seattle Seahawks 28-24.
Some 118.5 million watched Katy Perry's half-time show - three million more than last year's show with Bruno Mars.
Ratings compiler Nielsen said the 12-minute performance - which also featured Lenny Kravitz and Missy Elliot - attracted the biggest half-time audience since 1991.
NBC, which broadcast the game, said the actual audience was likely to have been higher because official ratings did not count people watching in locations such as sports bars.
An additional 600,000 viewers watched the game with Spanish-language announcers on NBC's Universo cable network.
NBC Sports also offered a live stream to computers and tablets - attracting an average 800,000 people, according to Adobe Analytics.
After the game, an estimated 26.5 million people kept their TVs on NBC to watch an episode of James Spader's crime drama The Blacklist, making it the most-watched scripted programme on the network in more than a decade.
Next year's Super Bowl will be played in Santa Clara, California, and will be broadcast by CBS.
A woman accused of harming her seven-year-old granddaughter has told a court she was beaten as a child.
[NEXT_CONCEPT]
An estimated average of 114.4 million people watched Sunday's Super Bowl on NBC, according to initial figures.