Searching \ for '[PIC] EE Byte Alignment on PIC18F' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'EE Byte Alignment on PIC18F'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] EE Byte Alignment on PIC18F'
2011\06\22@225633 by David Duffy (AVD)

I've not had to use the EE on an 18F PIC before and struck a small snag.

It seems the MPASM aligns all "de" directives on even addresses.

So with this:
de    0x01
de    0x02
de    0x03
de    0x04

The result is really 0x01 0x00 0x02 0x00 0x03 0x00 0x04 0x00
as it pads each de section with 0x00 to make it even.

I have worked around this by doing:

de    0x01 0x02
de    0x03 0x04

Is there a better way around this?

-- ___________________________________________
David Duffy        Audio Visual Devices P/L
Unit 8, 10 Hook St, Capalaba 4157 Australia
Ph: +61 7 38235717      Fax: +61 7 38234717
Our Web Site:

2011\06\24@025029 by cdb


:: Is there a better way around this?


db 0x01,0x02,0x03,0x04

So for example to make constant bytes for LCD initialisation

LCD_init db 0x38,0x38,0x33,0x01,0x0C,0x00

The 0x00 is the null string.

cdb, on 24/06/2011
Web presence:   Hosted by:

More... (looser matching)
- Last day of these posts
- In 2011 , 2012 only
- Today
- New search...