12 bit core


Closed Thread
Results 1 to 5 of 5

Thread: 12 bit core

  1. #1
    Join Date
    Aug 2004
    Posts
    64

    Default 12 bit core

    Hi friends:
    I have a question concerning the 12 bits core limitations. I understand you must use the first half of the 512 bytes to put the subrutines, and it works OK for the 512 byte devices. But if you use a 16F57 or 59, you have 2Kbytes and four possible sectors to put subroutines:From
    00 to FF,200 to 2FF, 400 to 4FF and 600 to 6FF. The PBP handles this.?. If not, how can I put
    some routines in other block (200h,400h or 600h)?. I am aware I need to keep trace of the stack limitations.
    Any hint...?
    Thanks in advance...
    Ruben de la Pena

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    maybe i missed something, but usually the compiler handle it for you.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Aug 2004
    Posts
    64


    Did you find this post helpful? Yes | No

    Default 12 bit core

    Hi:
    I had a program in a customer PCB. It had 450 bytes or so and compile ok with PBP. My customed asked to add one I2C eeprom using the same micro, but the PBP no not compile when the subs excedes the first 256 bytes. I made it in ASM and it works OK. I made several attempts in PBP because I like it more than ASM. I do not have tried with the new 2.5a extension of the PBP. Obviously, the customer dont want the change the PIC or the PCB.
    The PCB was already prepared to receive the eeprom.
    Thanks in advance...
    Ruben de la Pena

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    12 bit core have some limited support, so the 'hand-made' or asm solution have it's own benefits.

    Did you looked over there...
    http://melabs.com/support/12-bit.htm
    I2CRead, I2CWrite: The I2C clock and data pins are fixed at compile time by Defines. They still must be specified in the I2CRead and I2CWrite statements, though this information is ignored by the compiler.

    Define I2C_SDA PORTA,0
    Define I2C_SCL PORTA,1

    Because of memory and stack constraints, the Define for I2C_SLOW does not do anything. Low-speed (100 kHz) I2C devices may be used up to 4MHz. Above 4MHz, high-speed (400kHz) devices should be used.

    The Define for I2C_HOLD has no effect.
    '
    '
    '
    '
    '
    .....Many library routines, such as I2CRead, are fairly large. It may only take a few routines to overrun the first 256 words of code space. If it is necessary to use more library routines that will fit into the first half of the first code page, it will be necessary to move to a 14- or 16-bit core PICmicro MCU instead of the 12-bit core device.
    are you using multiple I2C line or you used it in a sub? I feel the sub idea may help.
    Last edited by mister_e; - 6th December 2007 at 01:13.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Aug 2004
    Posts
    64


    Did you find this post helpful? Yes | No

    Default 12 bit core

    Hi:
    I tested with the pbp 2.50a and now it works. Thanks for your responses.
    Greetings...
    Ruben de la Pena

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. MCP3208 12 bit A/D driver
    By polymer52 in forum Code Examples
    Replies: 0
    Last Post: - 5th February 2010, 11:59
  3. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 00:55
  4. Real Time Clock & Eeprom
    By smart_storm in forum General
    Replies: 8
    Last Post: - 17th February 2006, 19:03
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts