TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139262 times)
  2. FAT32 Library (71751 times)
  3. Network Ethernet Library (57124 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43090 times)
  6. FT800 Library (42404 times)
  7. GSM click (29835 times)
  8. mikroSDK (28079 times)
  9. PID Library (26885 times)
  10. microSD click (26198 times)
Libstock prefers package manager

Package Manager

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]

< Back
Visual TFT/GLCD Project

GLCD parallel programming with events and timers

Rating:

0

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

No Abuse Reported

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".

  • Information
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Visual TFT/GLCD Project Blog

BigPIC5-1

BigPIC5-1

Start screen

View full image
BigPIC5-2

BigPIC5-2

Working screen

View full image

GLCD

User interface (timers, AD converters, UART, Idle counter, RTC).

Watch on YouTube

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.

ALSO FROM THIS AUTHOR

Simple multitasking driven by state machine

0

State machine programming style and task functions are used to implement tasks running through their states. There are versions of code with or without timer interrupt (Multitasking.c and MultitaskingNoInterrupts.c). Code is portable to any uC.

[Learn More]

RTOS for PIC 18F

4

Simple RTOS working in round-robin way with 1ms task switching. Number of tasks is five. Stacks size are configurable. Semaphores and timers examples are presented. Tasks progress is indicated by led blinking,

[Learn More]

Multi Timers using Event driven programming for PIC 18F8520

9

How to use Multi Timers for PIC 18F8520 in easy and user friendly way with additional library.

[Learn More]