We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: Stevan Tosic
Last Updated: 2018-07-02
Package Version: 1.0.0.0
Category: Graphics & LCD
Downloaded: 238 times
Not followed.
License: MIT license
This is really old project for BigPIC5 (PIC 18F8520). Event library used here is written in pure C code which means that can be ported to any processor with minimal effort. Parallelism is achieved by event driven programming (timers is special kind of events).
See on https://www.youtube.com/watch?v=YCW8Hi3Fmok
Do you want to subscribe in order to receive notifications regarding "GLCD parallel programming with events and timers" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "GLCD parallel programming with events and timers" changes.
Do you want to report abuse regarding "GLCD parallel programming with events and timers".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
1530507265_glcd_parallel_pr_mikroc_pic.zip [354.19KB] | mikroC PRO for PIC |
|
Event library used her for PIC is pure C code which means that can be ported to any processor with minimal effort. Events can be pulsed from interrupt routine (EventIPulse function) to the events queue and further processed by function Check_EDT in the main loop. Visual GLCD was used in the beginning but later I prefer manual coding. Timers are used to generate (pulse) other events (by EventPulse function).
I have been sucessfully tested EDT code with AVR, ARM, Arduino, Dev C etc. When I do library code more standardised and commented I will publish it.
Source code is not present now.
This example is not suited well for learning, but I would show that BigPIC 5 can drive parallel "tasks" (with his periferals) with high load using events.
Pattern used here is "reminder" which means that event pulse itself in the events queue and micocontroller is put under high working pressure. This way there is no blocking in the program.
GLCD area description:
Left side:
Timer0 0
Timer1 1
AN2 2
AN4 3
Idle 4
USART 5
Progress bar (no special purpose) (reminder)
Real-time clock (reminder + simple state machine)
Right side:
Sinus view/hide area (reminder)
On/Off ellipse and moving quad (reminder)
Project files:
glcdtimers_driver
glcdtimers_eventscode
glcdtimers_main
EDT.mcl
Idle function can be very usefull when there is no events in the queue (for example, enter in sleep mode). "Idle" also shows intensity of event queue load.
In the file EDT.h there are function protoypes and structure definitions.