View previous topic :: View next topic |
Author |
Message |
evios
Joined: 24 Nov 2008 Posts: 8
|
Transmit and receive unicast message |
Posted: Mon Dec 01, 2008 8:40 pm |
|
|
Within the digit.h file, I declare
Code: | #define EXP_OUT_ENABLE PIN_C1
#define EXP_OUT_CLOCK PIN_B4
#define EXP_OUT_DO PIN_B5
#define NUMBER_OF_74595 3
#include<74595.c> |
For the base station, named BS.c:
Code: | #include<18F4620.h>
#fuses HS,NOWDT,NOLVP,PUT,NOBROWNOUT
#use delay(clock=10000000)
#use rs232(xmit=PIN_C6, rcv=PIN_C7, baud=9600)
#define COORDINATOR 1
#include "em260.h"
#include "ember_utilities.c"
#include<digit.h> |
But when I compile BS.c it comes out with the error for the 74595 library file:
The error file:
But I already define it at digit.h for the PIN_DO.
Anyone can help? Thanks |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Tue Dec 02, 2008 9:35 am |
|
|
Can you put the include for digit.h before the include for 74595?
The compiler works from top down.. and doesn't know about the digit.h
when its compiling the 74595 part,.. so it doesn't know about the define. |
|
|
Ttelmah Guest
|
|
Posted: Tue Dec 02, 2008 10:55 am |
|
|
He already is.
The 74595 include is immediately after his pin define, in the 'digit.h' file.
It should work.
However, the error message, suggests that something is wrong, possibly _in_ the define.
Try retyping it. It looks as if the define may have a hidden character in the pin number. You can get this sort of behavious/message, if there is an invisible character inside the text line.
It compiles fine for me (added a 'main', and a data definition for the array of bits to send).
Best Wishes |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
|
Ttelmah Guest
|
|
Posted: Tue Dec 02, 2008 4:05 pm |
|
|
Don't chips do this all the time!....
Best Wishes |
|
|
|