debug error on 12F509


Closed Thread
Results 1 to 8 of 8
  1. #1
    Pedro Pinto's Avatar
    Pedro Pinto Guest

    Default debug error on 12F509

    Hello

    dat var word

    I want use the pic 12F509
    this instruction compile fine
    debug "Hello",dat,10,13

    but this donīt compile
    debug "Hello",BIN16 dat,10,13

    the compile show this error messages
    ERROR: Macro DEBUGCOUNT?C not found in macro file
    ERROR: Macro DEBUGNUM?W not found in macro file
    ERROR: Macro DEBUGBIN? not found in macro file

    PBP Pro 2.50
    Anyone know what is the problem?

    Thanks
    Best regards
    Pedro

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Did you put the DEBUG DEFINES in your code?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Pedro Pinto's Avatar
    Pedro Pinto Guest


    Did you find this post helpful? Yes | No

    Default

    Hello Joe S

    Yes, i put
    DEFINE DEBUG_REG GPIO
    DEFINE DEBUG_BIT 4
    DEFINE DEBUG_BAUD 2400
    DEFINE DEBUG_MODE 1
    DEFINE DEBUG_PACING 1000

    This didn't also work too
    tipo var byte
    iplp var GPIO.5
    bmode CON 4 ' N2400 INVERTED

    inicio:
    pause 1
    SERIN2 iplp,bmode,800,inicio,[wait ("C"),HEX2 tipo]

    Anyone a idea?
    Perhaps the 12F serie don't work with the serin2
    and also have problems to send like, dec var, hex var, bin var

    This work
    SerIn iplp,4,["OK"],andar

    This not work
    SerIn iplp,4,["OK"],#andar


    Best regards
    Pedro

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Some things (pretty much everything you're showing) just are not supported on 12-bit core.

    http://www.melabs.com/support/12-bit.htm
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Pedro Pinto's Avatar
    Pedro Pinto Guest


    Did you find this post helpful? Yes | No

    Default

    Hello Bruce

    With the 12F609 it works, the compiler not show any errors

    If i add on program begin the instruction to tune the internal oscilator
    the compiler show a error message, do i not need to add the
    DEFINE OSCCAL_2K 1 on the begin of the code?

    Thanks
    Regards
    Pedro

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Hi Pedro,

    With the 12F609 it works, the compiler not show any errors
    It shouldn't show any errors. The 12F609 is a 14-bit core. The 12F509 is a 12-bit core.

    do i not need to add the
    DEFINE OSCCAL_2K 1 on the begin of the code?
    DEFINE OSCCAL_2K 1 is for a 2K part. DEFINE OSCCAL_1K 1 would be for a 1K part, but this isn't necessary for a PIC that doesn't have a factory OSCCAL calibration value stuffed in the last program memory location or an OSCCAL register
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7
    Pedro Pinto's Avatar
    Pedro Pinto Guest


    Did you find this post helpful? Yes | No

    Default

    Hello again

    Thank you Bruce
    The internal osc of the 12F609 is 4Mhz, right?

    Regards
    Pedro

  8. #8
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    The 12F609 internal ocs runs at 4MHz or 8MHz. IOSCFS: Internal Oscillator Frequency Select bit in the config register is used to select 4 or 8MHz.

    @ DEVICE PIC12F609, MCLR_OFF, IOSCFS_4MHZ, INTRC_OSC_NOCLKOUT

    @ DEVICE PIC12F609, MCLR_OFF, IOSCFS_8MHZ, INTRC_OSC_NOCLKOUT
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. N-Bit_MATH
    By Darrel Taylor in forum Code Examples
    Replies: 38
    Last Post: - 16th December 2010, 14:48
  2. About USB
    By dias11 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 3rd December 2009, 20:41
  3. debug not working with MPASM assempler
    By santamaria in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th March 2009, 07:51
  4. Data EEPROM gets clobbered during programming
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2008, 02:46
  5. Debug and some 18F pics
    By sinoteq in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st June 2007, 15:10

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