A few 'exam-task' (mikroC PRO for PIC, later solutions too)

Discussion on projects that are created by users and posted on mikroElektronika website.
Post Reply
Author
Message
IstvanK
Posts: 166
Joined: 22 Feb 2013 12:28

A few 'exam-task' (mikroC PRO for PIC, later solutions too)

#1 Post by IstvanK » 09 Jul 2013 11:47

This year I gave to my students the following three programming task as the condition of 'graduation'.

They are free to choose from:

- a 8pin PIC port-expander (24 in and 24 out bits) with an LCD and a remote (serial) display.

- an RS232 controlled MMD circuit using a 8pin(!) PIC12F683, pixel scroll to left, to right.

- a PS2 keyboard controlled MMD circuit using a PIC16F628A.

Students may use only the free (2k) mikroC PRO v6, it is also enough. They were provided with all three Proteus projects (hex only), to specify the conditions (the expected properties). Gave and can be used my own libraries (such as the PS2 keyboard Simulator, the multi LCD or the multi SwUart, can be found also on LibStock, in binary form).


My basic level PIC programming course is approaching completion, therefore if interested, I can upload the well working Proteus projects (only with HEX firmware, have to understood :)), to try writing the program from scratch. Later I'll upload my own complete versions (not the solutions written by my students, since it is their intellectual property).

To inspire here's a screenshot of the first project what can be uploaded even tomorrow if interested. The rest still need to prepare for post, sorry, I'm working on it but only later.

Regards
IstvanK
Attachments
8pinPortExp.jpg
8pinPortExp.jpg (160.65 KiB) Viewed 11058 times

jayanthd
Posts: 630
Joined: 08 May 2013 18:31
Location: Bangalore

Re: A few 'exam-task' (mikroC PRO for PIC, later solutions t

#2 Post by jayanthd » 10 Jul 2013 14:03

IstvanK


zip and post all your Proteus file and hex files. I will try to implement it in mikroC. :)
[HW:] EasyPIC v7, mikroProg PIC, AVR, STM32, PSoC, Tiva, 8051
[SW:] mikroC PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroBasic PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroPascal PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
Visual GLCD, Visual TFT

IstvanK
Posts: 166
Joined: 22 Feb 2013 12:28

Re: A few 'exam-task' (mikroC PRO for PIC)

#3 Post by IstvanK » 10 Jul 2013 15:45

jayanthd wrote:I will try to implement it in mikroC. :)
Hi jayanthd;
Here's the above first task's well working Proteus hex-only project (attached in rar).

Meantime found the pictures of the other two tasks (also attached). Still looking for their DSN and hex files ...
An additional info for the MMD circuits: the scroll speed and direction is also stored in the Pic's Eeprom (used at next power-on).

Greets
Istvan
Attachments
8pin_MMD.jpg
8pin_MMD.jpg (151.06 KiB) Viewed 11021 times
628_MMD_sim.jpg
628_MMD_sim.jpg (161.13 KiB) Viewed 11021 times
8pinPortExp.rar
(171.88 KiB) Downloaded 463 times

jayanthd
Posts: 630
Joined: 08 May 2013 18:31
Location: Bangalore

Re: A few 'exam-task' (mikroC PRO for PIC)

#4 Post by jayanthd » 10 Jul 2013 19:02

Zuisti visits EDABoard and *******. Try finding the files there.
[HW:] EasyPIC v7, mikroProg PIC, AVR, STM32, PSoC, Tiva, 8051
[SW:] mikroC PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroBasic PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroPascal PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
Visual GLCD, Visual TFT

IstvanK
Posts: 166
Joined: 22 Feb 2013 12:28

Re: A few 'exam-task' (mikroC PRO for PIC)

#5 Post by IstvanK » 10 Jul 2013 19:54

jayanthd wrote:Zuisti visits EDABoard and *******. Try finding the files there.
Yes, I am there in other forums as well, and yes, on ******* too, but the looking files has not been uploaded anywhere, just what you can be see here too.

Otherwise, I found, and soon will upload them as well.

Thanks anyway
IstvanK (alias zuisti)

jayanthd
Posts: 630
Joined: 08 May 2013 18:31
Location: Bangalore

Re: A few 'exam-task' (mikroC PRO for PIC)

#6 Post by jayanthd » 11 Jul 2013 17:49

Here is one file from zuisti for LED MATRIX DISPLAY. Text can be sent from UART. I am modifying the code and creating three versions. One will get the display data from USB, another will get the data from XBee (Wireless Moving Display Board), and yet another will have a GSM modem and display data will be sent from SMS.

I am attaching Port Expander which I wrote. SPI and I2C versions. I will modify it and add 3 port expander chips so that there will be 16 X 3 = 48 I/O pins. Three Port Expander chips will be used as slaves and will have different addresses.
Last edited by jayanthd on 12 Jul 2013 18:30, edited 1 time in total.
[HW:] EasyPIC v7, mikroProg PIC, AVR, STM32, PSoC, Tiva, 8051
[SW:] mikroC PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroBasic PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroPascal PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
Visual GLCD, Visual TFT

IstvanK
Posts: 166
Joined: 22 Feb 2013 12:28

Re: A few 'exam-task' (mikroC PRO for PIC, later solutions t

#7 Post by IstvanK » 11 Jul 2013 22:13

Hi jayanthd;

First of all, thank you for your reaction to this topic. As you can see, this is unfortunately not a custom in this forum.

Also thank you for describing your plans here, and for sharing your projects based on the MCP23017.

But this topic is not about that, you have to understand !

I'm sorry, but the greatest respect I ask you to open an another (own) topic for your above uploaded files and their descriptions, then remove them from here. And .. I will be happy to answer there.

In particular, disruption of the "Using microPIC.rar" file, very beseech to remove it permanently:
These DSN files are not created by me. Although the 'test1.c' actually I wrote (very long ago), but it has long been obsolete, and it has been modified too. Otherwise not recommend to a further developing, since this is able only to character scroll (not by pixel). It was (in 2007) my first attempt in C language and the MMD topic.
So please remove it!

Thank you for your understanding.
IstvanK (zuisti)

jayanthd
Posts: 630
Joined: 08 May 2013 18:31
Location: Bangalore

Re: A few 'exam-task' (mikroC PRO for PIC, later solutions t

#8 Post by jayanthd » 12 Jul 2013 18:32

Ok. I have removed the files as requested. I will create a new thread and post the Port Expander files there.

Thank you
Jayanth D
[HW:] EasyPIC v7, mikroProg PIC, AVR, STM32, PSoC, Tiva, 8051
[SW:] mikroC PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroBasic PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroPascal PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
Visual GLCD, Visual TFT

IstvanK
Posts: 166
Joined: 22 Feb 2013 12:28

Re: A few 'exam-task' (mikroC PRO for PIC)

#9 Post by IstvanK » 18 Jul 2013 16:43

Here are all three tasks (the well working hex-only Proteus projects), attached in rar. See my first posts in this thread.

The first two task's main problem is of too few (five I/O and one input-only) PIC pins, but that is why they are also nice jobs.
The easiest task is the third, the PS/2 controlled MMD,"only" should be resolved the timings and to fit into this small (2k) PIC.

Some additional infos for the MMD circuits:

- the message lenght is min. 70 chars
- 'on the fly' settable the pixel by pixel scroll speed and direction; start-stop control
- the speed and direction is also stored in the Eeprom (used at the next power-on)
- the display refresh rate is min. 70 Hz (8pin, 8MHZ), min. 140 Hz (PS/2, 16 Mhz)

Note:
Also I know it's much easier to use the known custom VLSI circuits (for example the Microchip MCP23017 port-expander IC or the excellent Holtek HT1632C LED display controller/driver chip), and also complete solutions can be found on the net. However, this was not the goal but to learn the program writing from scratch. Therefore students have to write programs only for one of the three given DSN.

Thanks
IstvanK (zuisti)
Attachments
Course13_tasks.rar
(103.53 KiB) Downloaded 412 times

jayanthd
Posts: 630
Joined: 08 May 2013 18:31
Location: Bangalore

Re: A few 'exam-task' (mikroC PRO for PIC)

#10 Post by jayanthd » 20 Jul 2013 22:49

I was busy with some work. I will try to write C Code for the projects this week.
[HW:] EasyPIC v7, mikroProg PIC, AVR, STM32, PSoC, Tiva, 8051
[SW:] mikroC PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroBasic PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroPascal PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
Visual GLCD, Visual TFT

jayanthd
Posts: 630
Joined: 08 May 2013 18:31
Location: Bangalore

Re: A few 'exam-task' (mikroC PRO for PIC)

#11 Post by jayanthd » 28 Aug 2013 20:52

Hello Zuisti

I have a problem with 3 * 8X8 Matrix displays. Please have a look at this thread. http://www.edaboard.com/thread297350.html

Please provide a solution.
[HW:] EasyPIC v7, mikroProg PIC, AVR, STM32, PSoC, Tiva, 8051
[SW:] mikroC PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroBasic PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroPascal PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
Visual GLCD, Visual TFT

IstvanK
Posts: 166
Joined: 22 Feb 2013 12:28

Re: A few 'exam-task' (mikroC PRO for PIC, later solutions t

#12 Post by IstvanK » 29 Aug 2013 15:51

Hi jayanthd;

Answered that there.
Please do not link to other forums here.
Thanks
IstvanK

IstvanK
Posts: 166
Joined: 22 Feb 2013 12:28

Solution of the first task (8pinPortExp, PIC12F683)

#13 Post by IstvanK » 06 Sep 2013 15:17

Here is the (my) solution of the first task, the 8pinPortExp, see above. The two MMD programs (for some reasons, at request) remain unpublished yet. The full Proteus-only project is attached, the MikroC source too. Note this is just one of the possible solution, try to write your own program for the given DSN if you want.

The program uses the own libraries and (to avoid the 12f683 cof problem) my workaround too. See my previous posts here on this forum and on LibStock. The source does not as simple, a bit tricky, try to understand it. Since the Proteus project uses COF (not the hex file), you can debug it also at source level. To build apply pullups for any input switches and use the original MikroC PS2 Library (instead of my KbSim).
But - sorry - no any 'support', I don't have time now. This is an 'as-is' program.
Good luck.

Thanks
Istvan K.
Attachments
8pinPortExp_full.rar
(216.28 KiB) Downloaded 424 times

IstvanK
Posts: 166
Joined: 22 Feb 2013 12:28

Solution of my MMD tasks (MikroC v6.01, in case sensitive mo

#14 Post by IstvanK » 05 Nov 2017 00:27

My forgotted promise (I apologize) but now I post the full version of the two MMD tasks.
Each "Proteus-only" project is completed with its C source file(s) and the DSN.

8pin_MMD...rs232 (and CTS) controlled, using a 'virtual' PIC16F683 (due of the COF).
MMD_Ps2....PIC16F628A MMD circuit, controlled via real/emulated/simulated PS2 keyboard

Read more (and see the pictures) in my prev. posts in this topic.
But - sorry - no any 'support', I do not have time. These are 'as-is' projects.

Thanks
Istvan K
Attachments
MMDtasks_full.rar
(172.18 KiB) Downloaded 161 times

Post Reply

Return to “User Projects”