PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun May 11, 2008 1:25 pm |
|
|
Post a complete little test program that shows the problem.
For example, here is a short program that tests passing a parameter
to the read_rtc() function. I can compile it, and it does not show an
error.
Make a similar (very short) program that shows your problem. Post it.
Code: | #include <16F877.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)
#byte portd = 0x08
#define sec 0
unsigned char read_rtc(unsigned char addr)
{
unsigned char data;
portd=addr;
return (data);
}
//=======================================
void main()
{
unsigned char tmp1;
tmp1 = read_rtc(sec);
} |
|
|