E_KARVELAs
Joined: 14 Feb 2007 Posts: 46 Location: Greece & Cyprus
|
how do i use memcpy instruction? |
Posted: Sun Feb 18, 2007 6:17 pm |
|
|
hi there
is there any way i can copy THE byte of table
lets say
Code:
Code: |
from DIG_2[1][6] to buffer[6]
or
from DIG_2[3][6] to buffer[6]
|
well did the follow
'' Code: |
memcpy(buffer,DIG_2[1][6],8);
| ''
but have a error of:
*** Error 45 "C:\Documents and Settings\Evagoras.EVAGORASHP\Desktop\mplab_C_TO_hex\matrix.c" Line 135(23,24): Subscript out of range
any help????
Code: |
int8 buffer[6];
const int8 DIG_2[26][6] = {
0x7e,0x88,0x88,0x88,0x7e,0x00, // A
0xfe,0x92,0x92,0x92,0x6c,0x00, // B
0x7c,0x82,0x82,0x82,0x44,0x00, // C
0xfe,0x82,0x82,0x44,0x38,0x00, // D
0xfe,0x92,0x92,0x92,0x82,0x00, // E
0xfe,0x90,0x90,0x90,0x80,0x00, // F
0x7c,0x82,0x92,0x92,0x5e,0x00, // G
0xfe,0x10,0x10,0x10,0xfe,0x00, // H
0x00,0x82,0xfe,0x82,0x00,0x00, // I
0x04,0x02,0x82,0xfc,0x80,0x00, // J
0xfe,0x10,0x28,0x44,0x82,0x00, // K
0xfe,0x02,0x02,0x02,0x02,0x00, // L
0xfe,0x40,0x30,0x40,0xfe,0x00, // M
0xfe,0x20,0x10,0x08,0xfe,0x00, // N
0x7c,0x82,0x82,0x82,0x7c,0x00, // O
0xfe,0x90,0x90,0x90,0x60,0x00, // P
0x7c,0x82,0x8a,0x84,0x7a,0x00, // Q
0xfe,0x90,0x98,0x94,0x62,0x00, // R
0x62,0x92,0x92,0x92,0x8c,0x00, // S
0x80,0x80,0xfe,0x80,0x80,0x00, // T
0xfc,0x02,0x02,0x02,0xfc,0x00, // U
0xf8,0x04,0x02,0x04,0xf8,0x00, // V
0xfc,0x02,0x1c,0x02,0xfc,0x00, // W
0xc6,0x28,0x10,0x28,0xc6,0x00, // X
0xe0,0x10,0x0e,0x10,0xe0,0x00, // Y
0x86,0x8b,0x92,0xa2,0xc2,0x00,}; // Z
|
_________________ ---- GREECE ---- |
|