I am trying to read/write the contents of a specific memory location on the ATtiny45. Here is the code.
uchar val; uchar *addr = (uchar *)(0x06); // 0x06 = ADCSRA val = *addr;
I have also tried
uchar val; memcpy(val, (uchar *)(0x06), 1);
val however is always zero even when I know the value is not.
I have tried different addresses but the result is always the same.
Could someone please tell me where I am going wrong.