Can someone pleae tell me how to write a medium size code systematically?? for example, I have one .c file for LCD, another .c file for keyboard, another .c file for ADC reading. main() is written as main.c. Now i have added all these source codes; but my doubt is how can I call these deifferent files from main; how compiler wil come to know that these many files make the code complete?? Is there any reading material available anywhere?? please help..
"Typically a larger program will be subdivided into modules. Each module contains a group of functions with a single common purpose, a unifying theme. For example, I might have a serial port module that has the UART interrupt handler, buffering, and I/O routines in it, ..." This is well illustrated by the Keil interrupt-driven serial IO example download: http://www.keil.com/download/docs/200.asp The UART interrupt handler, buffering, and I/O routines are defined in the file sio.c; a header file sio.h provides declarations; the main.c file #includes sio.h so that it can use the serial IO facilites.
See the following: http://www.eskimo.com/~scs/C-faq/q10.6.html http://www.eskimo.com/~scs/C-faq/q1.7.html
Thanbx Andrew This has cleared my doubt completely. Thank you once again.