pic Basic Pro 2.50a & debug statement


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Location
    Sydney, Australia
    Posts
    13

    Default pic Basic Pro 2.50a & debug statement

    Code below for 16F737 compiles & runs just fine under PBP 2.46. Compile under 2.50a and everything runs OK *EXCEPT* DEBUG (nothing changes on debug pin).

    Running MicroCode Studio v3.0.0.5 & WinPIC v??? (compiled Jun 3 2007). Using MPLAB 7.60.00.00 and MPASM (not PM).


    Am I going nuts or is something broken?

    ' Code:
    ' System Constants
    OSCCON = $F0 ' Tell the PIC
    ADCON1 = 7
    CMCON = 7

    ' Defines
    DEFINE OSC 8 ' Tell PicBASIC
    define DEBUG_REG PORTA
    define DEBUG_Bit 1
    DEFINE DEBUG_BAUD 9600
    DEFINE DEBUG_MODE 1
    define PULSIN_MAX 1000

    // snip //

    ' Code start
    init:
    pause 100 ' let things settle
    debug "Start",10,13

    Any ideas greatly appreciated.
    Phil.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Phil Moore View Post
    Code below for 16F737 compiles & runs just fine under PBP 2.46. Compile under 2.50a and everything runs OK *EXCEPT* DEBUG (nothing changes on debug pin).
    Config fuses set the same between the 2 PBP versions?
    Did you change something in the .inc file way back when and forget about it?

    MPLAB 7.60. There is a newer version...not that it'll help anything...you never know...

  3. #3
    Join Date
    Jun 2007
    Location
    Sydney, Australia
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Hi Skimask,

    I did change over from PM to MPASM as I was doing other stuff with 18F chips, however, the only config change I made to the 16F737.INC file was to set clock to INTRC with IO. This is the same config I had with PM:

    ' Device fuses & registers (Assumes PM assembler)
    @ DEVICE INTRC_OSC,MCLR_ON,WDT_OFF


    Fuses:
    Osc - INTRC as IO
    WDT - Off
    PUT - Off
    RE3/MCLR = MCLR
    BODEN - Enabled
    BODENV - 2.0V
    Backbug - disabled
    CCP2MUX - RC1
    CP - Off
    BORSEN - enabled
    IESO - enabled
    FCMEN - enabled

    Device (DVD simulator - don't ask why) is powered off USB port of PC, with extra cap for filtering - don't think it's a voltage thing.

    Cheers
    Phil.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    I don't see anything turning off the ANALOG function of PortA.1 and switching it over to digital...

    Actually, yes I do see something turning off SOME analog ports, but not enough...
    Last edited by skimask; - 9th March 2008 at 08:01. Reason: Whoops!

  5. #5
    Join Date
    Jun 2007
    Location
    Sydney, Australia
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Hi Skimask,

    Changed ADCON1 to $f, but no joy (if that's what you meant).

    Phil.

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Phil Moore View Post
    Hi Skimask,

    Changed ADCON1 to $f, but no joy (if that's what you meant).

    Phil.
    Yep, you got it.
    Try a different pin without any analog functions on it, just a plain ol' pin.
    Try one of the SEROUT commands and see what happens.
    Try a bunch of things...try anything.

Similar Threads

  1. About timing in pic basic pro
    By din_kt in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th October 2007, 03:09
  2. MElabs PIC BASIC Pro
    By Minestorm in forum Adverts
    Replies: 13
    Last Post: - 17th March 2007, 09:55
  3. USB Pics, ICD2, pic basic pro
    By vacpress in forum USB
    Replies: 34
    Last Post: - 20th January 2007, 20:50
  4. using AND as an IF statement
    By dw_pic in forum mel PIC BASIC
    Replies: 27
    Last Post: - 8th June 2006, 18:05
  5. How to use 93C46 Type EEPROM using PIC Basic PRo
    By in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 1st April 2003, 04:07

Members who have read this thread : 0

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