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: Istvan K
Last Updated: 2014-01-02
Package Version: 4.0.0.0
Category: Other Codes
Downloaded: 3869 times
Not followed.
License: MIT license
* UPDATED * To try/debug (before the construction, in Proteus) such PIC programs that use the MikroC PS2 Library,
here is a solution. It uses the Proteus Virtual Terminal as input device. * UPDATED * Now for any PIC *
Do you want to subscribe in order to receive notifications regarding "PC keyboard in Proteus" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "PC keyboard in Proteus" changes.
Do you want to report abuse regarding "PC keyboard in Proteus".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
1388650403_pc_keyboard_in_p_mikroc_pic.rar [223.67KB] | mikroC PRO for PIC |
|
** UPDATED ** (02.01.2014, Happy New Year).
Separated libraries for the three families (pic12/16, pic12/16_Enh and pic18).
Heavily hand-optimized for speed, and to minimize the code size, stack and ram usage.
The Ps2_Key_Read_ND (no keyname display) function is also added for time-critical applications.
The example projects (see below) are also actualized.
--------------
Simply this library (named as "p*_KbSim.mcl", see the new description) must be used while the original must be omitted, then recompile the project. Big advantage of the MikroC solution (and mine too) is that not interrupt driven, so any two I/O pins can be used, in fact, the PS2_Data can even an input-only pin (eg GP3 on 12F683).
This solution is totally transparent and equal to the original PS2_Library:
- same (a bit smaller) code-footprint,
- same RAM usage (a bit less too),
- same pin definitions,
- same global variables,
- same functions with same parameters,
- same results (return values);
- so you do not need to change your program
some minor exceptions, eg not all keys (like WINDOWS), details in the documentation.
I created also two sample project (see the pictures):
the first is the simplest Ps2 program from the MikroC Ps2 help
the second, a much more complete project is a 'real' one-line LCD editor (EDLIN-like ):
- insert - overwrite mode with different cursor shapes,
- full cursor movement (LEFT-RIGHT via arrow keys, also HOME and END), BACKSPACE and DELETE.
Although this is only a demo, the source includes useful details.