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.
From Keil manual about printf():
"This function is implementation-specific and is based on the operation of the _getkey and putchar functions. These functions, as provided in the standard library, read and write characters using the microcontroller's serial port. Custom functions may use other I/O devices."
The printf() command in Ke*l is used to transfer data out through the serial port. After compiling and after entering the debugging mode open your 'serial port window' in the 'view' menu. here you can enter see the serial output as well as use the window to input any characters if needed.
I would recomend a simple subfunction to send the data to sbuf and check for TI bit rather than use prinf();
It's not a "simple" question.
It's really a "great" one.
But it's hard to explain in several words.
I think u could refer to some open-source code for printf/sprintf. To understand how the arguments to be relayed, how they to be interpreted,
finally, the most complicated, how a character was transfered to a interface between hardware and software.
And more, if u want to know the hardware to deal with a "character", u need more knowledge about many hardware device. Behide "file system" there're a large amount hardwares, such as uart/usb/ata/sdram/ram/NandFlash... Aha... who knows how many : )
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.