Demos for Mikromedia 18FK not running

Post Reply
Author
Message
oliverb
Posts: 570
Joined: 24 May 2007 15:09

Demos for Mikromedia 18FK not running

#1 Post by oliverb » 22 Sep 2019 15:11

So I obtained the file: 2569_mikromedia_for_pic18fk___examples_v1.0.0.0.zip from libstock.

Straight away things looked a bit odd as the zip file contains a rar file. I've unpacked that into a folder. I've since realised I could have obtained the "rar" directly and saved some messy file unpacking. Alternatively 7zip seems good at handling nested archives.

So far I've tried the hex files for TFT, Touchpanel and Accel

TFT and Touchpanel appear to work. Accel just gave a blank screen.

On recompiling with MikroC 7.5.0 the TFT and Touchpanel demos no longer worked, TFT just displayed green, no owl. Touchpanel got as far as the "calibrate" function but no calculator.

I deleted my recompile and unpacked the libstock file again, and the TFT and Touch demos worked again.

I haven't tried building my own project as the project options currently only show the Mikromedia PIC18F-J version not the PIC18F-K. I believe there's a file I need to import to add the missing profile?

I have just tried downgrading to version 7.0 and I am having some success getting demos to run, however I have a problem with projects as attempting to export the calculator project to another folder left it nonfunctional, however saving the configuration scheme and loading it into the copy appears to have fixed it.

OK so tried Accel_Test, seems like it initialises the wrong controller?

Code: Select all

  TFT_Set_Default_Mode();
  //TFT_Init_ST7789V_8bit(320, 240);
  TFT_Init_ILI9341_8bit(320, 240);
  // Initialize I2C communication
Update: Well the accelerometer demo seems to work in 7.5.0 Well apart from a math glitch where values close to zero sometimes throw up large offsets. But it works.

The calculator demo still doesn't run when recompiled.

User avatar
petar.suknjaja
mikroElektronika team
Posts: 683
Joined: 05 Mar 2018 09:44
Location: Belgrade

Re: Demos for Mikromedia 18FK not running

#2 Post by petar.suknjaja » 30 Sep 2019 07:28

Hi,
There were two different revisions of the mikromedia for PIC18FK - one having the ST7789V and another one ILI9341.
What hardware revision of the mikromedia 18FK do you have?
Have you tried to load the correct oscillator scheme in the Edit Project?

Kind regards,
Petar

oliverb
Posts: 570
Joined: 24 May 2007 15:09

Re: Demos for Mikromedia 18FK not running

#3 Post by oliverb » 30 Sep 2019 10:56

Evidence would suggest it is the ILI9341 one, since changing the initialisation to that seemed to fix it. I found the post about the oscillator afterwards, so it is possible that the oscillator configuration had been reverted to an invalid one. I'm guessing the ST7789V might be the newer one since support wasn't in version 7.0 of MC.

Looks like I've been sold old stock ... thanks Farnell!!

The "libstock" calculator demo worked when compiled under 7.0, but not under 7.5. It also appears to be missing the screen definitions so it isn't possible to edit the screens in VTFT.

Further update: I examined the demo obtained from Libstock, and it does specify the right controller. Using debug it was found to loop endlessly at "drawscreen". The most striking difference between the broken and working calculator versions was that the broken one puts object definitions in RAM, the newer working one puts them in ROM.

Post Reply

Return to “Mikromedia”