我有一個數組向下跌破如何將內存中的內容寫入數組?
unsigned char pat6[8] = {0x3C,0xFF,0xC3,0xC3,0xC3,0xC3,0xFF,0x3C,};
我怎樣才能填補的內存,我從這裏閱讀內容的陣列?
unsigned char read_byte() //reading from EEPROM serially
{
unsigned int i;
sda=1;
reead=0;
for(i=0;i<8;i++)
{
reead=reead<<1;
scl=1;
_nop_();
_nop_();
if(sda==1)
reead++;
scl=0;
}
sda=0;
return reead; //Returns 8 bit data here
}
由於
void display_clear(unsigned char pattern[])//, int num)
{
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 = ~pattern[cnt];
P1 = ~row;
delay_ms(100) ; // delay of 1 ms
row = row<<1;
}
row = 0x00;
}
朋友,上述函數,我用於顯示陣列..... 我想從串行存儲器
我填寫數組中的數據試圖這樣做:
//begin of read 2048 byte from serial memory AT24C16
for (i=0;i<2048;i++)
{
j[i]=read_byte();
aknowledge();
}
//end of read 2048 byte from serial memory AT24C16
並得到錯誤:
24C16_RW.C(229):錯誤C216:在非數組或維度太多
是否有任何其他方式標?
感謝
什麼是'scl'?它在哪裏宣佈? – 2011-12-28 08:15:28