Jan 9, 2010 #1 T 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.
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.
Jan 9, 2010 #2 GSM Man Banned Joined Apr 15, 2009 Messages 670 Helped 168 Reputation 338 Reaction score 94 Trophy points 1,308 Location New Jersey, USA Activity points 0 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.
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.
Jan 9, 2010 #3 T 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 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?
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?