Hi,

I wonder if someone can help.

I'm using a PIC18F242 / PIC18F2420 and sdcc 2.9.0 and currently using
this code to pop things into EEPROM storage.

__code unsigned char __at( 0xf00000 )
values[] = {
        0x00, 0x01,
        0x02, 0x03,
        0x04, 0x05,
};

Unfortunately, when I use the EEPROM read commands for index 0, I get
0x00, for index 1, I get 0x02, and index 2, I get 0x04.

I've read articles that say the EEPROM needs to be padded to 16bits for
the above PICs, and was hoping that I could declare with __eeprom
instead of __code and sdcc would fix this up for me but it seems that
__eeprom isn't done for PIC16. I don't want to have to declare as a
'short' as then it impacts the code itself to cater for /2 situations.

Any help much appreciated ?

Thanks,



------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to