PIC related Website

General discussion on mikroPascal PRO for dsPIC30/33 and PIC24.
Author
Message
Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: PIC related Website

#61 Post by Dany » 26 Jun 2013 17:55

Hi, a new library has been added to LibStock (http://www.libstock.com/projects/view/722/c-rtos) and the website (http://www.rosseeld.be/DRO/PIC/index.htm#crtos_units):

CRTOS for mikroPascal and mikroBasic.

At this moment it is only available for PIC24. (tested P24FJ64GA002 and MMB for P24EF).

Documentation:http://www.rosseeld.be/DRO/PIC/CRTOS.pdf

Attention for package (.mpkg) users: after installing the package please copy all "*.inc" files from the directory C:\Users\Public\Documents\Mikroelektronika\mikroPascal PRO for dsPIC\Packages\CRTOS_PIC24\examples\CRTOS include files to the directory C:\Users\Public\Documents\Mikroelektronika\mikroPascal PRO for dsPIC\Packages\CRTOS_PIC24\Uses (windows 8 example given).

This RTOS is a Cooperative Real Time Operating System designed for and written specifically in mikroPascal from mikroElektronika. The system uses cooperative as opposed to pre-emptive scheduling which means that the application code you write has to voluntarily release back to the operating system at appropriate times.

Writing code for a RTOS requires a different mindset from that used when writing a single threaded
application. However, once you have come to terms with this approach you will find that quite complex real time systems can be developed quickly using the services of the operating system.

A cooperative operating system is the simplest one imaginable. The tasks running under this type of RTOS are not interrupted by the RTOS to give execution time to another task (as with the preemptive Real Time OS), instead, tasks always have to hand back control to the operating system (i.e.“yield” to the operating system) before the CRTOS gives execution to another task.

So, simple enough. This means however that each single task must yield to the OS in an acceptable time. If a task is too time consuming then it has to be split up in several subtasks, each with an acceptable yield time. Hence the term cooperative: the tasks have to cooperate to make things work well.

The whole library is targeted at the P24 series of MPUs. It is written in mikroPascal, so changes should be easy to implement.

CRTOS supports the following features:
  • Task priorities
    Unconditional yielding to the CRTOS Scheduler
    Timed yielding to the CRTOS Scheduler (i.e. “delay” performed by the Scheduler)
    Binary semaphores
    Counting semaphores
    Waiting for semaphores with or without timeout
    Starting and stopping tasks
    Signaling semaphores from within an Interrupt Service Routine
Limitations:
  • Tasks can NOT have local variables (at least not if their values have to be preserved between invocations)
Have fun!


Acknowledgement:

The specification of CRTOS is derived from PRTOS which was written by John Barrat (JohnGB) in PDS Basic. Also some parts of text in the documentation are extracted (and are sometimes adapted) from the document “PRTOS, Real Time Operating System for Proton Development System” written by John Barrat.

John also contributed a lot to the development of the library, test projects and examples. Thanks John!
Last edited by Dany on 07 May 2015 19:24, edited 2 times in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: PIC related Website

#62 Post by Dany » 02 Sep 2013 19:34

Ref: previous post (http://www.mikroe.com/forum/viewtopic.p ... 99#p216884).

There is a new version of CRTOS: v2.0, see LibStock (http://www.libstock.com/projects/view/722/c-rtos).

The functionality did not change. The change is in the saved context per task: this is now W0..W14, PSVPAG, TBLPAG, RCOUT, PCH and PCL (was earlier W8..W14, PCH and PCL).

This makes CRTOS more robust.

Have fun! :D
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: PIC related Website

#63 Post by Dany » 18 Nov 2013 18:59

Hi, the libraries "TempSensors" (http://www.libstock.com/projects/view/104/tempsensors) and "OW_Utilities" (http://www.libstock.com/projects/view/823/ow-utilities) are now available for PIC24 also.

Have fun. :D
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: PIC related Website

#64 Post by Dany » 16 Mar 2014 22:17

Hi all,
the "StateMachine" libraries in package "Schedulers" (http://www.libstock.com/projects/view/103/schedulers) has been upgraded with the "AnyState" as "fromstate" possibilty in the transition table. Can be used e.g. in case of an alarm state which needs the same reaction in every possible state.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: PIC related Website

#65 Post by Dany » 18 Apr 2014 19:49

Hi, a new tool has been added to LibStock: the "Project Configuration in text Format tool, StandAlone version", see http://www.libstock.com/projects/view/9 ... ne-version.

It enables you to translate any config (.cfg) file from a PIC, dsPIC/PIC24 or PIC32 project (provided one of the compilers has been installed for the MCU type) to "human readable" text.

In many cases only the project code is added to e.g. a forum post, but the configuration of the MCU is at least as important. Many projects do not work because the configuration is wrong. The only possibility to show a project's configuration currently is a screen shot of the IDE's "Edit Project" menu. This is not very user friendly.
With this tool it becomes possible to add the configuration to e.g. a forum post as a text.


The tool also exists in an IDE based version, see http://www.libstock.com/projects/view/4 ... ext-format.

Screenshot:
Image
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: PIC related Website

#66 Post by Dany » 30 May 2014 16:41

Hi,

The LM35 library has been added to the TempSensors package, see http://www.libstock.com/projects/view/104/tempsensors.
No float calculations have been used in the conversion routines, so the code is more code size effective than usually in this type of calculations.
A special version of the conversion routine, even cheaper in code size, is provided for one special case: 5V ADC Vref and 1024 ADC steps.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: PIC related Website

#67 Post by Dany » 21 Aug 2023 19:42

Unfortunately I had to give up my website, but the code that was there should also be available in Libstock.
See you.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

chimimic
Posts: 178
Joined: 29 Sep 2007 14:35
Location: France
Contact:

Re: PIC related Website

#68 Post by chimimic » 13 Dec 2023 22:27

Again, thank you Dany for all your work !
Remy

Post Reply

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