Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Hi-Tech PICC - problem understanding purpose of printf

Status
Not open for further replies.

the_merovingian

Member level 1
Joined
Jul 25, 2009
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
UK
Activity points
1,558
I've always programmed my PICs using assembler in the past but have decided to take a look into Hi-Tech's PICC Lite compiler.

I'm confident and competent in using C on a PC (for Linux) but I'm struggling to understand the purpose of printf on a PIC.

What would it do on a PIC16F627A - there is no STDOUT?!

Any help (or decent tutorials) appreciated.

Thanks in advance.
 

You supply a function that printf calls to output each character. You can use this fucntion to send data to a serial port, an LCD, printer....whatever output you want.
 
Ah ha! That makes sense! Many thanks. That would be useful for projects with an LCD.

I see the magical template file is found in the lib directory of the compiler distribution and is called 'doprnt.c'.

Any examples available online?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top