Moving from Basic Stamp and MIKROE basic to PicBasic PRO


Closed Thread
Results 1 to 40 of 41

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,078

    Default Moving from Basic Stamp and MIKROE basic to PicBasic PRO

    Hello.

    I'm not entirely sure whenever this is the right place to ask my questions, but I'll give a try.

    I do some electronics gadget, for which I needed simple automation tasks - say sent defined number of pulses over certain amount of time, get data from RTC and log specific voltages for some time and so on.

    I wanted simpler and easier solution, so I checked online and selected parallax basic stamp. While I liked the documentation, guides and ease of use, I don't liked a price I have to pay, to integrate basic stamp solution in my project. I don't need propeller, basic stamp is enough for me, but I needed CHEAPER solution. So this is why I decided to go to more advanced level. I googled further and found MIKROE website. All descriptions and things looked great, so I bought their PIC KIT (includes manuals, easy pic board v.7, usb dongle, lcd screens, etc). When it all arrived, I shortly found out that it was just glittery paper - documentation incomplete, proto board of very low quality, support very agressive and anti-customer oriented. So, I decided to give up with MIKROE and look for something different.

    PIC BASIC Pro appears to be promising, but I have a couple of questions, answers for which I hope to receive here:

    Can I use Easy Pic v.7 development board (programmer, hardware, incd debugger) with pic basic pro ?

    As I can guess from sample code provided with trial of picbasic pro, the syntax is quite limited, compared to basic stamp, and for each MCU used, you have to know and remember names of all registers, output-input ports, mode of ports and so on. So, for example when with basic stamp you say simply type text like PORT(X)=1 and it will set port #1 high, regardless of MCU used, here you can't do the same, you have first to know which MCU uses which naming for ports, and then use the command?

    Also, in basic stamp, you knew which stamp was able doing which command. Here, you have no data, right? for example, I'm pretty sure, 16F628 and 18F455 are totally different and 455 can do much more than 628 do, right?

    Thanks in advance,

    Alex

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

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

    Hi Alex,
    Welcome to the forum.
    I haven't tried MikroE's compilers but I have used a couple of their development boards and have found them to be of very high quallity, especially concidering the price. I currently have a EasyPIC7 which I upgraded to from am EasyPIC4 but I haven't used it much yet. I also have a PICPLC16 which I've used extensively and a couple of other small boards. Anyway...
    Can I use Easy Pic v.7 development board (programmer, hardware, incd debugger) with pic basic pro ?
    You can definitely use the board and the onboard programmer with its software to program the .hex files produced by PBP into the PIC you place on the board. It'll be a two step process though, first you compile the program, then you load the .hex file into the programmer software and program the PIC. Unfortunatley they don't provide a command line interface for their programmer so it can be "run" from within MicrocodeStudio (which is the "standard" IDE for PBP). The debugger however is tightly integrated into their IDE and their IDE is tightly coupled to their compilers so you can't use PBP with it. So, the board and the programmer will work just fine with PBP, the debugger will not.

    As I can guess from sample code provided with trial of picbasic pro, the syntax is quite limited, compared to basic stamp, and for each MCU used, you have to know and remember names of all registers, output-input ports, mode of ports and so on. So, for example when with basic stamp you say simply type text like PORT(X)=1 and it will set port #1 high, regardless of MCU used, here you can't do the same, you have first to know which MCU uses which naming for ports, and then use the command?
    That's because there's only a couple of BASICStamps while there are hundreds of PICs and PBP support all of them (all 8-bit ones that is). There is a file which you can include in your PBP source file that gives you the same names as the ones used in the BS2 for example. That may be convenient at first but really only limits you once you start getting into it. It's not that hard really, and naming conventions across chips and even families of chips are all the same. Ports are named PortA, PortB, PortC etc (except for some smaller PICs where they are called GPIO) and the Microchip datasheets are great. So, as long as the PIC has a PortB, you'll do PortB.0 = 1 to set bit 0 of of PortB high, regardless of the PIC just as with the BasicStamp.

    Also, in basic stamp, you knew which stamp was able doing which command. Here, you have no data, right? for example, I'm pretty sure, 16F628 and 18F455 are totally different and 455 can do much more than 628 do, right?
    In generall all PICs can do all commands. There are of course exceptions and they are the commands which uses hardware peripherals of the PIC. For example the USB commands obviously won't work on a PIC that doesn't have a USB peripheral, the HSEROUT command won't work on a PIC which doesn't have a USART, the ADCIN command won't work on a PIC that doesn't have an ADC and so on. Compiling a list of that would be an absolute monumental task and new PICs gets added to the Microchip line up "all the time".

    I hope that clears some of your questions up.

    /Henrik.

  3. #3
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

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

    Thanks Henrik, your information really was helpful. Now I'm reading pic basic pro manual, hope it will clear another set of questions I already have

    Regarding the easy pic v7 board, my specimen has the following problems:

    1. Included LCD module (especially 2x16 one) is very low contrast and no backlight - almost invisible daytime.
    2. The handle of pot for lcd contrast adjustment broke off (no, I'm not beginner with electronics, I'm doing consumer equipment repairs for last 20 years)
    3. A lot of jumpers when I lift them up, break.
    4. Power supply part produces loud whinning noise.
    5. The board manual says "it supports more than 250 microcontrollers of pic family" but does not specifies which ones are supported!
    6. There is no information on specific jumper setting per specific MCU. I had to use google, which helped in case of PIC16F84A (someone already had that problem and asked them online) and I had to use guesswork in case of 16F628A.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

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

    Oh, one that actually reads the manual, I'm sure you'll do great with PBP!
    There are always helpful people around here if/when a question pops up, then of course you have the support from MELABS if needed.

    The list of supported devices for the EASYPIC7 is on the product webpage. As the board supports over 250 different controllers having a list of the jumper settings for each one would IMO be kind of crazy if you ask me. But in general I agree, their documentation LOOKS great but the details are missing an many cases.

    Anyway, I have a board here and I need to get familiar with it. If you have a question fire away and I'll see if I can figure it out.

    Now, get back to RTFM ;-)

    /Henrik.

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

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

    Quote Originally Posted by CuriousOne View Post
    so I bought their PIC KIT (includes manuals, easy pic board v.7, usb dongle, lcd screens, etc). When it all arrived, I shortly found out that it was just glittery paper - documentation incomplete, proto board of very low quality, support very agressive and anti-customer oriented. So, I decided to give up with MIKROE and look for something different.

    Alex
    Hi, Alex

    I think you're pretty UNfair here ... :

    I have been using an Easypic 5 plus an EasyDSPic 6 for years, and compile my programs with either PicbasicPro, MikroC, CCS C, MikroBasic, Flowcode or "simply" use assembler ...
    I will add MikroE docs are within the best I never saw in our little world ... and their compilers help section a real example !!!

    from your post, I just see you do not like too much to read datasheets or Owner's manuals ...

    Halas, without accepting such effort ... you won't go very far !

    for the quality of those boards ... That's right they are low priced, but quality is more than what needed for those developement tools : just compare it to the similar tools sold from china and you will understand you're just angry not having got a " work by itself " tool ...

    Once more, the solution is in your eyes and in your brain ... ONCE you've decided to read the docs ( yes, thousands of pages ! )

    Idiotproof Self programming tools do not exist to the day ... whatever advertisements have promised you ...


    Alain
    Last edited by Acetronics2; - 24th February 2013 at 17:09.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

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

    Yes, it seems that MIKROE hired a great designer/publisher, which prepared sleek, harmonized set of papers, which actually are unusable. For example, their reference book has black bold letters for main text, but code samples are given with thin CYAN color letters on YELLOW background - almost unreadable. I had to learn quite much in document editing, to change colors in that file before printing.

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    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

    For example, their reference book has black bold letters for main text, but code samples are given with thin CYAN color letters on YELLOW background - almost unreadable.
    Could you give a link to what you're talking about???

    I didn't see anything looking to what you describe here ... for EasyPic 7 board.

    Considering the Mk Basic Pro reference Manual ... I find there such colors, but have no difficulties to read it on my screen.

    Printing it on a monochrome Black laser printer could be somewhat difficult to read ... Ok, but it's not THEIR problem, just YOURS ...
    I already asked them for a paper manual ... ( yes, I did !!! ). The answer was ... " if enough people is Ok to pay for postage and printing, we'll do it ... "

    Will you ???

    I gave the .pdf file to my local print shop ( where students have their school end-of-year-reports printed @ low rates ...), and it didn't cost me too much to get a nice - in colours - book for Mk C.

    a " no cost " solution (!) is obviously to hit the " HELP " button of the compiler or further to download the example projects from here: http://www.libstock.com/

    Yess ... once more "RTFM" ...

    Browsing their site ... you could have found: http://www.mikroe.com/products/view/...ming-in-basic/ also available as a printed book for 24 $ ...

    ...

    @Henrik

    But in general I agree, their documentation LOOKS great but the details are missing an many cases
    you're forgetting here they have a really great forum with numerous " official " guys to answer the details missing.
    YES ! I do agree the only question never answered is " when will Mk xxx compiler/IDE be bugless released " ...

    Alain
    Last edited by Acetronics2; - 24th February 2013 at 19:37.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  8. #8
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

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

    You don't see that does not neceserily means that it does not exist.

    Yes, I also downloaded and printed in color, but it still looks weird. Why no other publishers choose to use suchk peacock-tail style colors?

    and of yes, their forum is "great". When you ask, general answer will be "read the documentation", even if you ask totally different things.

    Releasing poorly documented hardware is another "high standard".

    What makes me especially funny, this is how they give their contact address here: http://www.mikroe.com/visitor_contacts/
    Belgrade, EUROPE.
    Without specifying the country, Serbia. They are ashamed to be Serbians?

    I think it'll be better to finish mikroe discussion now. If anyone interested, I can sell the easy pic v7, usb dongle and everything which came with picbasic kit for half of it's retail price (I will even include the reference manual printed in color and assembled as book).

    Regarding the microbasic pro, I've downloaded the trial version, and reading manual right now. I also have K149-BC PIC programmer which works just fine. So I'll use them together, without using mikroe board.

    The software cames with sample led blink code. And it has some specific settings, which you need to uncomment, before compiling. But, since I want to use PIC16F628A, I need a different config settings, as I guess. I've checked relevant datasheet, and that code to be working, instead of ANSEL = %00000000 I should use TRISB = %00000000
    right?
    Also, I set oscillator to XT type in fuses config in programmer, to use internal osc.

  9. #9
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

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

    Agreed on dropping the MikroE discussion, there's nothing more to be gained from it.
    I've checked relevant datasheet, and that code to be working, instead of ANSEL = %00000000 I should use TRISB = %00000000 right?
    Not quite. ANSEL is a register which controls if the pins should be used for analog or digital. TRIS is the register controling the "direction" of the pins, when the pins are set to digital thru the ANSEL register... Makes sense?

    The 16F628A doesn't have an ADC so there will be no ANSEL register to set but it does have a comparator module which may need to be configured properly, see the CMCON register.

    Also, I set oscillator to XT type in fuses config in programmer, to use internal osc.
    Nope, if you set it to XT it expects an external x-tal.

  10. #10
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

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

    Ok, so, as I guess, the code now should look like this:
    Code:
    Define OSC 4 ' 4MHz  'set internal osc to 4mhz
    CMCON=0  'turn comparator off
    VRCON=0 ' turn voltage reference off
    TRISB = %00000000  'set direction of port B pins
    LED    VAR  PORTB.0   ' Assign name "LED" to PORTB.0
    
    mainloop:
       High LED        ' Turn on LED connected to PORTB.0
       Pause 500       ' Delay for .5 seconds
    
       Low LED         ' Turn off LED connected to PORTB.0
       Pause 500       ' Delay for .5 seconds
    
       Goto mainloop   ' Go back to loop and blink LED forever
       
       End

  11. #11
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

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

    Just now noticed the post (why posts are in reverse order anyway) regarding me being UNFair.

    Ok, here below is the link to MIKROE forum, where you can read by yourself, what I asked (about what I was complaining) and what I received as answer.
    Also, other problems with their documentation are clearly shown in that thread with examples:

    http://www.mikroe.com/forum/viewtopi...198324#p198255

    (If anyone lazy to read, here's the problem. Imagine, you have MS word open, you have some document, did a little modification, and printed it. Amazingly you notice that "print" command also implies "save" command and your modified file was saved, overwriting the old one. Is this normal?)

    And by the way, no one asks about idiotproof, self-writing solutions.

    BASIC is considered to be high level languages, where one of the main characteristics of language is it's relatively high independence from actual hardware. But MIKROE does not thinks so. If I wanted to do in ASM, I can do it in ASM, but why then call it "BASIC" ?

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 : 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