Adapting a PICAXE program to PBP, to program a PIC (compiler Errors)


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Adapting a PICAXE program to PBP, to program a PIC (compiler Errors)

    I switched to Picaxe (also programmable in Basic) and am now trying to adapt my Picaxe program to fit into a Pic12F629.
    a Pic12F629 has no adc module ADCIN Potar,PotADC is never going to fly use a Pic12F675

    also if you post code please put it in code tags Name:  Screenshot 2022-05-10 082543.jpg
Views: 494
Size:  68.0 KB

  2. #2
    Join Date
    Feb 2022
    Posts
    54


    Did you find this post helpful? Yes | No

    Default Re: Adapting a PICAXE program to PBP, to program a PIC (compiler Errors)

    Hi Richard,
    Thank you for your quick reply !
    I had indeed noticed this small difference between a 12F629 and a 675 and that's why I have these two components in stock!
    Inattention error !
    It's getting late !
    OK, the compiler doesn't give any more errors.

    For the code tags, I had searched in the multitude of icons, without success.
    I'll keep this in mind for the next few times.
    Good night.

    Sincerely

  3. #3
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Adapting a PICAXE program to PBP, to program a PIC (compiler Errors)

    It's been quite a few years since I played with PICAXE, but what I do remember is that to configure the TRIS Registers, with PICAXE an Output = 1, but with PBP an Output = 0; they're backwards.

    Second, with PBP you configure PORT related registers with the PORT -- TRISA = xx, ANSELA = xx... With PICAXE you have a generic PORT register that covers pretty much every PORT pin in one fell swoop (OUTPUT 0, INPUT 1, etc.). In other words, there may be some major changes you need to make to your code.

    I found when folks try to help me by handing me answers, I get past the immediate situation, even if I have no clue why the suggestion worked. When folks tell me where to find the answers myself, I can get past my current dilemma, but I then know where to look the next time I run into a challenge. May I suggest spending some quality time with the PBP3 Reference Manual, a free download from the ME Labs web site.

    My personal journey started with PICAXE about 11 years ago. After about 2 years I upgraded to PBP3. I've since plunged into the dark side with MPLABX. My advice is to download the PBP3 Reference Manual and spend time learning the PBP way of doing things.

  4. #4
    Join Date
    Feb 2022
    Posts
    54


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Adapting a PICAXE program to PBP, to program a PIC (compiler Errors)

    Hi MpgMike
    Indeed, there are several peculiarities to take into consideration when switching from Picaxe (or Basic Stamp) to a Pic.
    But they are well documented in the Reference Manual which I consult if necessary.

    I personally avoid using the registers that handle i/O and Directions.

    I write in clear text in my program, which is then very readable, definitions like this:
    Output 0 : Symbol LED = GPIO.0 'Led - pin7 - Out0

    In the case of my present application, it was a stupid error of inattention because, indeed, the Pic12F629 does not have an ADC contrary to the 12F675!
    This indeed caused incomprehensible compiler errors.

    Thanks.

Similar Threads

  1. Compiler (PBP v2.50C) errors
    By droptail in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 17th November 2021, 23:57
  2. 2 didit up down counter using 16F628A program errors
    By raybel in forum FAQ - Frequently Asked Questions
    Replies: 15
    Last Post: - 27th September 2020, 15:30
  3. Upgraded to PBP v2.60 and I can't program
    By FireHawk in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th May 2010, 16:55
  4. Replies: 1
    Last Post: - 23rd May 2009, 09:22
  5. In what order do we construct a PBP program?
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th October 2008, 08:18

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