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
Hi guys,
I have this array :
unsigned char pat[8] = {0xC3,0xC3,0xC3,0xFF,0xFF,0xC3,0xC3,0xC3,}
How can I pass that array into this function ?
void display(unsigned char pat[])
{
unsigned int cnt, col, row, num ;
row = 1;
//for (cnt = num*8 ; cnt < (num*8+8) ; cnt ++ ) //display pattern each character
for (cnt = 0 ; cnt < 8 ; cnt ++ ) //display pattern each character
{
P3 = ~pat[cnt];
P1 = ~row;
delay_ms(10) ; // delay of 1 ms
row = row<<1;
}
row = 0x00;
}
Thanks
I have this array :
unsigned char pat[8] = {0xC3,0xC3,0xC3,0xFF,0xFF,0xC3,0xC3,0xC3,}
How can I pass that array into this function ?
void display(unsigned char pat[])
{
unsigned int cnt, col, row, num ;
row = 1;
//for (cnt = num*8 ; cnt < (num*8+8) ; cnt ++ ) //display pattern each character
for (cnt = 0 ; cnt < 8 ; cnt ++ ) //display pattern each character
{
P3 = ~pat[cnt];
P1 = ~row;
delay_ms(10) ; // delay of 1 ms
row = row<<1;
}
row = 0x00;
}
Thanks