PDA

View Full Version : Mikro Elektronika Basic and PBP



queenidog
- 22nd May 2013, 21:47
I started with PicBasic Pro (PBP) with a Lab X1 development system. Did a bunch of work with it and loved it. Then I discovered MikroElektronica development board, the EasyPicV7. Wow! Lots of neat stuff and a great development system. Lots of support, good tech support and help files and they make a number of "click boards" (like Arduino "shields") to really wet your appetite. I then bought their Basic Compiler which is good in a lot of ways but not as good as PBP in others. For example, one of the things I do most is write to LCDs in all my projects. PBP lets you configure the LCD with 6 commands, Mikro requires about 12. That's for initialization. To write to the LCD, PBP allows multiple statements on a line, eg lcdout $FE,$80, "Reset Ok". In Mikro Basic: lcd_cmd (_lcd_clear), then lcd_out (1,1, txt1), where txt 1 was your previously defined string. Oh, the string has to be declared as well, so if it contains 10 characters, you have to declare it as 10. If you use 11 characters, your text will NOT display and you won't get an error. Very rigid. I tried to get Mikro Basic to display variable values, which requires another command, whereas with PBP, you can add it to the same string (as in the example I gave).

The Button command works the same way. Easy in PBP, hard in MikroBasic. The way Mikro Basic handles interrupts is all convoluted and complicated and doesn't seem to work the way I think interrupts work. Yet, in PBP, it's all very, very intuitive and works EXACTLY like I expect it to work.

I was in the middle of converting code from PBP into MikroBasic so I could use the V7 board, but it just isn't worth the time, because of all the required structure and syntax, not to mention double the amount of code.

If you are a former C programmer and like the structure and strict rules of programming, go with MikroBasic but be prepared to write twice as much code.

Bottom line: PBP rocks! It is a super compiler. And you get a book too.

BobK
- 23rd May 2013, 02:01
Hi Queenidog,

I myself bought a V2 Development board from them and have had no problems running PBP programs on it. Are you saying that the V7 board won't allow PBP code to run on it? I even have used the PICFLASH programmer with Microcode Studio with no problems. Interesting feedback on their code. I bought their MikroBasic back when I bought the board but still have used PBP exclusively.

prstein
- 23rd May 2013, 02:04
I've only used MikroE Basic for 24-bit PICs but I agree with most of your sentiments. Working with serial, my primary means of communication, seems a lot more difficult than it ought to be. I will scrap it in a heartbeat when/if PBP begins supporting 24-bit PICs.

With all that said, is there any reason why PBP code can't work with the MikroE Basic on the V7 board?

Best Regards,
Paul

rmteo
- 23rd May 2013, 03:00
....If you are a former C programmer and like the structure and strict rules of programming, go with MikroBasic but be prepared to write twice as much code.

Bottom line: PBP rocks! It is a super compiler. And you get a book too.
You should post this on the mikroE forums as well to get a truly balanced view.

HenrikOlsson
- 23rd May 2013, 06:19
Hi,
Of course you can run PBP code on the EasyPIC7 board. The board and whatever PIC you put on it doesn't know the difference.
What you can't (obviously) do is use THEIR (MikroE's) integrated development environment and debugger, apart from that it works just fine. Write your code, compile and assemble with PBP/MPASM and use MikroE's programmer application to transfer the .hex file to the PIC on the board - no problems what so ever.

/Henrik.

queenidog
- 24th May 2013, 00:26
Henrik responded as I would have. Yes, you can use the Mikro board for development by sending the hex file (from the PBP compiler) to it. I have both systems on my desk and will use both. I was just trying to say that PBP is not necessarily a low-end compiler or language, that it surpasses compilers that are more sophisticated.

Think of it this way: the Volkswagen (PBP) will get you to the store just as quick as the Jaguar (Mikro Basic) where you can pick up the same groceries. Of course with the Jag you could pick up girls as well! If I was doing what I do for WORK, I would go with the more sophisticated, full featured, strict rules Mikro Basic, but for quick projects, nothing beats PBP.

Some of the reasons I purchased Mikro Basic is its support for long words, floating point calcs, documentation like photos, videos, text as part of the project, software simulator and project statistics.