Help with upgrading from PIC Basic Compiler to PIC Basic PRO


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2006
    Posts
    19

    Default Help with upgrading from PIC Basic Compiler to PIC Basic PRO

    Hi There, I've just upgraded from PIC Basic Compiler to the PRO version due to the obvious limitations with the standard version. I had PBC working great until I ran out of code space etc. But now I cant seem to get even the simplest LED blinking program to run. Everything seems to compile just fine, yet no joy in flashing an LED. So before I start ripping my complicated circuits apart on my breadboard I thought I'd ask if there is anything really simple that I might be missing in the upgrade process. Can anyone spare some time for your newest newby?

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    The batteries are out in my crystal ball Erik. It would help if you could tell us what PIC you're using and post your super new and shiny blinky LED code... I need a laugh this morning....

  3. #3
    Join Date
    Jan 2006
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    Well, I'm using a 12F675 and heres one of several that haven't worked:

    CMCON = 7 ' Comparators OFF
    ANSEL = 0 ' A/D OFF
    loop: High GPIO.1 ' Turn on LED connected to PORTB.0
    Pause 500 ' Delay for .5 seconds

    Low GPIO.1 ' Turn off LED connected to PORTB.0
    Pause 500 ' Delay for .5 seconds

    Goto loop ' Go back to loop and blink LED forever
    End

  4. #4
    Join Date
    Jan 2006
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    PS: I forgot to change the comments regarding the port numbers. But I'm wondering about stuff like at the moment I'm running both PBC and PBP on the same computer and it doesn't seem to be a problem but maybe it is. I mean I'm obviously missing something at a basic level here, because all my PBCing was going just fine. Anyway, its getting late on this side of the panet and I'm burnt out from surfing so I'm going to bed. Catch you later, and thanks for any help/suggestions that might help get my LED's blinking again.

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Well, since you got a grown-up compiler, we might as well do things properly...

    Code:
    	'
    	'	PIC Defines
    	'	-----------
    	@ DEVICE pic12F675, INTRC_OSC_NOCLKOUT
    		' System Clock Options (Internal)	
    	@ DEVICE pic12F675, WDT_ON
    		' Watchdog Timer
    	@ DEVICE pic12F675, PWRT_ON
    		' Power-On Timer
    	@ DEVICE pic12F675, MCLR_OFF
    		' Master Clear Options (Internal)
    	@ DEVICE pic12F675, BOD_ON
    		' Brown-Out Detect
    	@ DEVICE pic12F675, CPD_OFF
    		' Data Memory Code Protect
    	@ DEVICE pic12F675, PROTECT_OFF
    		' Program Code Protection
    	'
    	'	Hardware Defines
    	'	----------------
    	LED var GPIO.1
    	'
    	'	Initialise PIC
    	'	--------------
    	TRISIO=%00001000	' All Output except GPIO.3
    	CMCON=%00000111 	' Disable Comparators
    	ANSEL=%00000000 	' Disable ADC	
    	'
    	'	Let's do Blinky Thing...
    	'	------------------------
    Start:
    	Toggle LED
    	Goto Start
    
    	end
    Compile using the command line...

    PBP -p12F675 myprog -v

    Then if you want to be exotic with your 12F675 download yankeedoodle from here...

    http://www.picbasic.co.uk/forum/showthread.php?t=64

  6. #6
    Join Date
    Jan 2006
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    Thanks for your help, It looks like I was neglecting the defines (I was setting the fuses with my programmer, but they were obviously getting over-written). It looks like the reason all my stuff was running on PBC was that the INC file didn't turn MCLR on where as my new grown up compiler uses an INC file which turns it on (hmmmm). Anyway, now I am ready to seriously blink some LED's also thanks for the sound tables that was going to be my next question.

Similar Threads

  1. Looking at pic basic pro symbol values in mplab 8.15a simulator
    By ukemigrant in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 16th May 2009, 13:18
  2. PIC BASIC Compiler for ARM machines?
    By stone20008 in forum General
    Replies: 2
    Last Post: - 22nd August 2008, 07:14
  3. PIC BASIC or PIC BASIC PRO
    By kirkmans in forum USB
    Replies: 3
    Last Post: - 20th April 2007, 00:52
  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. PIC Basic Pro Compiler
    By iclok in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 25th November 2005, 03:22

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