mikro media examples not working

General discussion on mikroBasic PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
dltnc
Posts: 3
Joined: 11 Jan 2013 07:17

mikro media examples not working

#1 Post by dltnc » 12 Jan 2013 09:55

Hi,

I have the MikroMedia 33EP kit with Vtft (2.7.1.0) and MikroBasic Pro for Dspic (v5.8.1) with the USB keys and the mm workstation v7.

I can get all of the example hex files to work properly. I can get a simple vtft project to work no problem. For example if all I put in it is one checkbox controlling an L.E.D. on the WorkStation it works fine. But if I put two controls on screen1 then the MikroMedia just continues to reset. The screen keeps flashing about every other second. The same happens if all I do is load any example project in MikroBasic and load the P33EP512MU810_PLL.cfgsch scheme then compile and program the chip. No different if I load the project in Vtft and then to MikroBasic.

I am sure that I am missing something. I have been using Mikroe Basic for Dspic at work for 4 or 5 years now and it has been great to have. I have the BSP workstation library for 33EP installed and all the libraries checked to be sure. I have been trying everything I can think of for several hours over the last week and a half but no luck.

If someone could please point me in the right direction I would appreciate it very much.

I think I will try my laptop computer next. I would be surprised if it was my desktop causing it somehow.

Using the debugger it appears that RCON.15 is set = Trap conflict but no other bits are set in rcon or any of the interrupt registers except the globals bit.

If you need more info let me know. I would like to get this solved as I have a lot of playing :D to do so I can design a board around a 33EP chip.

Thanks,

Daniel

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: mikro media examples not working

#2 Post by janko.kaljevic » 14 Jan 2013 16:14

Hello,

This is strange behavior and I am willing to inspect it thoroughly.
Please if you can post here this project that reproduced this behavior on your side and I will examine it.

Best regards.

dltnc
Posts: 3
Joined: 11 Jan 2013 07:17

Re: mikro media examples not working

#3 Post by dltnc » 15 Jan 2013 09:22

Hi,

It appears that I can't write to trisA, B, C, D, F but I can write to G and E. If I try any of the first set then it just resets. I'm guessing I need to set some registers to get them to work.

I'm not sure where the best place to initialize all the registers is.

So in this project one checkbox is going to RD.0 and the other is going to RG.14. If I change the RD.0 to RG.13 then it works and both leds will toggle. Otherwise it just resets.

I tried it on my laptop and it does the same. Both of my computers are core I7 - win 7 - 64 bit if that makes any difference.

Thanks,

Daniel
Attachments
Testing_2_Code (2).zip
setting ports is just below the main: function.
(148.19 KiB) Downloaded 191 times

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: mikro media examples not working

#4 Post by janko.kaljevic » 16 Jan 2013 18:38

Hello,

Thanks for reporting.
I confirmed this behavior.

Only thing you need to do is to add following line at the beginning of main function.
You only need to add it once, because VTFT will not overwrite it.

Code: Select all

  main:
    TFT_Set_Default_Mode()
    Start_TP()
    ...
We will fix this for the next version of VisulaTFT Tool.

Best regards.

dltnc
Posts: 3
Joined: 11 Jan 2013 07:17

Re: mikro media examples not working

#5 Post by dltnc » 17 Jan 2013 04:03

Thanks Janko,

That did it. :D

Daniel

Post Reply

Return to “mikroBasic PRO for dsPIC30/33 and PIC24 General”