bianchi77
Advanced Member level 4
- Joined
- Jun 11, 2009
- Messages
- 1,313
- Helped
- 21
- Reputation
- 44
- Reaction score
- 20
- Trophy points
- 1,318
- Location
- California
- Activity points
- 9,442
Guys,
How can I write a pattern into serial memory properly ?
Can I use a loop below ? with while ?
Or
Any other suggestions or experiences ?
Thanks
How can I write a pattern into serial memory properly ?
Can I use a loop below ? with while ?
Or
Any other suggestions or experiences ?
Thanks
Code:
unsigned char pattern[8] = {0x3C,0x42,0xA5,0xA5,0x81,0xA5,0x5A,0x3C,};
address=0x0000;
while (address<0x0008)
{
for(counter=0;counter<8;counter++)
{
AT25_WriteByte(address,pattern[counter]);
_nop_();
_nop_();
address=address+0x0001;
}
}