At 02:23 AM 4/10/02 -0700, Keong wrote: >Hi > >I notice that the program memory for the PIC12CE518 is >organised in 512x12 blocks, rather than the normal x14 >blocks. Is there any difference in its usage as >compared to those using x14 block program space or are >there any particular steps that I need to take into >account when writing the program for the chip that is >using 12 bits per program memory space (PIC12CE518). Yes - there are several important differences. I'll highlight a few of those here but you *REALLY* have to read the data sheet to avoid being burned. 1) 12 bit core does not have "addlw" or "sublw" instructions 2) RAM banks are 32 bytes instead of 128 bytes 3) ROM pages are 512 bytes instead of 2K bytes. 4) The entry points for all subroutines must be within the first 256 bytes of a ROM page. All lookup tables must reside entirely within the same 256 byte space. In essence, anything that modifies PCL has to live within first half of any ROM page. 5) No TRIS registers. You have to use the TRIS n instruction instead. Note that this is a write only instruction - you cannot read the contents of the TRIS registers. 6) same for the OPTION register: use the OPTION instruction to load this write-only register. I'm sure that there are other things that I have missed but this is what comes to mind right now. dwayne -- Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 18 years of Engineering Innovation (1984 - 2002) .-. .-. .-. .-. .-. .-. .-. .-. .-. .- `-' `-' `-' `-' `-' `-' `-' `-' `-' Do NOT send unsolicited commercial email to this email address. This message neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics