This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Help for a beginner

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..

Parents
  • "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.

Reply
  • "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.

Children