PICKIT2 - PBC Pro - PIC16F88 TROUBLE


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    18

    Default PICKIT2 - PBC Pro - PIC16F88 TROUBLE

    Hello all,
    today have buyed the pickit2dp and running, I've too mounted a 18 dip pin socket in a board connected with the ICSP signal.

    It's all ok with pic 16f628 and an old hex file compiled with PBC 2.40 and MPASM 6.6, but with 16f88 compiled with PBC pro amd MPASM 8.10 have this alarm message

    http://www.picbasic.co.uk/forum/atta...1&d=1216305160

    Also with a new project with PIC16f628 and this new compiler/assembler/programmer don't work.
    I've tryed also to compile and program the micro but with the oscilloscope the micro seem dead, only the oscillator work.

    I've tryed with PM and MPASM too, but i'm not able to include "PIC16F88" or
    any Config for _XT_OSC and other

    The code :
    '************************************************* ***************
    '* Name : CONTROLLER.BAS *
    '* Author : Giorgio Rossi *
    '* Notice : Copyright (c) 2008 Invento S.r.l. *
    '* : All Rights Reserved *
    '* Date : 26/11/2008 *
    '* Version : 1.0 *
    '* Notes : *
    '* Chip : PIC16F88 *
    '************************************************* ***************
    INCLUDE "MODEDEFS.BAS"
    TRISA = %00000001 'RA0 Input
    TRISB = %00000000 'all PORTB output

    ANSEL = %00000001'only porta.0 is analogue
    ADCON1 = 7'right justify the result(top bits are read as zero)
    CMCON = 7 'Turn off comparators


    adval VAR BYTE
    i var BYTE
    RPM VAR BYTE

    ' Define ADCIN parameters
    Define ADC_BITS 8 ' Set number of bits in result
    Define ADC_CLOCK 3 ' Set clock source (3=rc)
    Define ADC_SAMPLEUS 50 ' Set sampling time in uS
    PAUSE 500

    loop:
    ADCIN 0,adval

    serout PORTB.6,n2400, [$FE, 1]
    serout PORTB.6,n2400, [$FE, 2, "pressione ", #adval]
    serout PORTB.6,n2400, [$FE, $C0, "giri", #rpm]

    IF adval < 90 THEN
    HIGH PORTB.4
    endif

    IF adval > 120 THEN
    LOW PORTB.4
    endif

    COUNT PORTA.2,250,RPM
    for i = 1 to rpm
    toggle PORTB.5
    PAUSE 25
    NEXT i
    LOW PORTB.5
    GOTO loop 'repeat

    Any help will be apreciated,
    Thanks a lot

    giorgio
    Last edited by inventosrl; - 2nd December 2008 at 20:53. Reason: Mistaked attachment

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


    Did you find this post helpful? Yes | No

    Default

    I've tryed with PM and MPASM too, but i'm not able to include "PIC16F88" or
    any Config for _XT_OSC and other
    You do not have to include pic16f88 if you are using MCS, it does it for you when you select 16f88 at the top of MCS, ELSEWISE it would have to be in the same directory as your code, in order to be found.
    Please show us how you wrote the config statement exactly.
    Last edited by Archangel; - 2nd December 2008 at 21:02.
    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
    Join Date
    Nov 2008
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    You do not have to include pic16f88 if you are using MCS, it does it for you when you select 16f88 at the top of MCS, ELSEWISE it would have to be in the same directory as your code, in order to be found.
    Please show us how you wrote the config statement exactly.
    Hello Joe,
    this line
    @ __config _XT_OSC & _WDT_ON & _PWRTE_ON & _MCLR_ON & _BODEN_ON & _WRT_PROTECT_OFF

    but in any case (with or without this config statement), have the same error and, after compiling and programming the micro don't work.

    Thanks

  4. #4
    Join Date
    Nov 2008
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    Joe, this it's the error of MCS Plus while try to compile with the config statement :

    Error [126] c:\pbp\invento\contro~1.asm 101 : Argument out of range (not a valid config register address)
    Last edited by inventosrl; - 2nd December 2008 at 21:13. Reason: mistake

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Here is the top part of the code from a set up I have working.
    Code:
    '16F88
    DEFINE OSC 8
    OSCCON= %01110100
    
    @__CONFIG _CONFIG1, _CP_OFF & _CCP1_RB3 & _DEBUG_OFF & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_OFF & _PWRTE_OFF & _WDT_OFF &_INTRC_IO
    This is using the internal OSC, but you should get the idea.

    You can look in the PicBasic inc file and the inc file in MPASM Suite for all of the possibilities.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by inventosrl View Post
    Joe, this it's the error of MCS Plus while try to compile with the config statement :

    Error [126] c:\pbp\invento\contro~1.asm 101 : Argument out of range (not a valid config register address)
    OK, open the assembly file the error lists, I think your file is controller.bas, so open controller.asm and look at line 101 and see what it is objecting to. I will play with your code when I get back to my own computer.
    EDIT: ok Tested and working with your code set for 4 mhz, as for the error, I get it too:
    Code:
     @ __CONFIG _CONFIG1, _XT_OSC & _WDT_ON & _LVP_OFF & _CP_OFF & _MCLR_ON
    Last edited by Archangel; - 3rd December 2008 at 09:22.
    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.

  7. #7
    Join Date
    Nov 2008
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    Hello, I use this :

    PICBASIC PRO(TM) Compiler 2.50
    MPASM V.5.2
    MPLAB 8.10.00.00
    MicroCode Studio Plus ver. 3.0.0.5
    Pickit2 Application Version : 2.55.01
    Device File Version : 1.53.00
    OS Firmware Version : 2.32.00

    the first's line of code:

    '************************************************* ***************
    '* Name : CONTROl.BAS *
    '* Author : Giorgio Rossi *
    '* Notice : Copyright (c) 2008 Invento S.r.l. *
    '* : All Rights Reserved *
    '* Date : 02/12/2008 *
    '* Version : 1.0 *
    '* Notes : *
    '* : *
    '************************************************* ***************
    @ __CONFIG _CONFIG1, _XT_OSC & _WDT_ON & _LVP_OFF & _CP_OFF & _MCLR_ON
    INCLUDE "MODEDEFS.BAS"

    ----- snip

    MicroCode Studio Plus Error :
    Error [118] c:\invento\control.asm 469 : Overwriting previus address contents (2007)

    Line [118] :
    _MCSBankEnd EQU MCSByte5

    Thanks
    giorgio
    Attached Files Attached Files

Similar Threads

  1. using pbp pro with mplab and pickit2
    By rackflot in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th January 2010, 15:17
  2. Trouble with PIC16F88 (chip hangs up)
    By nobner in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 20th January 2009, 09:23
  3. ADC trouble with PIC16F88
    By inventosrl in forum mel PIC BASIC
    Replies: 9
    Last Post: - 3rd December 2008, 12:56
  4. Replies: 8
    Last Post: - 7th December 2006, 15:42
  5. Need help converting to PB Pro from Mbasic Pro
    By tcbcats in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 11th February 2004, 07:43

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