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.

Printf() function for debugging process

Status
Not open for further replies.

ucsam

Advanced Member level 4
Joined
Oct 12, 2010
Messages
119
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
kathmandu,nepal
Activity points
2,058
Hello!
I wanted to use printf() function for debugging my project. I read the description about it but couldn't understand it, can u guys help me use it? i know that it prints the data in the "printf() viewer" btw i am using keil c uvison 4 and 89s52.

p.s - please reply soon, it is for my competition and i am stuck with the coding.
 

Have you checked out Keil's User Guide:

Cx51 User's Guide - printf()

A couple of good tutorials:

C Tutorial – printf, Format Specifiers, Format Conversions and Formatted Output

Secrets of “printf”

The Keil compiler sends printf() output to STDOUT, which I believe is UART1. So if you need to define STDOUT as another UART or other peripheral, you need to modify some code and recompile, check Keil's website for details.

Here's a Keil Forum discussion on printf():

UART - printf - keil

These links and docs should get you started in the right direction.
 

Thanks for your kind reply.

I have been known that printf() function prints characters in simulation of code. As i am stuck with mine, i want printf function to print the status. I want to know the format on how to use it. If u can, please guide me to a working example of using printf. I want to use printf for simulation and virtually
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top