Moving from Basic Stamp and MIKROE basic to PicBasic PRO


Closed Thread
Results 1 to 40 of 41

Hybrid View

  1. #1
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Moving from Basic Stamp and MIKROE basic to PicBasic PRO

    Hey CURIOUSONE, If you are expecting the compiler to know what you are thinking then GOOD LUCK... Find me one that does....If you are so courious then read the data sheet. It's not like an Android cell phone everyone has where all you do is touch the screen and all your prayers are answered with someone elses code efforts. YOU have to do some of the work by reading the documentation. I get the bigest kick out of some of the people here on the forum asking for code already written for them, instead of doing the work them selfs. There is nothing wrong with asking questions but don't dis the compiler because you don't want to do any work on your own.
    Dave Purola,
    N8NTA
    EN82fn

  2. #2
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: Moving from Basic Stamp and MIKROE basic to PicBasic PRO

    Compiler may not known, but there are certain things, like ergonomics and usability, and this is where compiler's authors failed. In case of basic stamp, you need to press only one(!) button to let software know which chip you're using, and it will take care, not allowing you to put in the commands that aren't supported by selected chip and so on. This is so hard to implement? even for 250 chips? OK, maybe not 250 buttons, but some panel of choices, where you put checkmarks next to required clock speed, oscillator type, direction of ports and so on.

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Moving from Basic Stamp and MIKROE basic to PicBasic PRO

    I'll see if I can get a 16F628(A) with internal oscillator going tonight, provided I get the time.

    IMO, once you start locking yourself in with graphical configuration etc you loose much the flexibility.

    The compiler isn't invoked until you actually compile the program. You can write the word ADCIN in a program for a chip that doesn't have an ADC but the compiler will complain once you actually pass that program TO the compiler. It doesn't know if/what you might have done until you actually give it the file to compile.

    Like I said in the my previous post, use the defaults and you're good to go.
    The HIGH/LOW commands automatically sets the pin to output, the BUTTON, RCTIME, PULSIN etc automatically sets the pin to input. Same as on the stamps - you don't need to worry about it. The one thing you NEED to worry about is when using a pin which have an analog function - that's pretty much it.

    Why don't you need to worry about the analog input pins on the BasicStamps? That's right because they don't even HAVE an ADC or hardware comparator. If YOU choose a PIC which doesn't have ADC or hardware comparator then you don't need to worry about it either - simple as that. If YOU select a PIC with a boatload of features YOU configure them the way you want.

    It looks to me like you're doing everything you can to make it harder than it really is.

    /Henrik.

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Moving from Basic Stamp and MIKROE basic to PicBasic PRO

    It is curious to see how one ping pongs across the different boards and how the story unfolds differently in different places.

  5. #5
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default Re: Moving from Basic Stamp and MIKROE basic to PicBasic PRO

    Quote Originally Posted by TinkersALotV2 View Post
    It is curious to see how one ping pongs across the different boards and how the story unfolds differently in different places.
    ... and quite entertaining.
    Why pay for overpriced toys when you can have
    professional grade tools for FREE!!!

  6. #6
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: Moving from Basic Stamp and MIKROE basic to PicBasic PRO

    Yes, I specially re-used same nickname on 3 different forums, to make tracking easier.

    So far, parallax one being the best one


    p.s. I got code compiled and running.

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: Moving from Basic Stamp and MIKROE basic to PicBasic PRO

    Quote Originally Posted by CuriousOne View Post
    p.s. I got code compiled and running.
    that sounds like solid progress. congratulations.

  8. #8
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Moving from Basic Stamp and MIKROE basic to PicBasic PRO

    Hi,
    I didn't have a 16F628A only a non A-version but I don't think the differences matters here (they are covered in Appendix C of the datasheet).
    First take a look at the schematic:

    Name:  16F628-setup.JPG
Views: 2842
Size:  27.3 KB

    With the above setup I wrote a short program, no more no less than:
    Code:
    Main:
      Toggle PortB.0
      Pause 250
    Goto Main
    I programmed the PIC and the LED blinked at 2Hz - it really can't get easier than that IMO and it certainly isn't harder than on a BasicStamp. It works because I built the hardware to match the default setup, ie using an external 4MHz x-tal.

    Next thing I did was open up the .info file for the device and copied the default configuration from where it says The PBP default configuration for the PIC16F628 is: and pasted that into my program. I then read thru the available options and decided that I want to use the internal oscillator without feeding the clock out and use internal MCLR so I changed my program to:
    Code:
    #CONFIG
        __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _LVP_OFF & _CP_OFF
    #ENDCONFIG
    
    Main:
      Toggle PortB.0
      Pause 250
    Goto Main
    I removed the pullup on MCLR and the x-tal, programmed the PIC and the LED blinked with a frequency of 2Hz - as expected. All I have on the breadboard is a bypass cap, a 16F628, a resistor and a LED.

    /Henrik.

Similar Threads

  1. Pic Basic pro code Compiling help!
    By JeromyJones in forum mel PIC BASIC
    Replies: 3
    Last Post: - 20th February 2013, 13:14
  2. Yet another SERIN2 problem - Conversion from Basic Stamp
    By Fanias in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 24th October 2012, 07:08
  3. PicBasic Pro to Basic Stamp conversion?
    By Kirk Fraser in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th March 2011, 06:49
  4. Basic Stamp BS2 replacement?
    By tenaja in forum Schematics
    Replies: 5
    Last Post: - 17th November 2009, 17:27
  5. Basic Question about PICBASIC
    By zonkwilliams in forum General
    Replies: 1
    Last Post: - 10th March 2005, 21:55

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