TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (405 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (133 codes)
  5. Bugz Bensce (97 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 (141422 times)
  2. FAT32 Library (74283 times)
  3. Network Ethernet Library (58813 times)
  4. USB Device Library (48892 times)
  5. Network WiFi Library (44678 times)
  6. FT800 Library (44198 times)
  7. GSM click (30928 times)
  8. mikroSDK (29782 times)
  9. PID Library (27388 times)
  10. microSD click (27312 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
Library

Common output functions

Rating:

6

Author: Istvan K

Last Updated: 2014-04-04

Package Version: 2.0.0.0

Category: Other Codes

Downloaded: 789 times

Followed by: 1 user

License: MIT license  

Second part of my new library collection: the common output functions, using func-pointers or a user written char-out routine. In addition, an other library with the mikroC UART1 and LCD char-outs. For all 8-bit PICs.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Common output functions" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Common output functions" changes.

Do you want to report abuse regarding "Common output functions".

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

Library Blog

This is the second part of my new library collection  (the first, already published part includes the "Bargraph" and the "PS2 Keyboard Simulator" libraries).
___________

Common output functions (PIC, mikroC).
There are 12 routines ("..." is the distinctive prefix, see below):

   String outputs:

...RstrOut  (char* rptr)                                      //write out a string stored in Ram
...RstrNout (char* rptr, char N)                          // the same but max N char(s)
...CstrOut  (const char* cptr)                            //write out a string stored in Code memory
...CstrNout (const char* cptr, char N)                // the same but max N char(s)

   Direct conversions (without any temporary buffer):

...BcdOut  (char)         //  "dd", char: max 0x99 (153), with leading zero(es)
...Dec2out (char)         //  "dd", char: max 99,                  -"-
...Hex2out (char)         //  "hh", char: max 255,                 -"-
...Hex4out (unsigned)  //  "hhhh", max 65535,                -"-

       Justified direct conversion  (controlled by an additional "just" parameter):
         just = -1: (just.B7 = 1) no alignment (with leading zeroes)
         just =  0: leading zeroes will be supressed (left  justified)
         just =  1: leading zeroes will be a space    (right justified)

...Dec2out_J (char onebyte, char just)   //    "dd" (or "d" or " d"), max 99 !!
...Dec3out_J (unsigned wrd, char just)   //   "ddd", max 999
...Dec4out_J (unsigned wrd, char just)   //  "dddd", max 9999
...Dec5out_J (unsigned wrd, char just)   // "ddddd", max 65535

See the "COMMONFUNCS_DOC.H"

These heavily optimized (using family-specific inline ASM) functions are included in my two new libraries:
   "p*_UART1-LCDouts.mcl"
       prefixes: "UART1_" and "LCD_" (see the "UART1-LCD-DOC.H")
   "p*_Out_Univ.mcl"
       prefixes: "Ptr_" and "Usr_"        (see the "OUT_UNIV_DOC.H")

For all 8-bit PICs, using different library prefixes: p* = p16, p16e or p18 

Proteus test poject included

Proteus test poject included

UART1 outputs

View full image

ALSO FROM THIS AUTHOR

Multi-SwUart library

6

Updated Multi-SwUart library (v3.0). Same way usable (uniformized), as my new LCD libs. It allows you to handle 4 (four) independent software (bit-banging) Uart. Now also for all 8-bit PIC (pic12/16, pic12e/16e and pic18).

[Learn More]

Memory manipulation library

5

Memory manipulation (eg sprint-like) function-collection plus some simplified arithmetic and bit-handling routine in one library. For all 8-bit PIC (pic12/16, pic12e/16e and pic18).

[Learn More]

My libraries 1 (more LCD, more Sw Uart)

5

They contain extremely simplified interface for -- max 2 LCD (write-only 4bit mode, 6 pins), -- max 2 LCD (using a HC595, 3 pins), -- max 4 Sw-Uart (1, 2 or 3 pins, CTS handshake) . Also some routines as Hex2out, Dec3out, CstrOut. A separated library for using them via funcptr. For now only for all PIC16 (PIC12). UPDATED.

[Learn More]